[FFmpeg-user] Making streams "non-default"

Carl Eugen Hoyos cehoyos at ag.or.at
Sun Jan 27 17:26:02 CET 2013


 <shashchatterjee <at> aim.com> writes:

> ffmpeg -i myvideo.m2ts -map 0:0 -map 0:2 -map 0:1 -map 0:4 
> -map 0:5 -c:v copy -c:a copy -c:s copy myvideo.mkv
> 
> Here's the output (quit the transcoding prematurely to 
> shorten the time):
> 
> Input #0, matroska,webm, from 'myvideo.mkv':
>   Metadata:
>     ENCODER         : Lavf54.61.101
>   Duration: 00:05:58.15, start: 0.000000, bitrate: 29627 kb/s
>     Stream #0:0: Video: h264 (High), yuv420p, 1920x1080 
> [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95
> tbc (default)
>     Stream #0:1: Audio: ac3, 48000 Hz, 5.1(side), fltp, 640 kb/s (default)
>     Stream #0:2(eng): Audio: truehd, 48000 Hz, 5.1(side), s32 (default)
>     Stream #0:3(eng): Subtitle: hdmv_pgs_subtitle (default)
>     Stream #0:4(eng): Subtitle: hdmv_pgs_subtitle (default)
> 
> What options do I use to make the streams, particularly 
> the subtitle streams, not "default", as in the original?

After testing a bit:
mpegts does not know about "default" or "non-default" 
streams, mkv knows about this difference, the default 
value for the default flag in mkv is "default" (sorry).

So while there is a problem when you copy from mkv 
to mkv (see ticket #1815), I believe what you see 
when converting from mpegts to mkv is expected 
behaviour: Since mpegts does not set any streams 
to "default" or "non-default", all streams get 
the default value which is "default".
(This of course assumes that there really is no 
default flag in mpegts, if there is one, it is 
currently not supported in FFmpeg).

This is of course unrelated to the fact that 
ffmpeg (the command line application) currently 
does not allow to change the default (and the 
forced) stream afaict.

Please do not top-post on this mailing list, it 
is considered rude.

Carl Eugen



More information about the ffmpeg-user mailing list