mplayer streaming: no gap between files

Trying to play some files with mplayer from a remote location, I noticed that there was a gap between the files in the playlist because of buffering of the individual files. I do not know if this is an overkill, but after playing around I ended to the following solution. It does not have the flexibility of playing individual files in a row (you cannot move), but it solves the gap problem. In the example the remote location is mounted on a local directory.

curl $(ls -d /mnt/filedir/* | sed 's|^|file://|' | tr "\n" " ") | mplayer -cache 8192 -

Leave a Reply

Your email address will not be published. Required fields are marked *