Handbrake and AMD Ryzen 3900x

Support for HandBrake on Linux, Solaris, and other Unix-like platforms
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
Nejiro
Posts: 5
Joined: Thu Aug 27, 2020 9:23 am

Handbrake and AMD Ryzen 3900x

Post 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
Woodstock
Veteran User
Posts: 3850
Joined: Tue Aug 27, 2013 6:39 am

Re: Handbrake and AMD Ryzen 3900x

Post 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.
mduell
Veteran User
Posts: 7264
Joined: Sat Apr 21, 2007 8:54 pm

Re: Handbrake and AMD Ryzen 3900x

Post by mduell »

NLMeans is slow. Use it if you need it, and it does amazing things, but skip it otherwise.
Nejiro
Posts: 5
Joined: Thu Aug 27, 2020 9:23 am

Re: Handbrake and AMD Ryzen 3900x

Post 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 .....
User avatar
Rodeo
HandBrake Team
Posts: 12622
Joined: Tue Mar 03, 2009 8:55 pm

Re: Handbrake and AMD Ryzen 3900x

Post by Rodeo »

It's a very CPU-intensive filter, it will cause all CPUs to go near 100%.
Nejiro
Posts: 5
Joined: Thu Aug 27, 2020 9:23 am

Re: Handbrake and AMD Ryzen 3900x

Post 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
mduell
Veteran User
Posts: 7264
Joined: Sat Apr 21, 2007 8:54 pm

Re: Handbrake and AMD Ryzen 3900x

Post 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.
Woodstock
Veteran User
Posts: 3850
Joined: Tue Aug 27, 2013 6:39 am

Re: Handbrake and AMD Ryzen 3900x

Post 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?
Nejiro
Posts: 5
Joined: Thu Aug 27, 2020 9:23 am

Re: Handbrake and AMD Ryzen 3900x

Post 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
Woodstock
Veteran User
Posts: 3850
Joined: Tue Aug 27, 2013 6:39 am

Re: Handbrake and AMD Ryzen 3900x

Post 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".
Nejiro
Posts: 5
Joined: Thu Aug 27, 2020 9:23 am

Re: Handbrake and AMD Ryzen 3900x

Post 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
metaldave
Posts: 36
Joined: Mon Apr 10, 2017 6:40 pm

Re: Handbrake and AMD Ryzen 3900x

Post 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!
Post Reply