
In the example above, I have used the default CRF value of 28 (for H.264, the default was 23 which, according to FFmpeg’s encoding guide, should be visually equivalent). The number after -crf defines the video quality of the resulting file. You can check your FFmpeg version by running ffmpeg without any parameters. If you’re on an older version, this might not work. Note: I’m using FFmpeg Version 4.1.1 here.

We can do this with the following command (assuming your original file is called input.avi): ffmpeg -i input.avi -c:v libx265 -crf 28 -c:a aac -b:a 128k -tag:v hvc1 output.mp4 To make it Apple-friendly, we’ll need to add an “hvc1” tag. However, when simply using the HEVC encoding command suggested in the FFmpeg H.265 Encoding Guide, you will notice that the resulting video file won’t have a thumbnail icon in Finder and won’t play in QuickTime Player or on any iDevice (it will play in VLC though).

Using FFmpeg to Convert to HEVCįFmpeg is the utility when it comes to converting video or audio files. Since my goal is to import those videos into iCloud Photos, I needed to find a suitable format to transcode to. In this format, 60 minutes need around 13 GB, which is fine for high-quality long-term archival, but not for quick access from everywhere. I had digitalized those tapes in 2008 using a more modern Hi8 camcorder with digital output, resulting in DV-encoded AVI files. I have hours of home video material lying around on my file server, recorded with an ancient Hi8 camcorder back in the 90s.

My Usecase: Old DV Material in iCloud Photos Use the -tag:v hvc1 parameter in your FFmpeg command make your HEVC file work on Apple devices.įull example: ffmpeg -i input.avi -c:v libx265 -crf 28 -c:a aac -b:a 128k -tag:v hvc1 output.mp4 FFmpeg can create those files, however, a certain tag is needed for the files to be recognized by Apple software. Apple’s operating systems natively support HEVC since iOS 11 and macOS High Serria. HEVC (High Efficiency Video Coding), also known as H.265, is a video compression standard that, compared to it predecessor H.264, offers from 25 % to 50 % better data compression at the same level of video quality.
