Search code examples
ffmpegmp4mkv

Convert video files from mkv to mp4 w/ AC3


The new spatial audio feature came out on the airpods and I'd like to convert my current 5.1 mkv files to mp4 files with AC3, since it is the only file format supported for spatial audio. I'm unfamiliar with ffmpeg, and would like help on how to convert my files.


Solution

  • The answer to this question is everywhere on the internet, for example there.

    You should use the acodec option to set your audio codec and the vcodec option to set your video codec. copy means you keep the same as the input.

    ffmpeg -i input.avi -acodec ac3 -vcodec copy out.mp4
    

    FYI : ac3 is an audio codec, mp4 is a file format