Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 21 Oct 2014, 00:11
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Multimedia
Simple audio player needed
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 4 [51 Posts]   Goto page: Previous 1, 2, 3, 4 Next
Author Message
rcrsn51


Joined: 05 Sep 2006
Posts: 9199
Location: Stratford, Ontario

PostPosted: Wed 12 Jun 2013, 07:52    Post subject:  

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?
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6447
Location: Auckland, New Zealand

PostPosted: Wed 12 Jun 2013, 16:27    Post subject:  

It doesn't automatically progress onto the next directory in the filesystem, does it?
_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send private message 
mcewanw

Joined: 16 Aug 2007
Posts: 2346
Location: New Zealand

PostPosted: Wed 12 Jun 2013, 17:51    Post subject: PeasyMP3 deserves own thread  

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

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
mcewanw

Joined: 16 Aug 2007
Posts: 2346
Location: New Zealand

PostPosted: Wed 12 Jun 2013, 18:11    Post subject: controlling mplayer  

These links might prove useful:

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

http://www.mplayerhq.hu/DOCS/man/en/mplayer.1.html#INTERACTIVE%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?

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.

Last edited by mcewanw on Wed 12 Jun 2013, 23:39; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
mcewanw

Joined: 16 Aug 2007
Posts: 2346
Location: New Zealand

PostPosted: Wed 12 Jun 2013, 19:42    Post subject: retrovol?  

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:

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:

      <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:

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

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
mcewanw

Joined: 16 Aug 2007
Posts: 2346
Location: New Zealand

PostPosted: Thu 13 Jun 2013, 23:49    Post subject: PeasyMP3 pause control, retrovol, and ogg capability beta
Subject description: additions 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/mplayer.1.html#INTERACTIVE%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:

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.
peasymp3-2.7withpause.pet
Description  with added pause button, retrovol mixer, and ogg capability.
pet

 Download 
Filename  peasymp3-2.7withpause.pet 
Filesize  3.08 KB 
Downloaded  147 Time(s) 

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.

Last edited by mcewanw on Fri 14 Jun 2013, 19:42; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website 
mcewanw

Joined: 16 Aug 2007
Posts: 2346
Location: New Zealand

PostPosted: Fri 14 Jun 2013, 04:06    Post subject: PeasyMP3 with added pause button, using retrovol, ogg etc
Subject description: Desired feature.
 

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.

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
tempestuous

Joined: 10 Jun 2005
Posts: 5270
Location: Australia

PostPosted: Fri 14 Jun 2013, 05:24    Post subject:  

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/viewtopic.php?p=306017#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/viewtopic.php?p=66787#66787
which is still just a modest 650kb.
xhippo.jpg
 Description   
 Filesize   42.95 KB
 Viewed   262 Time(s)

xhippo.jpg

Back to top
View user's profile Send private message 
tempestuous

Joined: 10 Jun 2005
Posts: 5270
Location: Australia

PostPosted: Fri 14 Jun 2013, 05:25    Post subject:  

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
Back to top
View user's profile Send private message 
mcewanw

Joined: 16 Aug 2007
Posts: 2346
Location: New Zealand

PostPosted: Fri 14 Jun 2013, 07:45    Post subject:  

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!

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
mcewanw

Joined: 16 Aug 2007
Posts: 2346
Location: New Zealand

PostPosted: Fri 14 Jun 2013, 15:33    Post subject: xhippo as general process group frontend  

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.

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.

Last edited by mcewanw on Fri 14 Jun 2013, 15:55; edited 5 times in total
Back to top
View user's profile Send private message Visit poster's website 
greengeek

Joined: 20 Jul 2010
Posts: 2594
Location: New Zealand

PostPosted: Fri 14 Jun 2013, 15:43    Post subject:  

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.
Back to top
View user's profile Send private message 
mcewanw

Joined: 16 Aug 2007
Posts: 2346
Location: New Zealand

PostPosted: Fri 14 Jun 2013, 15:49    Post subject:  

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.

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
greengeek

Joined: 20 Jul 2010
Posts: 2594
Location: New Zealand

PostPosted: Fri 14 Jun 2013, 15:58    Post subject:  

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.... Smile )
Back to top
View user's profile Send private message 
mcewanw

Joined: 16 Aug 2007
Posts: 2346
Location: New Zealand

PostPosted: Fri 14 Jun 2013, 16:20    Post subject:  

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.
_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 2 of 4 [51 Posts]   Goto page: Previous 1, 2, 3, 4 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Multimedia
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0999s ][ Queries: 13 (0.0063s) ][ GZIP on ]