0

I've been using this to convert the first audio track to AC3:

ffmpeg -i FILE.mkv -map 0:v -map 0:a:0 -map 0:s -c copy -c:a ac3 -b:a 640k FILE-AC3.mkv

And it has been working great.

I wanted to know what to add or change if I wanted a resulting file with nothing else except the video and the converted audio (and removes all subtitles, tags, global tags, chapters, etc.)

Thanks in advance.

1 Answer 1

2

Use

ffmpeg -i FILE.mkv -map 0:v -map 0:a:0 -c copy -c:a ac3 -b:a 640k -map_metadata -1 FILE-AC3.mkv

4
  • Thanks! It worked converting and removing the subtitles. But the resulting file has tags. Like this: ibb.co/yYykSW8
    – tomcar
    Commented Dec 2, 2019 at 11:19
  • You can add -bitexact to remove some of those tags, but ffmpeg will add a couple of its own encoder/muxer IDs and don't believe that can be avoided.
    – Gyan
    Commented Dec 2, 2019 at 11:32
  • I understand. Thanks. In order to use it in a batch file, does this look good? for %%a in (*.mkv) do ffmpeg -y -i "%%a" -map 0:v -map 0:a:0 -c copy -c:a ac3 -b:a 640k -map_metadata -1 "output_%%~na.mkv" Where should I add -bitexact?
    – tomcar
    Commented Dec 2, 2019 at 11:58
  • Anywhere after the input filename and before the output filename.
    – Gyan
    Commented Dec 2, 2019 at 13:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .