[MPlayer-users] Feeding a video-only elemental stream (.264?) into mplayer via stdin?

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sat Aug 8 18:52:13 CEST 2015

On Wed, Aug 05, 2015 at 10:22:18PM -0700, Chris Markle wrote:
> Just trying to see here if something ought to be possible before
> trying lots of work to actually try it...
> Say I have a video-only elemental stream being created in real-time.
> (Not being completely familiar with terminology here by "video-only
> elemental stream" I mean the H.264 annex b form where the NALU's in
> the stream are demarcated by hex strings like 0x00000001 or 0x000001.
> It's just that, no container or anything else. I believe some people
> refer to this as having a ".264" file type.) If I can get that stream
> to come out as stdout from some program, can I pipe it in to mplayer
> stdin and play it (in real time while it's being created)?

It should just work on a basic level, though a fifo should be better
as you might have a hard time controlling MPlayer if you use stdin
for the stream...
-demuxer h264-es or something like that should make it work a bit
better at startup, mostly reducing the delay but also reducing the
risk of random failures (those _should_ not happen, but bugs exist).
If keeping in sync with the source is more important that video timing
you might want to use an option like -benchmark to disable MPlayer's
own timing.
Those are the primary things.

More information about the MPlayer-users mailing list