# ffplay with playlist¶

Unfortunately, what I’m about to write here will definitely disappoint you.

“ffplay” does not have a so-called “playlist” mechanism. Here are two possible alternative approaches, both of which have fatal problems and won’t satisfy you. Even so, it may be useful in some cases, so let me introduce it.

The first idea, of course, is not to rely on ffplay. That is, the idea is realized by controlling with a Unix shell or the like. All you need to do this is the ffplay option “-autoexit”. If this is not given, continuous playback cannot be realized.:

[me@host: Videos]$for i in *.mp3 ; do ffplay -i "$i" -autoexit ; done


If you think of a “playlist”, you can think of this shell script itself as a playlist. But, a serious problem with this approach is exposed in full screen mode:

[me@host: Videos]$for i in *.mp3 ; do ffplay -i "$i" -autoexit -fs ; done


The full screen will end at the end of each video, which shouldn’t normally be the behavior you want.

Another approach is to use the “concat demuxer”.

[me@host: Videos]$cat playlist.txt file '01.mp3' file '02.mp3' file '03.mp3' [me@host: Videos]$ ffplay -f concat -safe 0 -i playlist.txt -autoexit -fs


With this approach, there are no full-screen issues. However, you cannot perform any seek operations during this session.

By the way, I’ve written a python script to generate playlists for multiple media players, including ffplay, so let me introduce you.