How to remove one track from video file using ffmpeg?

后端 未结 3 1998
囚心锁ツ
囚心锁ツ 2020-12-07 23:05

How to remove only one track (not all) from video file container (.vob or .mkv) using ffmpeg?

I know I can just copy video (-c:v copy -an) and specific

3条回答
  •  醉梦人生
    2020-12-07 23:26

    You just solved my av1 muxing issue, which requires -map 0 to include the subtitle font from original-video.mkv.

    ffmpeg.exe -i original-video.mkv -i svt-av1.ivf -map 0 -map -0:v:0 -map 1:v:0 -c copy output.mkv
    

    -map 0 selects everything, including the subtitle font which is, erroneously, in the wrong stream of the input file. -map -0:v:0 remove all video. -map 1:v:0 re-adds video from second input, which is the re-encoded AV1 of original-video.mkv.

提交回复
热议问题