Log in

View Full Version : AVC to HEVC transcoding advice for low bitrate sources


Marsu42
16th February 2020, 21:31
I'm currently trancoding a video archive to save space. The videos are AVC with vastly different bitrates from 1.5 to 15 MBps, usually with little motion.

With my former, extremely old PC (Core1 Quad) using x265 was a no-go. With my more currrent PC (Haswell Dual) I could switch if there is a clear advantage. Yes, I know, your boxes are waaaaaaaay faster.

I'm downsizing to 720p to save some further space and because my usual monitor isn't full hd anyway.

=> QUESTION: Is there a low source bitrate threshold like 3-5 MBps that could result in _worse_ transcoding quality AVC=>HEVC than AVC=>AVC? Or is HEVC encoding too similar to AVC so it doesn't make a difference? Or does HEVC result in significantly enhanced quality in transcoding in any case?

I'm thinking of the different artifact types, which is why transcoding different image formats like dct-jpeg and wavelet-jpeg2000 isn't a good idea with low quality sources.

foxyshadis
19th February 2020, 13:39
If you need to save space, you need to save space. If you're very concerned about transcoding artifacts, you should get a cheap 6TB drive and just offload all the things you'll rarely want to watch.

That said, although 1.5 MBps is pretty close to the limit of watchable quality h.264 1080p and 15MBps is way overkill for my tastes, if you're going to downsample it to 720p and put everything at an even ~1MBps, you won't get much better results with HEVC than AVC, unless you have a high tolerance for blur. At that point you pick your poison, and it might come down to the codec you have a hardware decoder for on every device. There's no easy threshold where x265 gets better or worse than x264, but there are definitely times when you have to pick what you sacrifice as you pile on the bit pressure. Overall, x264 is tuned by default for a noisier, sharper picture. x265 is tuned by default for softer, smaller pictures. You can get in deep to adjust either one, but if you're going to crank out a bunch of 720p vids, it'd be easier to decide what you like up-front and just go with that.

FranceBB
19th February 2020, 17:10
=> QUESTION: Is there a low source bitrate threshold like 3-5 MBps that could result in _worse_ transcoding quality AVC=>HEVC than AVC=>AVC? Or is HEVC encoding too similar to AVC so it doesn't make a difference?
I'm thinking of the different artifact types, which is why transcoding different image formats like dct-jpeg and wavelet-jpeg2000 isn't a good idea with low quality sources.

I got what you mean, but most of the time it's not a matter of codecs, it's a matter of transform.
The reason you get way worse result if you encode an image in JPEG first and then JPEG2000 is that JPEG uses the Discrete Cosine Transform while JPEG2000 uses the Wavelet Transform, so you'll end up with the worse of them both. Anyway, in case of H.264 and HEVC, the Transforms are quite similar: DCT and Hadamard for H.264, DCT and DST for H.265 HEVC, so you won't notice an added detail loss caused by the math behind it if you use H.265 instead of H.264 or vice-versa but you will see the one introduced by the fact that you're making the lossy of the lossy, so quantization etc (i.e you're gonna lose something anyway no matter what). The thing is that linear algebra wise, though, you're fine; I hope that answers your question.

burnix
4th June 2020, 15:22
If you have to re-encode to save space and all video are similar content just use x265 (not intel qsv) in crf mode. You can obtain some good result.

Or for a few bucks just buy a nvidia 1050 card and use ffmpeg + nvenc + vbrhq 800kbps. For 720p that ok.

I use ffmpeg + nvenc + vbrhq 900kbps on hdtv recording (i let in 1920*1080) and on 42' screen is was ok (some block on ultra move scene)

RanmaCanada
4th June 2020, 18:36
If you have to re-encode to save space and all video are similar content just use x265 (not intel qsv) in crf mode. You can obtain some good result.

Or for a few bucks just buy a nvidia 1050 card and use ffmpeg + nvenc + vbrhq 800kbps. For 720p that ok.

I use ffmpeg + nvenc + vbrhq 900kbps on hdtv recording (i let in 1920*1080) and on 42' screen is was ok (some block on ultra move scene)

Instead they should get a Turing based card as it has B frame support. Also a more updated encode engine. I believe a 1660 is the bare minimum.

https://developer.nvidia.com/video-encode-decode-gpu-support-matrix