Transcoding mkv HEVC to mp4 HVC1 for iTunes

bpholt's picture

In case anyone ever needs to transcode a Matroska h.265 video file to a format supported by an Apple TV, this is how I do it with ffmpeg.

ffmpeg \
    -i {input}.mkv \
    -vcodec copy \
    -acodec ac3 \
    -tag:v hvc1 \   

QuickTime requires an HVC1 container as opposed to the default HEVC, so use -tag:v hvc1 with ffmpeg.

AppleTV / iTunes don't support DTS-HD, but ffmpeg can transcode DTS-HD to AC3, so set the audio codec to ac3 with -acodec ac3.