[MPlayer-users] A strange problem with mplayer

Peter White peter.white at posteo.net
Sat Jul 18 05:03:43 CEST 2015

On 07/18/15 02:25, jd1008 wrote:
> I have about 7 files I downloaded from youtube using
> youtube-dl.
> my versions of youtube-dl and mplayer are:
> MPlayer SVN-r37150-4.8.3 (C) 2000-2014 MPlayer Team

That version is over a year old. Current trunk is at r37432.

> $ /bin/ls -1 *.mp4 | while read f; do^Jmplayer "$f"^Jdone
> bls -1 | while read f; do
> mplayer "$f"
> done

That's a fancy way of trying to do

$ mplayer *.mp4


Or what is the purpose of that script? Plus, it doesn't work.
Observe this for an illustration of what is going on:

$ touch 1.mp4 2.mp4 3.mp4
$ /bin/ls -1 *.mp4 | while read f; do cat; echo The End; done
The End

See how there is actual output of file names even though $f is never
read inside the while loop? Also note that the first .mp4 file is
missing from the output and 'The End' indeed only appears once.
It's the redirection of stdin through the pipe that's causing this.
Input is no longer coming from the keyboard but from ls.

> No bind found for key 'C'.
> A: 250.6 V: 250.6 A-V:  0.000 ct:  0.004   0/  0 18%  1%  0.7% 0 0
> ======= OK, so where is this 'C' coming from?? It is causing mplayer to
> exit with error
> and the whole little script exist.

In your case the first file name gets assigned to $f, mplayer starts to
play it and gets the characters of the following names as commands on
stdin. So that's where the 'C' is coming from, being that the next file
starts with that character.

The exit with error I can only explain by suggesting it being a bug in
that old mplayer version you are running which must have been fixed by
now, because I cannot reproduce it.
I have to say though, that I did not actually download your samples. I
simply created links to an existing .mp4 using your file list.
Another possibility would be a malformed file triggering a bug on
playback. But it is definitely not the 'C' causing the exit.

Anyway long story short, why not simply use

$ mplayer *.mp4

Or if you absolutely must use a fancy shell construct:
$ for f in *.mp4; do mplayer "$f"; done

But I truly cannot imagine why one would need to overcomplicate it. ;)


> Here is the list of the YT videos I downloaded using youtube-dl:
> Cathedral of the Madeleine Choir performing Ave verum corpus in
> Italy.-61AU1QzBNWM.mp4
> Cathedral of the Madeleine Choir performing Nativitie in Assisi,
> Italy.-WzIc2rTfUdI.mp4
> Choir of the Cathedral of the Madeleine performing Versa est in
> luctum.-37-pRMQJ9DQ.mp4
> Tantum Ergo - Cathedral of the Madeleine - Salt Lake City-u1GdRdKAEXg.mp4
> The Madeleine Choir School - A Ceremony of Carols - 2012-XCoOOGWOReA.mp4
> The Madeleine Choir School Ave Verum Corpus.mp4-ebqdqoUPD3Q.mp4
> _______________________________________________
> MPlayer-users mailing list
> MPlayer-users at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users

More information about the MPlayer-users mailing list