http://ffmpeg.org/ffmpeg.html#Advanced-options https://en.wikibooks.org/wiki/FFMPEG_An_Intermediate_Guide/subtitle_options#Import_a_subtitle_file_(copy_video/audio_streams,_without_re-encoding) https://trac.ffmpeg.org/wiki/ExtractSubtitles
-metadata title="My title"
ffmpeg -i input.mkv -map 0:v:0 -map 0:a:1 -map 0:a:0 -c copy output.mkv
Here's what -map does:
- The first part before the colon is the input ID. Since we only have one input, it's 0.
- The second part specfies the type of stream, video or audio. This is optional, but it's always a good idea to specify the type as well, in case that video and audio streams are not correctly multiplexed.
- The third part is the ID of the input stream. 0 will be first, and 1 the second, i.e. the first video stream and the second and first audio stream. The order of the -map options determines the order of the streams in the output file.
ffmpeg.exe -i input.mkv -an -vn -c:s srt subs.srt
ffmpeg.exe -i input.mkv -f srt -i subs.srt -map 0:0 -map 0:1 -map 0:2 -map 1:0 -c:v copy -c:a copy -c:s srt -metadata:s:s:0 language=fre output.mkv