[FFmpeg-user] Low CPU HQ format for local streaming?

Moritz Barsnick barsnick at gmx.net
Wed Jul 1 00:47:05 EEST 2020


Hi Simon,
in addition to what Carl Eugen wrote:

On Tue, Jun 30, 2020 at 10:21:52 -0600, Simon Roberts wrote:
> I need to find an encoding, and presumably a file type, that a) works in a
> streaming format, and b) is as low CPU usage as possible. I don't believe I
> care about bandwidth, this is just shipped from one process to another and
> consumed in real time.
>
> I tried using rawvideo, but it crashes out. To distinguish the encoding
> side from the decoding side, I used this command line:
>
> ffmpeg -i capture-4chan.mov -c:v rawvideo -f mpegts - | cat /dev/null
>
> and these appear to be the lines of interest from the output (though I
> suspect it's simply that rawvideo doesn't have markers in it that allow a
> receiver to know what the heck it's looking at?)

If the container has information about the rawvideo, the receiver
should be able to play it.

> [mpegts @ 0x55f18d555440] Stream 0, codec rawvideo, is muxed as a private
> data stream and may not be recognized upon reading.
> av_interleaved_write_frame(): Broken pipe
> Error writing trailer of pipe:: Broken pipe

That happens because rawvideo is not a supported video codec in
MPEG-TS.

> I also tried using "copy" codec, that is in effect just sending the
> prores across the pipe, like this:
>
> ffmpeg -i capture-4chan.mov -c:v copy -c:a copy -f mpegts - | ffplay
> -analyzeduration 10 -f mpegts -
>
> But that complained too:
> [mpegts @ 0x5604ba2e85c0] Stream 0, codec prores, is muxed as a private
> data stream and may not be recognized upon reading.
> [mpegts @ 0x5604ba2e85c0] Stream 1, codec pcm_s16le, is muxed as a private
> data stream and may not be recognized upon reading.

And apparently neither are prores nor PCM audio supported codecs.

If you stream from ffmpeg to ffplay, the "nut" format may be a choice
for you. It streams well, and it handles rawvideo as well as prores and
PCM audio (I just tested with all of these).

Cheers,
Moritz


More information about the ffmpeg-user mailing list