Tips and Instructional topics. Not for support questions.
Post a reply
meandean

- meandean
- Posts: 392
- Joined: Wed Mar 09, 2011 5:16 am

## tip - play nested folders of music with mplayer

Thu Oct 27, 2011 4:29 am

This only applies to refracta if you have installed mplayer and wish to use it instead of the media player installed in refracta.
figuring out different methods of playing nested music folders with mp3 and oggs in them
this will play all files but non-media files will cause mplayer to puke
mplayer -playlist <(find "$HOME/music" -type f)
this will play only the mp3 file types
mplayer -playlist <(find $HOME/music/ -name "*.mp3" -type f)
this will play only the mp3 and ogg files
mplayer -playlist <(find $HOME/music -type f | egrep -i '(\.mp3|\.ogg)')
fsmithred

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Re: tip - play nested folders of music with mplayer

Thu Oct 27, 2011 9:23 am

Nice one. That'll save people from having to read through the enormous man page.
Just two things I want to mention - the latest refracta already has mplayer installed (gnome-mplayer), and the other music player installed is moc (run from terminal with 'mocp' and tweaked in ~/.bash_aliases to use the slick transparent theme.) I'm not sure what moc's behavior is when there are mixed media and non-media files in a directory.
meandean

- meandean
- Posts: 392
- Joined: Wed Mar 09, 2011 5:16 am

## Re: tip - play nested folders of music with mplayer

Thu Oct 27, 2011 3:16 pm

Yea I wonder (since this is the refracta forums) if only refracta specific howtos that help with the default install should be in the 'official' howto section. That way it is a good resource for refracta users rather than a general resource for any debian based distro user.
But I will let the admin gods decide that one.
moc is cool but superfluous when you have mplayer
I guess I need a new debian forum to post stuff in....
nadir

- nadir
- Posts: 1160
- Joined: Wed Mar 09, 2011 4:18 am
- Location: here

## Re: tip - play nested folders of music with mplayer

Thu Oct 27, 2011 4:00 pm

good tip, and exactly the reason why i did never use mplayer (how to add a playlist nice and easy).
Thanks, cool.
On a side note i got the same problem: what is refracta related? what is debian only related?
Does not look as if we will suffer from an overflow any time soon, so i think "storing" info here is not a bad idea (i think it is a good idea ). Right now i use a blog to do that:
http://tornow.posterous.com/
but a forum really seems to make more sense to me (-> feedback, corrections, etc).
btw: i, nadir, am not the admin (i think a fake user called "refracta" is the owner, and fsmithred is the admin... let me check in the panel).
I think the side note belongs in "proposals", but for me it does not get announced in "new posts", thats why i added it here.
So, fsmithred, whadayasay? Any "objections" ? to me both makes sense.
nadir

- nadir
- Posts: 1160
- Joined: Wed Mar 09, 2011 4:18 am
- Location: here

## Re: tip - play nested folders of music with mplayer

Thu Oct 27, 2011 4:37 pm

I got two questions:
a) I seem to need the full path:

Code:
  `$ mplayer -playlist <(find . '*mp3' -type f)`

fails. I also tried $(pwd) and what not.
Seems obvious that the following is a bit uncomfortable:

Code:
  `$ mplayer -playlist <(find $HOME/Music/music/independent/Mars_Volta/frances_the_mute '*mp3' -type f)`

b) Can i suppress the output?
meandean

- meandean
- Posts: 392
- Joined: Wed Mar 09, 2011 5:16 am

## Re: tip - play nested folders of music with mplayer

Thu Oct 27, 2011 6:27 pm

I guess ~ would be smarter than using $HOME

> Seems obvious that the following is a bit uncomfortable:
> mplayer -playlist <(find $HOME/Music/music/independent/Mars_Volta/frances_the_mute '*mp3' -type f)

In that case I would do

Code:
  `mplayer -playlist <(find ~ -type f | egrep -i '(frances_the_mute)')`

or something similar
you can make the playlist and inspect it before passing it to mplayer if you wish

Code:
  `find ~/music -type f | egrep -i '\.mp3|\.ogg' > musiclist`

then pass mplayer the playlist

Code:
  `mplayer -playlist musiclist`

the thing about

Code:
  `mplayer -playlist <(find ~ -type_whatever_')`

is that the playlist is not a real playlist but just the output from the command, so it is dynamic and updated everytime you use the command

> b) Can i suppress the output?

What output are you wanting to suppress? You can pipe it out to /dev/null but then you will get NO output at all.
In fact maybe a script/alias that uses
mplayer -playlist <(find ~ -type f | egrep -i '(_whatever_)')
and allows you to specify _whatever_ would be uber cool.
fsmithred

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Re: tip - play nested folders of music with mplayer

Thu Oct 27, 2011 6:40 pm

nadir, you keep telling me that I'm an admin here, but all I can get to is a moderator's panel. i sure hope you didn't un-admin yourself. And yeah, you guys can post pretty much whatever you want. I trust your judgement. We can figure out what to do with the overflow of information if we ever get to that point.
nadir

- nadir
- Posts: 1160
- Joined: Wed Mar 09, 2011 4:18 am
- Location: here

## Re: tip - play nested folders of music with mplayer

Thu Oct 27, 2011 8:12 pm

redirecting to /dev/null does not seem to work
(means i seem to do it wrong). Output:

Code:
  `luzer$ mplayer -playlist <(find ~ -type f | egrep -i '*Sophie*') > /dev/null
  find: `/home/molloy/Data/Backup/configs_for_web_storage/.links2': Permission denied
  mplayer: could not connect to socket
  mplayer: No such file or directory
  Failed to open LIRC support. You will not be able to use your remote control.
  Invalid seek to negative position ffffffffffffffff!
  Requested audio codec family [mpg123] (afm=mpg123) not available.
  Enable it at compilation.
  AO: [pulse] Init failed: Connection refused
  Failed to initialize audio driver 'pulse'
  Requested audio codec family [mpg123] (afm=mpg123) not available.
  Enable it at compilation.
  AO: [pulse] Init failed: Connection refused
  Failed to initialize audio driver 'pulse'`

That, or something like that, is what i mean with "suppress output":

Code:
  `luzer$ xmms2 radd James_Blake/
  luzer$ xmms2 play
  luzer$`

also know as: null-nada-nix.
fsmithred: lets clear that in irc, realtime, when we meet (probably saturday). sweaty hands. login and go to the very bottom of the start-page. there it should say "administraton-panel".
jheaton5

- jheaton5
- Posts: 45
- Joined: Wed Mar 09, 2011 9:26 pm

## Re: tip - play nested folders of music with mplayer

Fri Oct 28, 2011 4:10 pm

Suggestion: Create two How-To forums, one for Refracta only and one for General Debian.
By the way, in case you are interested, Cynwulf left duf permanently. (until the next time)
meandean

- meandean
- Posts: 392
- Joined: Wed Mar 09, 2011 5:16 am

## Re: tip - play nested folders of music with mplayer

Fri Oct 28, 2011 8:24 pm

I dont think you will get mplayer to act like xmms2.
I wonder if you could use pass gnome-mplayer the same stuff?
It looks like mplayer in squeeze includes the crappy gui. Sheesh what happened to mplayer-nogui.
Post a reply
Jump to:

Powered by phpBB © phpBB Group.

phpBB Mobile / SEO by Artodia.