[FFmpeg-user] Copy all subtitle streams? Possible?

Ted Park kumowoon1025 at gmail.com
Mon Mar 30 08:26:35 EEST 2020


> '-c:a copy' or '-acodec copy' will copy (all?) audio tracks. I have 2 questions:
> Do I need to also specify a '-map' directive? and
> Is there an equivalent directive for copying subtitle streams?

IIRC, -codec only specifies the codec, and stream selection is done by -map, except when you explicitly specify an encoder for a stream type and there is at least one stream that matches that specifier, then it will select one of that stream as well, according to the normal stream selection rules, in addition to the ones already selected.

So it might stream copy one audio track to the output when it wasn’t before at most, which might have been all of them for many input files. But I don’t think there is a muxer that only selects a video stream by default and also has a default audio stream encoder.  I think it’s more of a convenience feature for subtitles, since if you specify a subtitle format then you obviously want at least one subtitle track included in the output and you probably picked a compatible format at that.

Ted Park

More information about the ffmpeg-user mailing list