[MPlayer-users] Mplayer playlist question

P J P prasad at ncb.ernet.in
Thu Oct 11 07:00:04 CEST 2007


   Hello Wanderer,

On Wed, 10 Oct 2007, The Wanderer wrote:
> Please do not, ever, crosspost a message between the -users and the
> -dev-eng mailing lists.

   Sorry, my fault! Please excuse me for doing that. I just thought that 
developers should also know about it.


> That path specification expands to
>
> $HOME/sng/file1.mp3 $HOME/sng/file2.mp3 $HOME/sng/file3.mp3 ...
>
> The expansion is done by the shell before MPlayer is run; MPlayer never
> sees the wildcard; it just sees the list of songs. It does not really
> know that you are attempting to pass it "all the songs in this
> directory"; it only knows that you are passing it "all of the songs I
> have explicitly named".
>
> Once the number of files in that directory gets to be too large, you
> will start to see "command line too long" errors from your shell. That
> doesn't really relate to your current problem, but it is a weakness in
> your described approach, which you will eventually have to deal with if
> you keep adding files.


   Well, thanks for the information; But I know that stuff. And secondly, 
`*.mp3' was just an example, one could very well replace it with a text 
playlist file(I do sometimes). In either case, my problem sustains.


> Sounds like a variant on the functionality you can get from moosic. I
> don't use it quite that way, but it certainly can be done if I'm not
> mistaken. Have you seen that program?

   No, I never heard of moosic before.


> Since MPlayer knows only that you passed it a list of specific
> filenames, and does not know or care that all of those files are in the
> same directory, it naturally cannot rescan the directory.

   Okay, fair enough.


> Not as far as I can tell at first glance, no. What you are essentially
> asking for is the ability to pass MPlayer a list of directories and have
> it rescan the directories and randomly choose a file from them every
> time it finishes playing one.

   No, it is not random. It is based on the file creation time. Mplayer 
should pick only those files which were created in last 5 minutes. OR pick 
those file which were created after the time when mplayer created its 
playlist.


> I do not think that the kind of functionality which would be necessary 
> to support that really belongs in MPlayer.

   Well it's a matter of refreshing mplayers playlist, and I don't see who 
else can do it, if not mplayer.


> Ew. If you want to send a command to MPlayer, you should do it not with
> signals but with slave mode.

   Erm...I don't know about slave mode. What is it?


> When you add a new file to the directory, add it to the text file.
>
> When you want to refresh the playlist, send the slave command 'loadlist
> <file> 0'; this should load the specified playlist file in place of the
> current playlist. It will stop playback of the current song and start on
> the first of the new playlist, but other than that I think it should fit
> your need.

   Ah, how is it different than restarting the mplayer? I don't want to do 
that.


Thank you!
-- 
regards
    -P J P
http://www.cdacbangalore.in/~prasad
PS: Please don't send me html/attachment/Fwd mails



More information about the MPlayer-users mailing list