Simple audio player needed

Audio editors, music players, video players, burning software, etc.
Message
Author
User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#16 Post by rcrsn51 »

disciple wrote:... one thing I've always missed in Linux is the "directory player" 1by1.
Me too. That's the point of PeasyMP3. Have you tried it?

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#17 Post by disciple »

It doesn't automatically progress onto the next directory in the filesystem, does it?
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

PeasyMP3 deserves own thread

#18 Post by mcewanw »

rcrsn51 wrote:PeasyMP3 was originally designed as an MP3 player. But it can now play any format that MPlayer recognizes.

PeasyMP3 works with folders of media files. Drag a folder into the input box or click the Folder Chooser button.
This is a great idea. Fills a void in what Puppy provides. I'm using your program now to play some music videos. May I suggest that you start a new thread especially for PeasyMP3 - easier to keep track of for following PeasyMP3 developments.

Also - don't know if you mentioned that pressing P on the keyboard will toggle Pause/Continue in Mplayer window. Lots of other Mplayer control keys for other effects (e.g. Left/Right curson keys for jumping back and forwards to different parts of a playing video; key F toggles Fullscreen video)

mcewanw
github mcewanw

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

controlling mplayer

#19 Post by mcewanw »

These links might prove useful:

http://www.mplayerhq.hu/DOCS/HTML/en/control.html

http://www.mplayerhq.hu/DOCS/man/en/mpl ... %20CONTROL

In theory I suppose you should be able to use gnome-mplayer for much of PeasyMP3 functionality, but the version I've tried in Slacko533 seemed to be a bit buggy at folder playing.

Also Peasy could be a less resource-intensive frontend and easily modified. I'd change the name from PeasyMP3 to something more media generic though, since that would highlight its main advantages. Pmusic probably the least resource intensive currently for music playing in Puppy.

EDIT: Having had a quick glance at your code I see that you are using lame | aplay for mp3 playback and not mplayer so PeasyMP3 is even less resource intensive than I thought, sorry. Peasy probably also the least resource intensive mp3 player for Puppy afterall. Great! Any particular reason why you store the program in /usr/sbin rather than /usr/bin?
Last edited by mcewanw on Thu 13 Jun 2013, 03:39, edited 1 time in total.
github mcewanw

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

retrovol?

#20 Post by mcewanw »

I modified Peasy, for my own use, to use retrovol mixer full window when volume button pressed (but why not call the button MIXER?), or alsamixer if retrovol not available. This needs worked on though, cos as it stands it doesn't close retrovol (or alsamixer) when Peasy closes (not that that may matter). In case useful to anyone:

Code: Select all

VOLUME () {
if [ $(which retrovol 2>/dev/null) ];then
   killall retrovol 2>/dev/null
   retrovol &
else
   	rxvt -geometry "80x24-0-25" -e alsamixer -V all &
fi
}
export -f VOLUME
(In precord I use similar code as above but store the PIDs of the alsamixer process ,in /tmp/precord, for killing when the application is quit).

and in gtkdialog part:

Code: Select all

      <button>
        <label>$(gettext 'Volume')</label>
        <action>VOLUME</action>
      </button>
I do think using lame provides lowest resource usage, but I'm sure you know you could alternatively use ffmpeg, which is normally compiled to use libmp3lame. Perhaps no point in this case, but ffmpeg can play a variety of formats including mp3 and ogg with a line such as:

Code: Select all

ffmpeg -i "$MP3FOLDER/$TRACKNAME" -f au - 2>/dev/null | aplay >/dev/null 2>&1
github mcewanw

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

PeasyMP3 pause control, retrovol, and ogg capability beta

#21 Post by mcewanw »

rcrsn51, in case you want to use these additions I've made to your program PeasyMP3 for my own current use, please find attached a dotpet of the altered version. This includes the above retrovol code changes, ffmpeg for ogg capability, and a larger change being the addition of a pause control. The pause control code (in fact all of these additions) is borrowed from precord/pavrecord. I've marked most of the lines I've added or modified in your original with # mcewanw.

Useful controls for mplayer (keyboard shortcuts etc) can be found at these links:

http://www.mplayerhq.hu/DOCS/HTML/en/control.html

http://www.mplayerhq.hu/DOCS/man/en/mpl ... %20CONTROL

NOTE WELL: I've named this dotpet as a beta; I really haven't had time to give it much of a test (my one year old baby was pulling at my arm as I coded...)! Also, I didn't want to alter your own code too much, so I just placed most of the new code in functions of its own and a few clean up lines just at the end of the program, so that could probably be tidied up at least. Also, I just stuck a simple pause button on the GUI. Pressing Resume (or most any other button) unpauses; a side effect is that on unpausing you would need to press the Resume button twice if you really also want to Resume. You'll understand what I mean if you test it. With slight alterateion to the code could make pause control a toggle action if you like - I think I prefer it as provided here instead (tho could have both).

EDIT: The change needed would be this function:

Code: Select all

PAUSEPLAY (){ # mcewanw
 # putting following if...elif statement in would give pause control a toggle action. Similar line could then be removed from CONTROL function, or have both
  if [ -e ${TMPFOLDER}/pauseplay ];then
    UNPAUSEPLAY # mcewanw
  elif [ -e ${TMPFOLDER}/play.pid ];then
    PEASYPIDPLAY=$(cat ${TMPFOLDER}/play.pid 2>/dev/null)
    kill -STOP $PEASYPIDPLAY 2>/dev/null
    touch ${TMPFOLDER}/pauseplay
  fi
}
Hope some of this is useful or helpful, mcewanw

NOTE: I notice that some programs, for example ffconvert, allows files to be send directly to them via right click (not just Open With). Seems to just be a matter of having the symlink to the program in all the hidden subfolders of OpenWith, such as .video_mp4, of /root/.config/rox.sourceforge.net/OpenWith but I'm not sure of that or how it is best set up.
Attachments
peasymp3-2.7withpause.pet
with added pause button, retrovol mixer, and ogg capability.
(3.08 KiB) Downloaded 276 times
Last edited by mcewanw on Fri 14 Jun 2013, 23:42, edited 2 times in total.
github mcewanw

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

PeasyMP3 with added pause button, using retrovol, ogg etc

#22 Post by mcewanw »

Next most useful thing, I feel, that would be good to add would be the ability for the program to work through a hierarchy of directories like the feature disciple talked about in 1by1 program. Even as PeasyMP3 stands, however, it is definitely my favourite current music/media player on Puppy - no complicated frill, low-resource usage, and simple to use...

I'm particularly glad you wrote your code all in one script, which made it much easier for me to quickly incorporate the code extract additions from Precord - I find it a nightmare working with code whose functions are stored in a whole heap of different scripts. Just my preference to keep most everything together I suppose. Too much modularisation and I get lost! I realise that many likely have an opposite view on this matter.
github mcewanw

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#23 Post by tempestuous »

Yes, PeasyMP3 looks OK, but it's not quite as elegant as xhippo, which has been used with Puppy Linux and various low-powered computers since 2006.
Screenshot attached.
PaulR wrote:I don't want to install anthing >10Mb !
How does 23kb sound ?!!!
Install just the xhippo gui - xhippo-3.5-gtk2.pet
http://www.murga-linux.com/puppy/viewto ... 017#306017
By default, this dotpet package is configured to use Puppy's madplay executable for MP3 playback.

If you need AAC, WMA, or FLAC support, install the full xhippo+LAMIP dotpet -
http://www.murga-linux.com/puppy/viewto ... 6787#66787
which is still just a modest 650kb.
Attachments
xhippo.jpg
(42.95 KiB) Downloaded 329 times

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#24 Post by tempestuous »

And if you're interested in a rundown of Linux audio player applications, from simple to full-featured, please see "Audio player applications - THE LIST"
http://www.murga-linux.com/puppy/viewtopic.php?t=79110

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

#25 Post by mcewanw »

tempestuous wrote:Yes, PeasyMP3 looks OK, but it's not quite as elegant as xhippo, which has been used with Puppy Linux and various low-powered computers since 2006.
Yes, I've also tried xhippo some years ago, and goingnuts, I think it was, also made a nicer looking gtk1 version a while back. Lamip adds quite a bit extra size though, and I don't think madplay is in Puppies by default anymore.

xhippo was certainly the nearest to what I myself was looking for as a low-resource replacement for my needs to what Puppy generally provides, but it seemed to fall slightly short of what I was looking for. That's why I find PeasyMP3 interesting, because it should be easy to modify it should extra functionality be required. Hopefully not too many additions though since simplicity is one of its attractions I feel.

If the simple xhippo frontend can be configured to work with ffmpeg, lame, aplay, and mplayer for video files, that would be a good alternative to PeasyMP3. Having said that, PeasyMP3 hasn't been around long and being a simple shell script I'm sure it shouldn't be too hard to improve its elegance!
github mcewanw

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

xhippo as general process group frontend

#26 Post by mcewanw »

mcewanw wrote: If the simple xhippo frontend can be configured to work with ffmpeg, lame, aplay, and mplayer for video files, that would be a good alternative to PeasyMP3.
I'll answer my own question. Yes, xhippo can be configured to work with lame, aplay and so on: I just did so. You need to use the g flag in the config script to run the commands as a process group. Very interesting. You can use xhippo as a general process group frontend, not just for music files. Pity BarryK didn't include xhippo in Puppy by default.

Summary: with xhippo you don't need lamip; can just use it with ffmpeg, lame, aplay and so on (in a pipe) if you don't have madplay or mpg123.

My only gripe that remains with xhippo is that I haven't managed to change the buttons in xhippo to gtk stock items for play stop pause etc. goingnuts managed that with his gtk1 version, and posted that to me long time back, but not gtk2. Hence another of my reasons for liking PeasyMP3 - all these things and more could Peasily be added to it (sorry), including different looks and feel, without bloating the code too much (Peasy is only a couple of kB download as it stands). It would probably not be too difficult to program it to have identical or better look and feel to xhippo.
Last edited by mcewanw on Fri 14 Jun 2013, 19:55, edited 5 times in total.
github mcewanw

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

#27 Post by greengeek »

Any way of getting xhippo to remember the last directory that I picked an mp3 from? It seems to immediately forget which directory I browsed into. Anyone get the same effect? I'm on Slacko53.

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

#28 Post by mcewanw »

greengeek wrote:Any way of getting xhippo to remember the last directory that I picked an mp3 from? It seems to immediately forget which directory I browsed into. Anyone get the same effect? I'm on Slacko53.
Not sure what you mean greengeek. Do you mean on closing the program and then executing it again? I've just been dragging and dropping a directory of mp3 files into it.
github mcewanw

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

#29 Post by greengeek »

If I run xhippo, rightclick it's "desktop" and navigate to my music folder then click on a song it will happily add it to the playlist.

If I then repeat this process (to choose a second song) it would be nice if it remembered where I was just browsing, but it doesn't. I have to drill down through the directories again /mnt, /sdb3, /archive, /music, /Abba etc

Rather longwinded. (I could grab the whole directory...but I really only want just 5 or so songs)

(yeah, I know I shouldn't be listening to Abba.... :-) )

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

#30 Post by mcewanw »

Oh, yes I see what you mean. A common problem with many programs - always starts at home directory (~). I can't see a way of changing that behaviour either. The only workaround I can think of is to create a temp directory for the songs you want (can store the required songs in their by drag and drop as symbolic links to the originals) and then drop that directory into xhippo. You can easily clear the playlist and change the contents of your temp directory thereafter.
github mcewanw

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

#31 Post by greengeek »

Thanks mcewanw. Good to know it's not just me...

Also - just discovered a "bug" with PeasyMP3 - while playing through my MP3s it suddenly started to play my flv files as well (which may not always be appropriate... :-) )

Just a heads up in case there's kiddies in the room...

EDIT: Be nice to have two versions: PeasyMP3 (PeasyAudio??) for audio only, and PeasyMedia for all files.

EDIT2: Would it be difficult to make PeasyMP3 work recursively? (My music directory contains maybe 20 individual "loose" songs and the rest are inside subdirectories labelled with the artists name or album name)
Last edited by greengeek on Fri 14 Jun 2013, 20:53, edited 1 time in total.

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

#32 Post by rcrsn51 »

greengeek wrote:EDIT: Be nice to have two versions: PeasyMP3 (PeasyAudio??) for audio only, and PeasyMedia for all files.
You can do this yourself. Open /usr/sbin/peasymp3 and look at Line 11

Code: Select all

export SKIPLIST="jpg$|png$|pdf$|txt$"
Add any extensions to this list that you want to skip. For example:

Code: Select all

export SKIPLIST="jpg$|png$|pdf$|txt$|flv$|avi$"
Or you could store your adult content some place separate from your music files. :wink:

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

#33 Post by greengeek »

rcrsn51 wrote:Or you could store your adult content some place separate from your music files. :wink:
"Adult content"? <cough> Whatever do you mean???

It's just that I have some 911 videos that conspiracy deniers don't like to watch...
:-)

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

Re: controlling mplayer

#34 Post by disciple »

mcewanw wrote:In theory I suppose you should be able to use gnome-mplayer for much of PeasyMP3 functionality, but the version I've tried in Slacko533 seemed to be a bit buggy at folder playing.
If you can come up with a proper bug report, the author is very responsive.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

Peasy latest with pause uploaded

#35 Post by mcewanw »

@disciple: yes, if I have a spare moment I may do that eventually - or not since I prefer to use a different program for music playing anyway and have a baby in my fulltime care...


As for PeasyMP3. I have once again added a pause control, retrovol and ogg capability to my copy of the latest version released at this date (version 3-2.7), so uploaded that again at the following link:

http://www.murga-linux.com/puppy/viewto ... 385#708385

Hope I've not made any mistakes in copying the code over again (easier the first time round whilst my mind was actually working on it).

Note I had to reboot for some reason once I installed my version over the top of the original. Probably to do with something else I was doing in parallel though. Program seems to work fine though not I haven't done much testing after having remade these changes for a second time.

I was hoping the PeasyMP3 author might incorporate some of these changes to save having to do them all over again, but that's up to PeasyMP3s author. I may keep track of the releases, but it is a bit of effort adding code in that way. If the changes are wanted then I might just build a different project based on cut-down Pavrecord code to mirror the functionality of PeasyMP3 and xhippo.

Alternatively, to save effort, I might just use xhippo. Now that I have lame and aplay working with that I realise that tempestuous is right about how good it is.
github mcewanw

Post Reply