Discussion:
[MPlayer-users] Feeding a video-only elemental stream (.264?) into mplayer via stdin?
Chris Markle
2015-08-06 05:22:18 UTC
Permalink
Folks,

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)?

If so, can I get some hints as to how specifically to do this?

Thanks in advance.

Chris
Reimar Döffinger
2015-08-08 16:52:13 UTC
Permalink
Post by Chris Markle
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.

Loading...