Page 1 of 1

Handbrake and AMD Ryzen 3900x

Posted: Thu Aug 27, 2020 9:30 am
by Nejiro
Greetings to all, I'm new to the forum and I wanted some clarification ..... I use Ubuntu 20.04 LTS and I almost always encode 1080p h264 movies in h265 1080p, the CPU is not used at 100% and the encoding time is more or less as the duration of the movie, while I encode I can do all the other things with the pc, so that's fine, the problem is if I insert the Denoise / NLMeans / Ultralight filter in an encoding, the cpu usage goes up to 100% and the pc slows down a lot, becomes almost unusable, the encoding time triples, I wanted to ask you if this is normal .....
Thank you

Re: Handbrake and AMD Ryzen 3900x

Posted: Thu Aug 27, 2020 1:20 pm
by Woodstock
Any filter will slow the encode, simply because the encode process has to wait from the data to emerge from it. The comb-detect filter can slow the decoding by 5-10%, depending on the source, even if there is no combing detected.

NLmeans is not a light-weight filter, when it comes to CPU usage.

Re: Handbrake and AMD Ryzen 3900x

Posted: Thu Aug 27, 2020 3:36 pm
by mduell
NLMeans is slow. Use it if you need it, and it does amazing things, but skip it otherwise.

Re: Handbrake and AMD Ryzen 3900x

Posted: Fri Aug 28, 2020 10:07 am
by Nejiro
I'd like to use it but it's practically impossible, I didn't think my 3900x would go into trouble instead if I activate that filter all cores work at 100% and the PC slows down a lot as well as tripling the time for encoding, if instead I encode in h265 without activating that filter has no difficulty and I can easily use the computer ....... I honestly don't know what processor it takes to use that filter .....

Re: Handbrake and AMD Ryzen 3900x

Posted: Fri Aug 28, 2020 11:43 am
by Rodeo
It's a very CPU-intensive filter, it will cause all CPUs to go near 100%.

Re: Handbrake and AMD Ryzen 3900x

Posted: Fri Aug 28, 2020 3:23 pm
by Nejiro
I think it's practically impossible to use it, think that with a Ryzen 3900x to encode an hour of video it will take 5/6 hours ......
By the way, my main use is to re-encode my 1080p / h264 bluray to h265 / 1080, I get files that are half (often even less than half) of the original file, I don't use any filter and on viedo I have RF at 20, frame rate same as source, tuning none, auto profile and auto level, do you think these settings are okay?
Also I wanted to ask why there is no way to pass PCM audio in passtrought ......
Thank you

Re: Handbrake and AMD Ryzen 3900x

Posted: Fri Aug 28, 2020 6:30 pm
by mduell
That's far from impossible, there are users with particular preferences who do day-long encodes. It's only an impediment if you're trying to do realtime transcoding.

Re: Handbrake and AMD Ryzen 3900x

Posted: Fri Aug 28, 2020 9:55 pm
by Woodstock
It is also possible to use settings WITHOUT NLmeans that operate at 1/3rd real time on a high-power CPU. I've had variations between .1fps and 25fps for what were superficially the "same settings", but turned out to not be.

Is NLmeans really necessary to improve the output substantially? Many people will use it to decrease the size of the output by removing unnecessary noise, but one person's "irritating noise" is another person's "incredible detail". You've seen how much faster things are, leaving the video noise in (and making the encoder render it faithfully).

Try encoding a short section with NLmeans on and again with it off. You do NOT have to do a full encode to determine the usability of different settings. If NLmeans makes the result 30% smaller with acceptable detail remaining, is that important enough to you to allow the extra time?

Re: Handbrake and AMD Ryzen 3900x

Posted: Sat Aug 29, 2020 12:14 am
by Nejiro
So leaving the settings that I have now and activating the NLMeans (ultralight, light, medium or strong?) The file is even smaller and with the same quality?
Thank you

Re: Handbrake and AMD Ryzen 3900x

Posted: Sat Aug 29, 2020 1:51 pm
by Woodstock
I'd try all of the various settings.

"Same quality" isn't going to happen, because the filtering IS modifying what is being encoded. The stronger the denoise, the more detail that disappears. Less detail is easier to encode.

Example: Monsters Inc has an extra where they go into the work needed to realistically render individual strands of fur being blown around with snow in the air. But that work becomes "noise" and gets filtered out if you get too aggressive with filtering.

You get to make the choices of what you want to keep and what you are willing to give up to be happy with the result. We don't. That's why I encourage play. The game is getting a desired result when given certain tools. You have unlimited "lives".

Re: Handbrake and AMD Ryzen 3900x

Posted: Sun Aug 30, 2020 10:11 am
by Nejiro
Still regarding the encoding of blu ray h264 in h265 which preset do you recommend to use? Official> Matroska> H265 MKV 1080p30 okay? My goal is to get a quality that is as close as possible to the original h264 but with half the space ....
Thank you

Re: Handbrake and AMD Ryzen 3900x

Posted: Sun Aug 30, 2020 9:58 pm
by metaldave
Nejiro wrote: Sun Aug 30, 2020 10:11 amStill regarding the encoding of blu ray h264 in h265 which preset do you recommend to use? Official> Matroska> H265 MKV 1080p30 okay? My goal is to get a quality that is as close as possible to the original h264 but with half the space
Strictly speaking of video encoding and the resulting video stream size, the Matroska presets are where I start as my baseline (no matter the encoder I'm using). My first move is to change the frame rate to "same as source," and the rest is fairly subjective. Do you want to use a tuning setting? Do you want to select a profile (I believe "main" is selected in the H265 MKV 1080p30 preset, but Auto is fine, too). Then you have the preset slider. I find medium to be fine for the quality/speed/size ratio, but you can squeeze some more size savings with slow (if you want to take the extra time).

The nice thing about the Matroska presets is that it gives you a baseline for the Constant Quality setting for every resolution selected. Again, I'll use the Matroska as the baseline and tweak from there. As Woodstock mentioned earlier, just encode a few chapters and see the results when you make the tweak. You can set up five different short encodes one evening and make tweaks to each one to see what works. The statistics in the queue will tell you how long each took and the file sizes. You can then look at the output and see what strikes you. Again, this is a subjective game.

I hope this helps!

Re: Handbrake and AMD Ryzen 3900x

Posted: Mon Dec 14, 2020 5:10 pm
by 8Ringer
NLMeans is an filter that runs on each frame, thus it will alter the output (possibly dramatically depending on the input) regardless of what other settings you choose. NLMeans shouldn't be used to reduce filesize, as it has an effect on the output, its a denoise filter, not a filesize reduction option. Nothing is "free". I'd spend some time reading up on what things do and how they affect the output, because its far more than just a matter of encoded file size, particularly when you're using CQ rather than ABR.

Using identical settings, my CQ encoded files range anywhere from 5-12gb and it all has to do with the input content complexity, amount of motion vs static shots, etc. I don't use filter because I don't understand why one would want to alter the original content, but thats just me and my opinion.