HandBrake + NVEnc = Awesomness
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2008
    Location
    always where I have to be
    Posts
    1,135
    Linux (Fedora) Firefox 65.0

    Thumbs up HandBrake + NVEnc = Awesomness

    I just found out that the new HB has the option to use Nvidia's cuda acceleration to encode h264/h265 streams. I don't know since which version it has been present, the last time I used HB was in Centos. My GPU is 1050ti.

    I tested one 40 min movie, specs are: h265 | 1080p | 25 fps | 3000 kbps | two passes, default - slowest speed (highest quality).
    Whole encode was done in ~7 minutes. Not a typo - fscking 7 minutes!
    It seems to default to use CPU a lot too to help the process, about 6 cores with my 4790. GPU video engine is at average utilized at 80%. Sometimes at 65% and sometimes at 90%.
    Now, I tried the same movie with same settings with CPU only, with the 'very slow' setting. It uses all threads (8 with 4790) and the first pass is estimated to take ~9.5 hours. Yes, just the first pass. Since the second one takes more or less the same time, we are talking about 19 hours. I had to wait about 15 minutes for HB to stabilize the estimated time in the first place..

    But Nvidia blob (and supported GPU) users can just get it so much quicker. Wait, quicker? Well, it's not just quicker, it's freaking blazing faaaaast.

    Thx to all HB developers, this rulez!

  2. #2
    Join Date
    Aug 2011
    Location
    ~
    Posts
    1,953
    Linux (Fedora) Firefox 65.0

    Re: HandBrake + NVEnc = Awesomness

    Beware, gpu accelerated encoding sacrifices quality (possibly tremendously). Make sure the bitrate is high enough and/or the speed/quality/size tradeoff pays off.

  3. #3
    Join Date
    Dec 2008
    Location
    always where I have to be
    Posts
    1,135
    Linux (Fedora) Firefox 65.0

    Re: HandBrake + NVEnc = Awesomness

    Yeah, it's true. I did a lot of encodes to test that. It's rather extensive and would be very long here, but in a nutshell. I'm talking about h265, 2 passes.

    Visual differences are apparent if low bitrate and high resolution are used. E.g. 1080p with a bitrate of 2500 is apparently worse looking than the same encode with CPU only. If the bitrate is about 4000, the difference is almost none. Of course, that is w/o adding time and power consumption to the mix. If that is a concern, the lower quality can still be perfectly justified. And definitely it is with higher bitrates, as the visual difference is really almost nothing.
    Now, if the res is 720p and bitrate ~2000, the difference is still there, but quite minor. With ~3000 for this resolution, it's again hard to spot any difference.

    I also found out that using anything slower than 'medium' for CPU encoding is a waste of time, including low bitrates. Slower settings can produce a bit smaller file with the same bitrate, yes, but not by much and visual quality difference is next to nonexistent. OTOH, 'faster' and even 'veryfast' are actually again not far from medium and especially if the bitrate is reasonable for given resolution, like ~1600 for 720p, it's basically identical in visual quality compared to 'medium'. The only difference is slightly bigger file, but agin not much. People have different needs and for some bitrate of 1600 for 720p can be too low and for others, it may be an overkill and can easily live with something like ~1000kbps.

    Anyway.
    if one has more movies and doesn't care so much about storage space, the NVEnc is seriously awesome to use. With low bitrates and space concerns, CPU is likely a better choice. With many movies though, this can be quite frustrating, especially if one needs to resize the input and perhaps use some filters as well, this will prolong the encoding time a LOT.

Similar Threads

  1. Handbrake won't compile
    By Driftwould in forum Installation, Upgrades and Live Media
    Replies: 4
    Last Post: 17th December 2014, 05:13 PM
  2. Handbrake and Openshot
    By inkrypted in forum Video
    Replies: 11
    Last Post: 24th November 2013, 07:20 AM
  3. Where is a rpm for Handbrake 0.9.8?
    By GrayFox in forum Using Fedora
    Replies: 14
    Last Post: 2nd October 2013, 08:40 PM
  4. HandBrake 0.9.6 released
    By Wayne in forum Using Fedora
    Replies: 2
    Last Post: 4th March 2012, 02:08 PM
  5. HandBrake
    By maxstradamus in forum Using Fedora
    Replies: 17
    Last Post: 20th May 2009, 03:44 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •