[MPlayer-users] How do you play raw h.264 files in mplayer?

David wizzardx at gmail.com
Fri Aug 12 13:59:44 CEST 2011


I figured out one of those problems: mplayer taking a long time to
start video playback from a .h264 file on the stream.

I think mplayer is trying to detect the stream type by jumping around
the input file to read data, and failing in that repeatedly (because
it's a pipe/linear stream, not a regular file), until it gets lucky
(sometimes but not always) and it finds a "magic number" in the stream
that identifies it as h264.

So I'm able to make mplayer playback from the stream immediately, by
adding a "-demuxer h264es" option, like this:

./test.py | mplayer -fps 25 -demuxer h264es -

I guess my main remaining problem is how to make mplayer automatically
adapt it's fps to slow down if it's getting too close to the end of
the stream (to avoid jerking (going too far and then stopping to
wait), or getting "behind" the current footage).

Is that even possible with mplayer? Or, any other ideas for how to handle that?

(the main thing I can think of is making my own player that
dynamically updates the FPS based on how fast an unplayed buffer is
filling up/being eaten, but I'd prefer to use mplayer if possible)

Thanks,

David

PS: Sorry for the mailing list spamming. Maybe some later people doing
web searches will find this useful at least.


More information about the MPlayer-users mailing list