1

Can I transcode video from h.265 to h.264 without loosing quality?

My instinct is that it should be fine, that with approximate quality settings the new files will be the same quality but larger file size. Or am I wrong, does transcoding from one codec to another follow the principle of "copy of a copy always means lower quality"?

5

Generally, H.264 and H.265 (as well as others like VP9) are lossy codecs, at least in their default settings with most encoders. This means that whenever you re-encode from one to another (or even in the same codec), you throw away information.

Whether this information loss is visible or not depends on your source material and the chosen settings, of course.

To combat the loss of information, you often need to choose a higher bitrate than what your input is, or a higher constant-quality setting than the default of the respective encoders. There is no "general principle" here – it really depends on what the default bitrates or quality targets are for the encoders you're using.

Can I transcode video from h.265 to h.264 without losing quality?

Yes, you can. There are two ways to do that, depending on how you define "losing quality":

  • You can enable a lossless mode for these codecs, at least with the x264, x265 or libvpx encoders. This will perform lossless transforms without quantization and disable color subsampling (i.e., 4:4:4 output). The output is mathematically lossless. If you do not have to use H.264 or H.265 specifically, other lossless codecs such as HuffYUV or FFV1 exist.

  • You can try to find the threshold where any (mathematical) quality loss is not visible anymore to human subjects, that is, within the range of a Just Noticeable Difference. This requires a bit of testing with different settings and repeated viewings. Some codecs are better at this, in terms of their default settings, like ProRes, DNxHD, etc.

For more info, read this: ffmpeg settings for converting still images to video for archival

| improve this answer | |
  • You mean "H.264 and H.26*5*" in the first sentence, right? – Michael Liebman Jun 7 '17 at 22:45
  • Very informative. I'm curious to see what the file size difference will be if I convert from lossy to lossless. I suspect I'll be visually looking for that threshold you mention. – John Jun 8 '17 at 21:11
  • that ffmpeg settings link has really good info, thx vm! – Aquarius Power Feb 8 '19 at 22:40
0

Both h.265 and h.264 are compressed codecs so there will loss; due to compression; whether it's visible to the naked eye or not.

The only way to not lose quality is to output to a lossless codec at 4:4:4.

This results in large files. A common codec for this is Quicktime Animation Codec at 100 Quality. 100% Lossless.

| improve this answer | |
  • 2
    H.264 and H.265 both have lossless modes (@4:2:0/2, not just 4:4:4) – Gyan Jun 7 '17 at 8:03
  • I stand corrected then... I have never tried, is this possible from within the adobe platform or is ffmpeg required? – McFlySoHigh Jun 7 '17 at 8:28
  • 1
    ffmpeg and x264/x265 standalone- yes; Adobe - don't know but doubt it. – Gyan Jun 7 '17 at 8:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.