Mac Hardware H.264 vs x264 at the Same Bitrate on Three 10-Second Clips: 28-45% of the Time, 1.6-6.4 VMAF Lower

On an Apple Silicon Mac, FFmpeg can hand H.264 encoding to the chip's hardware encoder with -c:v h264_videotoolbox instead of the software encoder libx264. Is that a free speed-up for a finished vertical video, or do you pay for it in the file? On November 28, 2026, we encoded the first 10 seconds of three of our own finished 1080x1920 videos both ways, gave the hardware encoder the same bitrate that x264 had used, and scored every file with VMAF against a lossless copy of the same 10 seconds.

Short answer from these three samples: at the same bitrate, the hardware H.264 encode finished in 28% to 45% of x264 medium's time, and it scored 1.6 to 6.4 VMAF points lower. Given 1.5 times the bitrate it was still 0.1 to 2.9 points lower. Given twice the bitrate it was 0.53 points higher on one clip and 0.35 and 1.47 points lower on the other two. The hardware HEVC encoder at the same bitrate target came closer: 0.03 to 2.50 points below x264. So in this test the hardware encoder traded bytes for time; it was not a like-for-like replacement at the same file size.

What we ran

  • Machine: Apple M5 Pro, macOS 26.6.2. FFmpeg: ffmpeg version 9.0.1 with libx264, VideoToolbox and libvmaf.
  • Three sources, all our own finished 1080x1920 videos: an AI character clip (24 fps, no on-screen text), an AI-assisted product short with large burned-in captions (30 fps), and a science Short built on public NASA footage with our captions (30 fps). These are the same three files as in our x264 preset test.
  • For each source we decoded the first 10 seconds to a lossless FFV1 file and used that as both the encoder input and the reference.
  • Baseline: -c:v libx264 -preset medium -crf 23 -pix_fmt yuv420p, no audio. We measured the average bitrate of that file for each clip.
  • Hardware H.264: -c:v h264_videotoolbox -b:v N -pix_fmt yuv420p, where N was 1.0, 1.5 and 2.0 times the x264 bitrate for the same clip. No other encoder options.
  • Hardware HEVC: -c:v hevc_videotoolbox -b:v N -tag:v hvc1 -pix_fmt yuv420p at 1.0 times the x264 bitrate.
  • Every setting was encoded three times. Times are the median wall-clock seconds of the three runs and include decoding the lossless input. The three runs produced the same file size every time, and we scored the file from the third run. Scores: default VMAF model through FFmpeg's libvmaf filter.

Results, compared with x264 medium at CRF 23

EncodeAI character clipProduct short with captionsNASA footage Short
x264 medium, CRF 23 (baseline)4.49 MB, 4.16 s, VMAF 81.358.47 MB, 5.29 s, VMAF 83.492.53 MB, 2.66 s, VMAF 92.48
Hardware H.264, same bitrate+1.6% size, time ratio 0.28, VMAF −1.59+1.9% size, time ratio 0.29, VMAF −4.62+1.8% size, time ratio 0.45, VMAF −6.44
Hardware H.264, 1.5 times the bitrate+52.1% size, time ratio 0.30, VMAF −0.08+52.8% size, time ratio 0.29, VMAF −1.62+52.3% size, time ratio 0.45, VMAF −2.93
Hardware H.264, twice the bitrate+103.0% size, time ratio 0.27, VMAF +0.53+103.5% size, time ratio 0.28, VMAF −0.35+103.1% size, time ratio 0.46, VMAF −1.47
Hardware HEVC, same bitrate+1.8% size, time ratio 0.28, VMAF −0.03+2.6% size, time ratio 0.28, VMAF −1.76+10.6% size, time ratio 0.48, VMAF −2.50

The baseline row shows absolute numbers; every other cell is relative to the baseline for the same clip. A time ratio of 0.28 means the encode took 28% as long as x264 medium. The hardware encodes took between 1.11 and 1.54 seconds for 10 seconds of video, whatever the bitrate. The hardware files came out slightly above the bitrate we asked for: 1.6% to 2.6% larger than the x264 file at the same-bitrate setting, except the HEVC encode of the NASA footage clip, which was 10.6% larger.

What this means for a creator exporting Shorts

  • For a quick draft or review copy, the hardware encoder saved time here. At the same bitrate, hardware H.264 finished in 28% to 45% of x264 medium's time (27% to 48% across all the hardware settings we tested). On a 10-second clip that saved 1.4 to 3.8 seconds; on long exports or batches the same ratio would matter more, though we only timed 10-second clips.
  • Do not expect the same score at the same file size. At matched bitrate, hardware H.264 was 1.6 to 6.4 VMAF points below x264 medium. The NASA footage clip, which x264 compressed to the lowest bitrate of the three, showed the largest gap.
  • Spending more bitrate narrowed the gap, unevenly. At twice the bitrate the AI character clip scored 0.53 points above the x264 file, while the NASA footage clip was still 1.47 points below it with a file twice the size.
  • Hardware HEVC got closer at the same bitrate target (0.03 to 2.50 points below x264, though its NASA footage file came out 10.6% larger), but it is a different codec. Check that the place you upload to or the device you play on accepts HEVC before choosing it.
  • Platforms re-encode what you upload, so these scores describe the file you hand over, not what viewers finally see.

Limits of this test

  • Three 10-second clips on one machine. Other Apple chips, macOS versions and FFmpeg builds may behave differently.
  • The two encoders used different rate control: x264 ran in constant-quality mode (CRF), and the hardware encoder was given an average bitrate target. We matched bitrate, not settings.
  • We left the hardware encoder on its defaults. We did not test its quality-based mode, profile options or the prio_speed option, and we did not test x265 or slower x264 presets against it.
  • Times include decoding the lossless input and writing the file, so they are not pure encoder speed. Short clips also make start-up time a larger share of the total.
  • The references were decoded from our already-compressed finished files, not from original render masters. We used the default VMAF model, not the phone-viewing model, and VMAF is a computed score, not a viewing test.

Related tests on this site

Sources checked

Apple's VideoToolbox documentation describes the framework as giving direct access to hardware encoders and decoders. On our build, ffmpeg -h encoder=h264_videotoolbox and ffmpeg -h encoder=hevc_videotoolbox both list allow_sw (allow software encoding) as off by default; we saved that output with the run log and passed -allow_sw to neither encoder. The crf and preset options are in the libx264 section of the official FFmpeg codecs documentation, and VMAF scoring used the libvmaf filter described in the FFmpeg filters documentation. Every size, time and score above comes from our own run log.

Prepared with AI assistance from our own local test log. Two of the source videos contain AI-generated imagery; one uses public NASA footage. No sponsor, and no affiliate links in this post.

Comments

Popular posts from this blog

FFmpeg Shows −1.5 dBTP. Did You Actually Fix the Audio?

VoxCPM2 vs ElevenLabs for a 30-Second Science Short: We Timed Both on the Same Script

Before You Upload an AI Song or Video: The Checks We Run (Free Commands)