Archive copies and platform uploads are 'files that may be encoded or edited again later'. Look at the worst frames, not just the mean VMAF, and leave headroom rather than squeezing the size.
The two uses have something in common: in both, this file is not the final version that people watch. An archive copy may be edited or re-encoded later, and a platform upload is re-encoded by the platform to its own specs (upload notes). For files like these, quality headroom comes before saving size.
-c copy.We recheck what we saw in The trap of averages with this site's numbers. In the vmaf-worst-frames measurement, looking at the 12 points whose mean VMAF is closest to 90, the gap between mean and minimum was 2.275–16.717. For riverbed at x264 CRF 26, the mean is 95.238 but the lowest frame is 78.521.
Source: vmaf-worst-frames-v1. Estimates interpolated between two adjacent measured points. The size ratio is the ratio of log-interpolated sizes.
In 9 of the 12 combinations, keeping 'min 90 or above' required a lower CRF than 'mean 95 or above'. On the other hand, for rush_hour with x264 and x265, once the mean hit 95 the minimum was already above 90. In other words, for some videos the mean is enough, and for others it isn't, and you can only tell which by measuring. The original's limitations section also notes that, because the minimum is decided by a single frame, it may be affected by the starting frame or scene changes.
# When you need wide compatibility with H.264
ffmpeg -i input.mov -c:v libx264 -preset slow -crf 18 -pix_fmt yuv420p -c:a copy archive.mkv
# When you want a smaller size and the playback device supports HEVC
ffmpeg -i input.mov -c:v libx265 -preset slow -crf 20 -pix_fmt yuv420p10le -c:a copy archive_hevc.mkvCRF 18 and 20 are only starting points taken from the low end of the range this site measured (x264 18–46, x265 20–48), not recommended values per type of video. In the same article, riverbed at x264 CRF 22 has a mean VMAF of 99.945 but a minimum of 86.33. For video you plan to archive, get a rough position with the CRF recommender, then check your own video using the method in Lesson 6.
Make files for platform upload close to the archive recipe above, but follow the platform's official upload guidelines for container, codec, frame rate, and resolution. This site does not list recommended bitrates for individual platforms, because the values change often. To check the codec and container, the video file info inspector is useful.
How far an archive CRF is worth lowering differed from video to video. In the high-quality CRF measurement, the highest x264 CRF at which even the bottom 5% of frames reach VMAF 99 or more was 25 or above for blue_sky (saturated to the end of the measured range), 22 for riverbed, 13 for pedestrian_area and 10 for rush_hour; going lower than that barely raised VMAF while the file size grew.
The effect where each time lossy-compressed video is lossy-compressed again, the quality is cut one more time.
A high-quality intermediate file uploaded on the assumption that a platform will re-encode it. It is not meant for final viewing.
In the vmaf-worst-frames measurement, riverbed x264 had CRF 26.1 to reach mean 95 and CRF 19.1 to reach min 90. What does this comparison suggest?
Which best describes the nature of a video file you upload to a platform?