[FFmpeg-user] one question about multiple stream in single file

Moritz Barsnick barsnick at gmx.net
Fri May 13 10:45:49 CEST 2016


On Fri, May 13, 2016 at 12:02:52 +0800, qw wrote:
> I know there maybe multiple audio streams in single file, because each audio stream has different channel, quality or language.
> Is it likely that there is multiple video streams in single file? I haven't seen it before.

It's totally possible. Whether it's likely depends on what you mean. I
can create a sample for you, and it will be 100 % likely to have two
video streams. ;-) [1]

DVDs/Blu Rays use it for various angles. MPEG Transport Streams have
this when carrying multiple programs. HLS has this, but technically,
it's a bit like a playlist, and there are then several separate streams
each one layer deeper which resolve to e.g. segmented MPEG-TS with only
one video stream each. (ffmpeg's demuxer still presents you a multitude
of video and audio streams on the top level HLS.))

Nonetheless, if you're implementing something to handle streams, you'll
need to at least be able to ignore, better even select multiple video
streams.

Moritz

[1] ffmpeg -f lavfi -i testsrc -f lavfi -i testsrc2 -map 0 -map 1 -t 1 ~/tmp/test.mp4


More information about the ffmpeg-user mailing list