Any advantage in recording in H.265?

Oh, I see what you’re saying now.

The answer is dependent on this variable… Is the source video visually lossless or not? (Not bit-for-bit mathematically exact lossless, but simply indistinguishable from a perfect original to the human eye. No obvious compression artefacts.)

If the source is visually lossless (or close enough), then it can be encoded to any other format without any reservation or quality concern. The VP9 re-encoding created by YouTube would look basically the same regardless of whether the source file was H.264, H.265, or VP9, because all three of those formats would be producing the same visually lossless image as a source for re-encoding. The more bitrate codecs are given, the more equal they become until they all hit lossless mode and truly are equal.

However, if the source has noticeable compression artefacts in it (like macroblocks, color smearing, etc), then there can be a small benefit to using the same codec for both input and output (where “input” means the file exported from Shotcut and “output” means the re-encoding of it created by YouTube). This is because the codec of the input video has already stripped color and detail out of the video to get high compression (hence the artefacts), and re-encoding the video with the same codec is likely to say “everything I would normally strip out to get the size down has already been stripped out, so I’ll leave the remaining stuff the way it is”. However, if the input was libx264 and the output was VP9, then VP9 will take an entirely different approach to stripping data out of the image, and we will see cumulative loss from both the libx264 input and VP9 output codecs.

Summary: For best quality, videos should be sent to YouTube at the visually lossless level (such as CRF 16 / quality 68% using libx264) so that re-encoding doesn’t amplify any existing artefacts. However, if videos are exported from Shotcut at less-than-lossless quality, then some guesswork has to be done to match the re-encoding format of YouTube:

  • Videos with lower resolution than 4K are re-encoded by YouTube with H.264 unless the channel is considered popular by their standards, and then it goes to VP9 or is given a higher H.264 bitrate. I’m not sure how they decide which format to use.

  • Videos at 4K or higher go straight to VP9 whether a channel is popular or not.

I’m not aware of YouTube ever sending H.265 to a browser, so I would avoid it as a less-than-lossless Shotcut export format because it’s a guaranteed codec mismatch to YouTube. H.265 and VP9 have some similarities, but ultimately still take different approaches to stripping detail from an image to get the size down and will create cumulative loss. However, H.265 would be okay if exported at a visually lossless level, such as CRF 18 / quality 64% with preset Slow.

As for the drone’s capture format, use whichever codec looks better. Shotcut needs access to the best looking source it can get regardless of format.

1 Like