PeasyMP3 - a Minimal Media Player

Audio editors, music players, video players, burning software, etc.
Message
Author
PaulR
Posts: 249
Joined: Wed 04 May 2005, 18:45
Location: UK

#41 Post by PaulR »

Pausing/resuming an mp3 works flawlessly every time, whereas pausing a stream causes the same problem every time - the last fraction of a second of whatever sound was broadcast is repeated ad infinitum.

Here's one stream I've tried:
http://www.bbc.co.uk/radio/listen/live/r4_aaclca.pls

I obtained the link from the online database linked to from the PupRadio/PupTelly program - I haven't looked for an alternative link for the same station as yet.

Paul

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#42 Post by rcrsn51 »

That stream pauses/resumes OK for me.

Try my suggestion above. However, it will affect pause/resume of other media types too.

PaulR
Posts: 249
Joined: Wed 04 May 2005, 18:45
Location: UK

#43 Post by PaulR »

Right, thanks - I'll decide which is most likely to require a pause and edit the script accordingly if necessary. Thanks again for the help.

Paul

npierce
Posts: 858
Joined: Tue 29 Dec 2009, 01:40

#44 Post by npierce »

After years of using sound cards which had built-in synthesisers, I currently have one with none, so searched the Additional Software forum for Timidity. Happily I found your above post, with links for Timidity and the sound font, as the first hit.

And, of course, while here I tried out the new version of PeasyMP3 with support for Timidity.

I can report that all works well on Racy 5.2.2 (although I did a bit of head-scratching before I noticed that the first .mid file that I tried was actually a .MID file).


(By the way, I can report that the PaulR's BBC link works fine for me. Pause brings silence, and Resume picks up cleanly from where it left off. I do remember years ago occasionally running into the same symptom that he is experiencing, but I had different hardware then. If I remember correctly, it was inconsistent, and often happened after listening for a long time. I had no trouble with PeasyMP3 even after listening for about an hour.)

Thanks for PeasyMP3.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#45 Post by rcrsn51 »

Thanks for testing
(although I did a bit of head-scratching before I noticed that the first .mid file that I tried was actually a .MID file).
I never got around to dealing with this - maybe it's time to do so.
Pause brings silence, and Resume picks up cleanly from where it left off.
I may have a solution to Paul's problem and am waiting for him to test it.

PaulR
Posts: 249
Joined: Wed 04 May 2005, 18:45
Location: UK

#46 Post by PaulR »

Right, I've just checked the eepc again with the latest (public) version of PeasyMP3 and it's now working perfectly!

I inadvertently rebooted the machine earlier, the first reboot for several days and this seems to have cured the problem. I've tried switching between streams and between streamed media and mp3's and everything is fine.

I have access to one other machine here (a T42 Thinkpad) but haven't tried it on that yet. I'll see what happens over the weekend with the eeepc - if the problem recurs I'll edit the script and/or try the patched version and report back.

Paul

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#47 Post by RSH »

Hi.

This is the PEasy-Multimedia-Suite created from rcrsn51's different "Peasy"-Apps.

I did not change anything on the scripts.

Just packaged it, created Icons for the Applications and edited the .desktop files, to have a DE Menu Entry and the nice new Icons.

RSH
Attachments
PEasyMM-Suite.pet
(46.91 KiB) Downloaded 556 times
image-2.jpg
(16.41 KiB) Downloaded 706 times
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#48 Post by rcrsn51 »

Very nice! Thank you.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#49 Post by greengeek »

RSH wrote:This is the PEasy-Multimedia-Suite created from rcrsn51's different "Peasy"-Apps.
Is there a way to add Carousel to the right-click menu so that I can simply rightclick my "Music" folder and have Carousel play all of the contents in random order?

EDIT : ok - let me clarify that request... I can use the rightclick menu, then select "open with" and find carousel in the list - but in Pemasu's Upup 3.9.9.2 there is quite a lot listed in the "open with" menu so I have to scroll a lot. What I meant was - is it easy to add "Play in Carousel" to the right click menu without going the extra step into "open with"?? (hoping this description is a bit more clear...)

EDIT2 :I have previously worked out how to modify carousel so that it has the random flag "preset" (and also fewer selection windows) but just don't know how to get this modified script to "grab" the music directory that I right-click on.

The pic shows how I have modified the Carousel window, and the modified code is as follows:

EDIT: dont copy this code - it has a bug

Code: Select all

#!/bin/sh
# rcrsn51 2013-06-15
# greengeek 2013-06-22 
# - commented out RAND test. Attempt to force random mode always.
# - removed "random" checkbox
# - changed title bar to "Peasy Carousel Media Randomiser"
# - removed 5 of the original 6 "file entry" fields

export TEXTDOMAIN=peasymp3
export OUTPUT_CHARSET=UTF-8

export PIDFILE="/tmp/carousel.pid"  	#for Stop
export PIDFILE2="/tmp/carousel.pid2"	#for Pause
export TMPFOLDER="/tmp/carouseltmp"	#for Random

DOPLAY () {

#if [ $RAND = "false" ]; then
#  while [ 1 ]; do 
#    for DISC in "$A" "$B" "$C" "$D" "$E" "$F"; do
#      [ -z "$DISC" ] && continue
#      peasymp3 "$DISC" -b
#    done
#  done
#
#else
# 
  while [ 1 ]; do 
    rm -rf $TMPFOLDER
    mkdir $TMPFOLDER
    for DISC in "$A" "$B" "$C" "$D" "$E" "$F"; do
      [ -z "$DISC" ] && continue
      if [ -f "$DISC" ]; then
        ln -s "$DISC" $TMPFOLDER/$RANDOM"-""$(basename "$DISC")"
      else
        find -L "$DISC" -not -type d | while read TRACK; do
          ln -s "$TRACK" $TMPFOLDER/$RANDOM"-""$(basename "$TRACK")"
        done
      fi
    done
    peasymp3 $TMPFOLDER -b
  done
 
#fi

}
export -f DOPLAY

PLAY () {
  [ -f $PIDFILE ] && exit
  DOPLAY &
  echo $! > $PIDFILE
}
export -f PLAY

PAUSE () {
  PID=$(pidof aplay)
  [ -z "$PID" ] && PID=$(pidof mplayer| awk '{print $NF}')
  if [ -n "$PID" ]; then
    kill -STOP $PID
    echo $PID > $PIDFILE2
  fi
}
export -f PAUSE

RESUME () {
  if [ -f $PIDFILE2 ]; then
    kill -CONT $(cat $PIDFILE2) 2>/dev/null
    rm $PIDFILE2
  fi
}
export -f RESUME

NEXTTRACK () {		#skip a track
  RESUME
  killall lame aplay mplayer
}
export -f NEXTTRACK

NEXTDISC () {		#skip a disc
  RESUME
  killall peasymp3 lame aplay mplayer
}
export -f NEXTDISC

export PROG1="
<window title="Peasy Carousel Media Randomiser v0.0">
<vbox>
  <frame $(gettext 'Drag your Music folder here, or browse to it...        ')>
    <hbox>
      <entry accept="directory">
         <variable>A</variable>
       </entry>
      <button>
        <input file stock="gtk-open"></input>
        <action type="fileselect">A</action>
      </button>
    </hbox>
  </frame>
  <hbox>
    <button>
      <label>$(gettext 'Play')</label>
    </button>
    <button>
      <label>$(gettext 'Cancel')</label>
    </button>
  </hbox>
 </vbox>
</window>
"

export PROG2="
<window title="PeasyMP3 Carousel">
<vbox>
  <hbox>
    <button>
      <label>$(gettext 'Pause')</label>
      <action>PAUSE</action>
    </button>
    <button>
      <label>$(gettext 'Resume')</label>
      <action>RESUME</action>
    </button>
    <button>
      <label>$(gettext 'Next Track')</label>
      <action>NEXTTRACK</action>
    </button>
    <button>
      <label>$(gettext 'Next Disc')</label>
      <action>NEXTDISC</action>
    </button>
    <button>
      <label>$(gettext 'Volume')</label>
      <action>rxvt -e alsamixer &</action>
    </button>
    <button>
      <label>$(gettext 'Quit')</label>
    </button>
  </hbox>
 </vbox>
</window>
"

[ "$(ps --no-heading -C peasymp3carousel | wc -l)" -gt 2 ] && exit
rm $PIDFILE

I=$IFS; IFS=""
for STATEMENTS in  $(gtkdialog3 --program PROG1); do
  eval $STATEMENTS
done
IFS=$I

[ "$EXIT" = "$(gettext 'Cancel')" -o "$EXIT" = "abort" ] && exit

export A B C D E F RAND
PLAY
gtkdialog3 --program PROG2

RESUME
kill $(cat $PIDFILE)
rm $PIDFILE
killall peasymp3 lame aplay mplayer
rm -rf $TMPFOLDER 
Attachments
Carousel_mod.jpg
(67.87 KiB) Downloaded 624 times
Last edited by greengeek on Sat 05 Oct 2013, 19:39, edited 2 times in total.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#50 Post by rcrsn51 »

Try this:

1. Right-click on a music folder.

2. Select Customize Menu.

3. You will see a window that probably contains Search with Pfind.

4. Drag the file /usr/sbin/peasymp3carousel into this window as a Link.

5. Rename the link Play in Carousel.

Now when you right-click on a music folder, this Play option will appear at the top of the list.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#51 Post by greengeek »

Thanks rcrsn51,

If anyone wants to make it really easy to get their music / media folder playing randomly using rightclick and a slightly modified version of peasymp3carousel this way seems to work perfectly now for me:

1) Install the rcrsn51 / RSH pet shown a couple of posts above.
2) Grab the peasy media carousel randomiser script I have attached to this post and put it into /usr/sbin alongside the other peasy files (remove the false gx suffixes...). Rightclick the script, choose "permissions" and click yes to accept the change to make it executable.
3) Right click your music folder and select "customize menu" and two windows will open up:
- the first window is an advisory notice which will coach you to drag a symlink into the other window. (Read / understand it then just click ok)
- the second window is the "SendTo/.inode_directory" which handles the rightclick functions.
4) Open up /usr/sbin and drag the "peasymediacarouselrandomiser" file into the "SendTo/.inode_directory" and choose "Link Relative"

Now you can get your music folder paying randomly by rightclicking it, and choosing "peasymediacarouselrandomiser" from the menu. Just click play.

Easy peasy.

(This version has been modified to only display a single directory chooser as that is all that is necessary when using the right click. If you want the six-directory-chooser version you just use the standard peasymp3carousel as I have not modified that)
Attachments
peasymediacarouselrandomiser.false_gz_.gz
(5.41 KiB) Downloaded 502 times

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#52 Post by greengeek »

PaulR wrote:Another thought occurred to me - would it be possible to detect when the program was fed a directory from a customised Rox context menu and if so automatically start playing? I can thing of no logical reason not to do this from the users perspective!
Obviously my modifications are not official in any way - but I think my latest mod has achieved what you are looking for (which is exactly what I was wanting too...)

The attached modified version of peasy carousel allows you to right click your music directory and it will automatically play all of the contents (including subdirectories) in random order. (user no longer needs to click the "play" button)

Steps as follows:

1) Install the rcrsn51 / RSH pet shown a couple of posts above.
2) Grab the peasy media randomiser autoplay script I have attached to this post and put it into /usr/sbin alongside the other peasy files (remove the false gx suffixes...). Rightclick the script, choose "permissions" and click yes to accept the change to make it executable.
3) Right click your music folder and select "customize menu" and two windows will open up:
- the first window is an advisory notice which will coach you to drag a symlink into the other window. (Read / understand it then just click ok)
- the second window is the "SendTo/.inode_directory" which handles the rightclick functions.
4) Open up /usr/sbin and drag the "peasymediarandomiser_autoplay" file into the "SendTo/.inode_directory" and choose "Link Relative"

Now you can get your music folder paying randomly by rightclicking it, and choosing "peasymediarandomiser_autoplay" from the menu. No need to click play - it starts playing automatically.

Very easy.
Attachments
peasymediarandomiser_autoplay.removefalsegz.gz
(3.7 KiB) Downloaded 478 times

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#53 Post by rcrsn51 »

OK. I see where you guys want to take this. :wink:

So I stripped more unnecessary code out of your Randomizer and packaged it as PeasyMP3 AutoPlay. The PET also sets up the ROX right-click menu.

There is no Multimedia menu entry because it doesn't make sense to run it that way.

[Edit] This feature is now included in the main package.
Last edited by rcrsn51 on Mon 11 Nov 2013, 13:55, edited 1 time in total.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#54 Post by greengeek »

Thanks! Much appreciated. I hate having to rely on my own dangerous hacking :-)

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#55 Post by greengeek »

Hi rcrsn51,

I think your autoplay pet should become a standard part of every puppy. It is such an easy way to get a music collection playing without any drama or delay.

I decided to try it across a range of puppies to see how compatible it is and here is what I found:

Worked perfectly on:
Slacko 5.3
Upup 3.9.9.2
SolidPup Lite3 RC2
Slimpup 3.7
Studio 1337
Wary 5.2.2
Pulp03 (based on pup 4.12)

LupuPlusLibre 528.005.001 worked ok but there seemed to be a very long delay before the first media file would play

Puppy 431 and Akita Beta9 both worked fine for audio - but both seemed to lack inbuilt flv player so they couldnt display my flv music vids.

Racy5.3 was pretty faulty - it would display the flv files ok but there was no sound. Also it would not go into subdirectories - it would only play the "loose" files in the top level directory. (The flvs would play correctly including sound if I just clicked on the file itself so maybe this was just a peculiarity of my savefile)

Just one question to clarify: is it true that the autoplay pet relies on the peasymp3 pet (or peasyMMSuite) to be already installed first? ie: the autoplay pet is not intended to be a standalone utility is it?

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#56 Post by rcrsn51 »

Just one question to clarify: is it true that the autoplay pet relies on the peasymp3 pet (or peasyMMSuite) to be already installed first? ie: the autoplay pet is not intended to be a standalone utility is it?
Correct. Like the Carousel, it is a front-end for PeasyMP3.

And PeasyMP3 is a front-end for a number of Linux media tools, including MPlayer. Not all Puppies will have a version of MPlayer that can handle flv's.

Regarding Racy: I can't see why it wouldn't drill down into subfolders, unless there is something wrong with its "find" command. I will test this.

[Edit] I checked this in Racy 5.3 with a directory tree of MP3 files and it worked fine. Also, FLVs played OK, but I had to turn up the sound volume.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#57 Post by greengeek »

rcrsn51 wrote:Regarding Racy: I can't see why it wouldn't drill down into subfolders, unless there is something wrong with its "find" command. I will test this.

[Edit] I checked this in Racy 5.3 with a directory tree of MP3 files and it worked fine. Also, FLVs played OK, but I had to turn up the sound volume.
Thanks for testing this. I've gone back for a closer look and now realise that my Racy53 installation is based on jrb's Racy-Baby-Barebones cutdown version (including a savefile that is of uncertain make-up) so I guess I shouldn't have included those results.

I'm glad your pet works on so many puppies because it turns out my hacked version of carousel doesn't :-) My hack only seems to work on recent puppies (maybe something to do with gtk versions, I don't really know...)

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#58 Post by rcrsn51 »

PeasyMP3_Progs v4.3 is posted on page 1. It incorporates the above AutoPlay feature.

robwoj44
Posts: 399
Joined: Fri 08 Aug 2008, 18:15
Location: Warsaw

#59 Post by robwoj44 »

I added to PeasyMP3 the possibility to play the modules - Sound/Noise/Protracker (MOD), Scream Tracker 3 (S3M), Fast Tracker II (XM), Impulse Tracker (IT), DIGI Booster (DIGI),
DigiBooster Pro (DBM), OctaMED (MED), SoundFX (SFX).
Here you can find the modules:
http://www.modules.pl/
http://modarchive.org/
You need xmp from http://www.murga-linux.com/puppy/viewtopic.php?t=45902
Attachments
peasymp3_progs-4.3.pet
PeasyMP3
(4.42 KiB) Downloaded 491 times

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#60 Post by rcrsn51 »

PeasyMP3 v3.8 is posted on the first page. Thank you to vovchik for the hint here.

Post Reply