[MPlayer-users] Mplayer playlist question

The Wanderer inverseparadox at comcast.net
Fri Oct 12 12:58:15 CEST 2007

P J P wrote:

> Hello Wanderer,
> On Thu, 11 Oct 2007, The Wanderer wrote:
>> You originally requested the ability to have MPlayer "rescan" the
>> directory where the files are located, and add all of the new files
>> in it to the playlist.
> Right.
>> What your most recently quoted paragraph above seems to be
>> requesting is the ability to have MPlayer "rescan" the directory
>> and *replace* the playlist with all of the files which are new
>> enough.
> Replace? No, I never said(or meant) *replace*. That is definitely not
> what I want.

What you wrote was:

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

If MPlayer randomly chooses its next file from only the ones created
recently enough, then essentially its playlist consists only of the
files created recently enough. Therefore, if you want it to pick up only
recently-created files, you want it to replace the playlist with only
recently-created files.

Obviously enough, this is not what you are after, but the fact that you
tried to express it in the way that you did seems to indicate that you
were not understanding what I was trying to say.

>> Anything which is capable of handling playlists and invoking an
>> external program, for one thing. moosic is designed for exactly
>> that purpose.
>> For that matter, it could also be done with a wrapper script such
>> as my example one above, albeit in a cruder way given current
>> functionality.
>> Given that you are constantly talking about "refreshing" a
>> playlist, I do not think that you are using the concept of
>> "playlist" in the same way that MPlayer understands it. I do not,
>> however, presently have time to hash the matter out in detail; I
>> need to get ready for work.
> Erm, it seems that we have some disjoint view of this playlist. Let
> me try and explain:
> when I say refreshing mplayers playlist, I don't mean updating a file
> on my disk; that can be done by `ls $HOME/sng/newfile.mp3 >>
> mplayer.pls'.

Yes, I know.

> But, for mplayer to play this new file, it has to be there in it's
> *internal* playlist, right? A list, which I suppose mplayer creates
> when it reads a playlist file or the command line.

And how is MPlayer supposed to know what sources to use to update (or,
rather, re-create) this list?

MPlayer works with files (or, rather, streams), not with directories.
The most it can do in this respect is to take data from a text file and
treat it as a list of individual names.

If you want to manipulate MPlayer's "internal" playlist, then you have
to keep track of what you want to add to it (etc.) on your own, and even
then AFAIK you can only "add" or "replace wholesale" rather than being
able to e.g. selectively remove.

moosic, at least, is much more featureful in this respect, though this
is not terribly surprising as it is more or less a dedicated
playlist-managing program which does not have to worry about the actual
playback code.

> And for this effect to take place, at present, I have to restart the
> mplayer. Which I really don't see as usable solution.

I can see where you're coming from, but it doesn't seem like a terribly
big problem, to me.

>> <shrug> In some senses it may not be, but it is a cleaner solution
>> overall. If the functionality of the loadlist command were to be
>> extended as I suggested in my previous mail, then it would
>> accomplish what you want except for not being automatic
> Well, I only see some ray of light in this `loadlist' thing. I'll see
> how can I use it best.

'loadlist' presently does *not* provide the feature I was talking about;
I was suggesting that it would seem reasonable to ask for it to be
extended to provide that feature. At present, in order for 'loadlist' to
do what you want, you would need to keep track externally of which files
are new enough, and pass them and only them to 'loadlist'.

>> I would support a request for such an extension to loadlist, but as
>> a possible alternative and/or stopgap, I would really suggest that
>> you look into moosic and see if its feature set is enough to
>> satisfy you.
> Ummn, I don't feel very positive about doing such switch.

Who said anything about a switch? moosic is a playlist-handling program,
which can use any kind of program to handle the files to be played. You
could very easily use MPlayer as the actual playback program, and just
use moosic to handle the playlist.

It has the advantage that you can also use it to invoke other programs
to handle formats which MPlayer does not and never will support, such as

(For that matter, if you wanted to go far enough, you could add
image-file handling programs to it and use it as a somewhat crude
stand-in for a PowerPoint-esque presentation program - or at least a
slideshow player. That's orthogonal to the matter at hand, though.)

       The Wanderer

Warning: Simply because I argue an issue does not mean I agree with any
side of it.

Secrecy is the beginning of tyranny.

More information about the MPlayer-users mailing list