Skip to content

fix: use hvc1 codec tag for HEVC output on macOS#123

Open
sjhddh wants to merge 1 commit intocodeforreal1:mainfrom
sjhddh:fix/hevc-hvc1-codec-tag
Open

fix: use hvc1 codec tag for HEVC output on macOS#123
sjhddh wants to merge 1 commit intocodeforreal1:mainfrom
sjhddh:fix/hevc-hvc1-codec-tag

Conversation

@sjhddh
Copy link
Copy Markdown

@sjhddh sjhddh commented Apr 11, 2026

Summary

  • Fixes HEVC-compressed videos having no thumbnails in macOS Finder and failing QuickLook preview
  • ffmpeg defaults to hev1 codec tag for HEVC, but Apple's AVFoundation only recognizes hvc1
  • Appends -tag:v:0 hvc1 when output codec is HEVC and container is MP4/MOV

Changes

  • Added 8 lines in src-tauri/src/core/ffmpeg.rs after the video codec is set
  • Detects HEVC codec (checks for "265" or "hevc" in codec string)
  • Only applies to MP4/MOV containers where the tag matters
  • Zero-cost metadata-only change — no impact on quality, file size, or encoding speed
  • Non-Apple players accept both hev1 and hvc1 equally

Test plan

  • cargo check passes
  • Compress a video with HEVC codec to MP4 on macOS
  • Verify thumbnail appears in Finder
  • Verify QuickLook (spacebar) works
  • Verify playback in VLC/mpv still works

Fixes #122

ffmpeg writes the hev1 codec tag by default for HEVC streams, but
Apple's AVFoundation (Finder, QuickLook, QuickTime, Photos) only
recognizes hvc1. This causes compressed HEVC videos to have no
thumbnails and fail QuickLook preview on macOS.

Appends -tag:v:0 hvc1 when the output codec is HEVC and the container
is MP4 or MOV. Zero-cost metadata-only change with no impact on quality,
file size, or encoding speed.

Fixes codeforreal1#122
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HEVC output uses hev1 codec tag, breaking macOS Finder thumbnails and QuickLook

1 participant