When you’re on a Mac with Retina Display (HiDPI), and you make a screen recording using QuickTime Player, whenever that video is played in QuickTime Player, it is shown with the expected 2:1 pixel density.
However, if you attempt to re-encode this video using ffmpeg (like in this question on Stack Overflow) the outputted file will instead be played back at a too-big/fuzzy 1:1 pixel density.
Also, if you attempt to play the QuickTime-generated screen recording in a player like VLC, you’ll notice it plays at the blurry 1:1 instead of the sharp 2:1. So it seems like there’s a feature in QuickTime Player that knows this video was captured at a 2x pixel density, so it needs to be played-back at a 2x pixel density.
How does QuickTime Player know when to play a video back in HiDPI/Retina mode? Is there some special metadata that’s written to the file?
How to reproduce:
- Use QuickTime Player to create a Screen Recording on a Retina Mac.
- Play the video you recorded in QuickTime Player using the
⌘1 Actual Size
view. Notice that it’s playing 2:1 on your Retina Display, so the video looks sharp. It’s playing in half the space of the actual recorded pixels. Use ffmpeg to encode the video using a command like this:
ffmpeg -i retina_sample.mov -c:v libx264 -crf 23 retina_sample_compressed.mov
- Play the new ffmpeg-compressed video in QuickTime Player using the
⌘1 Actual Size
view. Notice that it’s playing 1:1, so the video looks fuzzy.
To clarify, the video does not look blurry because it was compressed. Rather, it looks blurry because the video is being played twice as big as it should be, at a 1:1 pixel density, instead of the required 2:1 pixel density, presumably because some metadata is being discarded when encoding.
Here are links to example videos: