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

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

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

#1 Post by mcewanw »

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

#!/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: Select all

type:mp3:xhippo_mp3:g
Use the above line instead of the default provided

Code: Select all

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

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/mpl ... %20CONTROL

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

mcewanw
Last edited by mcewanw on Tue 07 Jan 2014, 03:02, edited 2 times in total.
github mcewanw

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

#2 Post by greengeek »

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)

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

#3 Post by greengeek »

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?

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

#4 Post by mcewanw »

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.
github mcewanw

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

xhippo - problem with spaces in directory names

#5 Post by mcewanw »

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.
github mcewanw

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

#6 Post by greengeek »

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.

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

xhippo with spaces in directory fix and button icons

#7 Post by mcewanw »

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
github mcewanw

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

#8 Post by greengeek »

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?

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

#9 Post by mcewanw »

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.
github mcewanw

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#10 Post by amigo »

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

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

#11 Post by mcewanw »

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!
github mcewanw

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

#12 Post by mcewanw »

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
github mcewanw

Post Reply