pattulus
12/7/2015 - 10:27 PM

MKV and AVI to MP4 Conversion for Apple TV

MKV and AVI to MP4 Conversion for Apple TV

# See also https://trac.ffmpeg.org/wiki/Encode/AAC

# direct copy
ffmpeg -i input.mkv -c:v copy -c:a copy output.mp4

# direct copy video, but convert audio to AAC with default variable bit rate 
ffmpeg -i input.mkv -c:v copy -c:a aac -strict experimental output.mp4

# direct copy video, but convert audio to AAC with constant bit rate
ffmpeg -i input.mkv -c:v copy -c:a aac -strict experimental -b:a 320k output.mp4

# lossy but decent conversion with constant bit rate audio
# http://superuser.com/questions/525249/convert-avi-to-mp4-keeping-the-same-quality
ffmpeg -i input.avi -c:v libx264 -crf 19 -preset slow -c:a aac -strict experimental -b:a 192k -ac 2 out.mp4