使用FFmpeg转码4K视频为H.265/HEVC后,QuickTime无法播放求助
Hey there! I’ve run into this exact issue with QuickTime and HEVC before—let’s get your video playing properly.
Why This Happens
QuickTime is pretty picky about HEVC in .mov containers. It’s not enough to just change the file extension or re-wrap the stream; it requires specific encoding tags and compatible pixel/audio formats. The key missing piece here is usually the hvc1 video tag (instead of the default hev1 that FFmpeg uses for HEVC), plus ensuring your pixel format and audio codec are QuickTime-friendly.
Step 1: Check Your Original Video’s Details
First, let’s confirm what we’re working with. Run this command to get info about your encoded video:
ffmpeg -i input.mp4
Look for these details in the output:
- Video
Profile(e.g., Main 10 is fine for QuickTime) Pixel format(needs to beyuv420poryuv420p10le—QuickTime rejects other formats likeyuv422p)- Audio codec (QuickTime prefers AAC-LC; if yours is MP3 or something else, we’ll need to transcode it)
Step 2: Fix the Video (Two Options)
Option 1: Re-Encode for Full QuickTime Compatibility
If your original HEVC settings aren’t QuickTime-friendly (e.g., wrong pixel format or tag), use this command to re-encode and wrap correctly:
ffmpeg -i input.mp4 -c:v libx265 -crf 28 -preset medium -pix_fmt yuv420p10le -tag:v hvc1 -c:a aac -b:a 192k -movflags +faststart output.mov
Let’s break down the key parts:
-crf 28: Balances quality and file size (lower = better quality, higher = smaller file; 28 is a good starting point)-preset medium: Tradeoff between encoding speed and compression efficiency (useslowfor smaller files,fastfor quicker encoding)-pix_fmt yuv420p10le: 10-bit pixel format that QuickTime fully supports-tag:v hvc1: Critical tag that tells QuickTime this is a compatible HEVC stream-c:a aac -b:a 192k: Converts audio to AAC (QuickTime’s native supported codec)-movflags +faststart: Optimizes the file so QuickTime can start playing faster without waiting for the whole file to load
Option 2: Re-Wrap (No Re-Encoding, Faster)
If your original HEVC stream is already compatible (correct pixel format, profile), you can just fix the tag and re-wrap without re-encoding (saves tons of time):
ffmpeg -i input.mp4 -c copy -tag:v hvc1 -movflags +faststart output.mov
The -c copy flag tells FFmpeg to copy the streams directly instead of re-encoding—perfect if the only issue is the missing hvc1 tag.
Step 3: Verify the Output
After running either command, open output.mov in QuickTime. If it still doesn’t play, double-check the pixel format from Step 1—QuickTime won’t play HEVC with non-4:2:0 chroma subsampling (like 4:2:2 or 4:4:4).
内容的提问来源于stack exchange,提问作者rgov

