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 Mon 22 Dec 2014, 07:21
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
How to use xhippo as an mp3 music and video player GUI
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
mcewanw

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

PostPosted: Sat 15 Jun 2013, 02:00    Post_subject:  How to use xhippo as an mp3 music and video player GUI
Sub_title: using underlying lame, aplay, and mplayer
 

How to use xhippo as an mp3 music and video player GUI

xhippo is a minimalist, low-resource using, frontend to various commandline media playing programs.

Since xhippo does not use gtkdialog, but is instead compiled in C, it is particularly resource efficient, particularly in terms of the GUIs memory usage, compared to most small music players on offer in Puppy. It is also surprising flexible and extensible.


Steps used configuring xhippo as a GUI frontend music player using lame and aplay for mp3 playback:

Create the following shell script (xhippo_mp3), make it executable, and put it iin the executable path somewhere (such as /usr/bin or /use/local/bin:

Code:

#!/bin/sh
lame --decode -q 2 "$1" - 2>/dev/null | aplay >/dev/null 2>&1


Now locate the xhippo.config file (in tempestuous's version it is located in /usr/local/etc) and modify it to contain:

Code:

type:mp3:xhippo_mp3:g


Use the above line instead of the default provided

Code:

type:mp3:madplay:i


The important item I had missed in an earlier attempt to do this was the :g in the stanza above, which causes xhippo to run the lame | aplay pipe in a "separate process group".

Note that you can drag and drop directories of media files into the xhippo window. Alternatively, right-clicking in the xhippo GUI provides another method for quickly adding songs or directories. I don't think it will iterate through a hierarchy of directories, however, though I haven't fully investigated that as yet. You can however drag a whole series of directories into its window at once and it automatically produces a giant playlist, which you can play at random. The program provides a pause button, the ability to minimise the GUI, and to randomise playback.

xhippo can also be configured to play mp4 videos via mplayer. If you wish to do so, simply add the following extra line to xhippo.config:

Code:

type:mp4:mplayer -really-quiet


xhippo can similarly cater for other video formats, using mplayer, by adding similar configuration lines with the relevant video file extension instead of mp4.
If you add the option -fs to the above then mplayer will start fullscreen (you can press keyboard key F to toggle in and out of fullscreen mode). Please refer to mplayer man page for other options and keyboard control keys (e.g. P to Pause):

http://www.mplayerhq.hu/DOCS/man/en/mplayer.1.html#INTERACTIVE%20CONTROL

In similar fashion, other media types can be catered for. In fact xhippo can execute almost any program and control any processes...

mcewanw

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

Edited_times_total
Back to top
View user's profile Send_private_message Visit_website 
greengeek

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

PostPosted: Sat 15 Jun 2013, 02:46    Post_subject:  

I can't seem to drag and drop anything at all into the xhippo window. Is that function added by your code (It doesn't seem so) or should that be part of normal ROX behaviour. (maybe I've got a non-compatible setup on my Slacko53?)

EDIT - turns out I can drag and drop a directory only if the directory has a single word label ("Music" is ok, "My Music" is not)
Back to top
View user's profile Send_private_message 
greengeek

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

PostPosted: Sat 15 Jun 2013, 02:55    Post_subject:  

Just a thought - given that you are changing some of the fundamentals of xhippo do you think it would be appropriate to repackage the xhippo dotpet and incorporating your new expanded functionality, and maybe renaming the whole thing as "fathippo" or something to differentiate it?
Back to top
View user's profile Send_private_message 
mcewanw

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

PostPosted: Sat 15 Jun 2013, 04:08    Post_subject:  

I'm not changing the functionality (not at this stage anyway). All I'm doing is editing the standard xhippo configfile greengeek. Pity about the file-naming issue though I tend to never use spaces in folder names - I use underscores or mixed case usually. Still would be obviously be worth fixing that problem in the xhippo code if it isn't too complicated.

EDIT: now that you have mentioned it, greengeek, perhaps I should make an add-on dotpet, which just contains a suitably modified xhippo.config and any scripts I've added such as xhippo.mp3, along with the link to the xhippo dotpet that tempestuous provided. Hopefully that would help. Don't have time tonight but I'll plan for that addition tomorrow.

_________________
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_website 
mcewanw

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

PostPosted: Sat 15 Jun 2013, 15:50    Post_subject: xhippo - problem with spaces in directory names  

greengeek wrote:

EDIT - turns out I can drag and drop a directory only if the directory has a single word label ("Music" is ok, "My Music" is not)


I remember now that the version of xhippo that goingnuts produced for pUPnGO fixed that problem (as well as provided nice icons for the buttons). However, that was a static build for gtk1, so it was quite large in size.

On request, at that time, he kindly sent me the source code patches and I tried building a small gtk2 version. I can't remember, but I think the space problem fix worked in my gtk2 rebuild but neither I (nor goingnuts) could get the icon improvement working with gtk2. I'll try rebuilding xhippo for gtk2 again, using the patches goingnuts sent me, but without the button icon improvements.

_________________
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_website 
greengeek

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

PostPosted: Sat 15 Jun 2013, 16:27    Post_subject:  

Interestingly it turns out that xhippo is quite happy to look inside any subdirectories that have spaces in the directory name - just as long as the parent directory name contains no spaces.
Back to top
View user's profile Send_private_message 
mcewanw

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

PostPosted: Sat 15 Jun 2013, 19:32    Post_subject: xhippo with spaces in directory fix and button icons
Sub_title: Thanks to patches provided by murga forum member goingnuts
 

I found the version of xhippo I compiled about a year ago using the patches provided by goingnuts which should fix the spaces issue and also add icons to the interface buttons. Has one known problem, the first button icon isn't displaying, but still works fine.

I've included all the changes I was suggested for xhippo.config and also included the shell script xhippo_mp3 in the dotpet. Make sure you remove all traces of previous xhippo installation first (you might want to make a back up of you old xhippo.conf). Please let me know if it works for you.

Please find it here:

http://www.murga-linux.com/puppy/viewtopic.php?t=86753

_________________
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_website 
greengeek

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

PostPosted: Sun 16 Jun 2013, 04:03    Post_subject:  

Yes, that looks good - the problem with filename spaces is gone now. I did try playing an flv but it said "could not guess type" or similar. Is it easy to add types?
Back to top
View user's profile Send_private_message 
mcewanw

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

PostPosted: Sun 16 Jun 2013, 07:36    Post_subject:  

greengeek wrote:
Yes, that looks good - the problem with filename spaces is gone now. I did try playing an flv but it said "could not guess type" or similar. Is it easy to add types?


See the download link. I re-uploaded with flv type catered for.

_________________
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_website 
amigo

Joined: 02 Apr 2007
Posts: 2294

PostPosted: Sun 16 Jun 2013, 12:54    Post_subject:  

Can you attach copies of the source-code patches? -for my collection.
Back to top
View user's profile Send_private_message 
mcewanw

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

PostPosted: Sun 16 Jun 2013, 23:30    Post_subject:  

amigo wrote:
Can you attach copies of the source-code patches? -for my collection.


Hello amigo, I've sent you a PM and also asked goingnuts by PM. As I've said, all credit for this new xhippo compilation go to goingnuts, who created the patches. If he no longer has the patches himself and is happy for me to publish them here, or send them to you, I will gladly do so. I hope the missing button icon issue can then be quickly sorted out by someone with much more gtk programming expertise!

_________________
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_website 
mcewanw

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

PostPosted: Mon 17 Jun 2013, 02:54    Post_subject:  

With goingnuts kind permission, the patches used in my recent xhippo gtk2 build can all be found here:

http://www.murga-linux.com/puppy/viewtopic.php?t=86772

_________________
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_website 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0781s ][ Queries: 12 (0.0039s) ][ GZIP on ]