You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ffmpeg has supported GPU acceleration,including nvenc(Nvidia) and QSV(Intel ), but the current version of HandBrake doesn't support nvenc, and it can't support QSV very well. Please add the function as soon as possible.
Reacted by Milan Davídek, Alexander Klimenko, Symbai, Oliver Schneider, Michael Schonwetter, fireundubh, japzone1, djazz, PS, Dennis E. Mungai and 5 more
First, we don't use ffmpeg. We use libav and NVEnc hasn't hit a public release of libav yet.
We have no plans to add NVENC. Patches welcome although we won't work on this ourselves.
We already have QSV and it works fine. What do you think is wrong with it? Functionality wise, even if we used the libav wrapper, there wouldn't be any functioality changes.
AMD VCE will possibally be added in the not so distant future. (assuming that the patch every hits libav isn't abandonded. )
It's not in the release that we use. Not that it matters.
It's also non free so we can't add this implementation as its not GPL compatible
Edit: Might be free if filters are disabled.
Either way, anyone producing a patch must be aware that it won't be accepted with --enable-nonfree. It must be without.
Technically, there is nothing stopping it from working under linux, but we have no developers on Linux that use / have it so it's completely untested. So just beware it's basically considered experimental.
Would be interested to hear if it works or not and what the performance is like.
Just specify the nvenc encoder via the -e option and your good to go once compiled.
Well, it works under Linux but the results are both surprising and disappointing at the same time.
In a nutshell, the 'nvenc_x265' encode is blisteringly fast (about 75fps which is 75 times faster!) but the output file size is much bigger than a regular 'x265' (medium) file using the CPU.
I am probably doing something wrong :-)
Here are the examples.
Command line to take the first chapter (12 minutes) of a Hugo Blu-ray MKV file...
x265 [info]: HEVC encoder version 2.8, x265 [info]: build info [Linux][GCC 5.4.0][64 bit][noasm] bit+10bit+12bit, x265 [info]: using cpu capabilities: none!
Note, the x265 quality scale is not the same as nvenc h265 encode, so may require some adjustment to get the same ballpark bitrate for a fair comparison.
Also note, nvenc medium is not equivalent to x265 medium. It's very different.
NvEnc only supports a small subset of x264/5 features. So the software encoders can do a much better job.
For reference, in Nvidias latest release, they were saying the improvements they made to their RTX 20 series NVENC hardware, brings them up around x264 fast. The older 10 series cards are not as good. From looking at it, their 10 series h264 is reasonably mature and can do an OK job. Their h265 encoder is missing a lot of features. For example, there is no B-frame support in the HEVC encoder on the 10 series cards. (not sure about the 20 series)
Also, the reason x265 is so slow, is because it's not using CPU optimisations. You probably compiled it without having nasm on your system, or a version that's too old. It'll get an awful lot faster with it.
Not NVENC fast, but usable.
Well, I am afraid to say that I am selling back my GTX1050 to Ebay... it's not doing what I thought it would do... use the GPU to number crunch and work with HB to produce a lovely picture with a small file. The 'nvenc_x265' encoder is fast but produces pointlessly large files that don't look as good as the normal 'x265' encoder that takes days to produce what I want... so, as they say on Dragon's Den... "It's a no from me, I'm out." :-(
@plittlefield the nv encoder was first and formost for live-stream feeds afaik... also, it looks like the RTX series cards have a much better encoder, but I'm not willing to pay the price of entry to find out at this point. Sticking with x265 overnight encodes for now.
@sr55 I've now compiled HB and all codecs (nasm, x264, x265, ffmpeg, etc) from sources with full CPU supported flags and yes, speed of transcodes and quality of picture has improved. I've written it all down in my Wiki if anyone wants it in easy step by step instructions :-)
Reacted by Michael J. Ryan, andreabauce and Francis Chung
Activity
sr55 commentedon Jul 12, 2016
First, we don't use ffmpeg. We use libav and NVEnc hasn't hit a public release of libav yet.
We have no plans to add NVENC. Patches welcome although we won't work on this ourselves.
We already have QSV and it works fine. What do you think is wrong with it? Functionality wise, even if we used the libav wrapper, there wouldn't be any functioality changes.
AMD VCE will possibally be added in the not so distant future. (assuming that the patch every hits libav isn't abandonded. )
liufeihong commentedon Jul 15, 2016
Thanks your reply, but I found that libav has add H.264 & HEVC Encoders For NVIDIA's NVENC, please refer to the offical website: https://wiki.libav.org/Encoding/h264
Libav configuration
./configure --enable-nvenc --enable-cuda --enable-nonfree
sr55 commentedon Jul 15, 2016
It's not in the release that we use. Not that it matters.
It's also non free so we can't add this implementation as its not GPL compatible
Edit: Might be free if filters are disabled.
Either way, anyone producing a patch must be aware that it won't be accepted with --enable-nonfree. It must be without.
marcomsousa commentedon Jan 13, 2017
Libav 12 (released on 2016-10-18)
https://libav.org/releases/libav-12.changelog
sr55 commentedon Jan 14, 2017
@marcomsousa It requires --non-free so it's a non starter. We can't publish HandBrake releases with that flag turned on.
Edit, seems to depend on the version you use. Need to figure out if libav has the free version or not. if it does, patches will be welcomed.
SeanMcG commentedon Jan 14, 2017
@sr55 not true anymore.
See https://git.libav.org/?p=libav.git;a=commitdiff;h=09522a303db014b48f844443f0f3aaa00af8f165
sr55 commentedon Jan 14, 2017
See edit ;).
I guess we just need someone with a Nvidia card to give It a go now. Build issues aside, our libav wrapper should be reasonably easy to update.
Edit: apparently I didn't go back to update it again. Fail.
104 remaining items
sr55 commentedon Aug 13, 2018
huh, that says a 1030 isn't supported. That's a real shame.
plittlefield commentedon Aug 13, 2018
Indeed, just found one second hand for 40GBP :-( I'll keep looking...
plittlefield commentedon Aug 13, 2018
Yes, the 1030 has support for DECoding (HVDEC) but not ENCoding (HVENC).
Is that ("half the job") worth having?
sr55 commentedon Aug 13, 2018
Nope. HandBrake won't use Nvidia decode. No point.
plittlefield commentedon Sep 21, 2018
OK, so I've bought a GTX 1050 and will be trying it soon.
I have compiled HandBrakeCLI from the github sources with --enable-nvenc and have installed the latest Nvidia Linux drivers.
Is there anything else I need to do?
sr55 commentedon Sep 21, 2018
Install Windows ;)
Joking aside,
Technically, there is nothing stopping it from working under linux, but we have no developers on Linux that use / have it so it's completely untested. So just beware it's basically considered experimental.
Would be interested to hear if it works or not and what the performance is like.
Just specify the nvenc encoder via the -e option and your good to go once compiled.
plittlefield commentedon Oct 4, 2018
Hello,
Well, it works under Linux but the results are both surprising and disappointing at the same time.
In a nutshell, the 'nvenc_x265' encode is blisteringly fast (about 75fps which is 75 times faster!) but the output file size is much bigger than a regular 'x265' (medium) file using the CPU.
I am probably doing something wrong :-)
Here are the examples.
Command line to take the first chapter (12 minutes) of a Hugo Blu-ray MKV file...
"/usr/local/bin/HandBrakeCLI" --input "/home/paully/Downloads/Videos/Done/Hugo (2011).mkv" --main-feature --chapters 1 --crop 0:0:0:0 --encoder nvenc_h265 --encoder-preset medium --quality 22 --audio-lang-list eng --first-audio --aencoder ac3 --ab 384 --mixdown 5point1 --output "/home/paully/Hugo (2011) hb nvenc_h265 slow 1080p ac3 cpu50.mp4"...produced a 1.1GB file in 3 minutes flat... yes, 3 minutes.
So, flipping fast but very big.
In contrast, the whole of Hugo using the regular 'x265' encoder took 43 hours and ended up being 2.8Gb.
The result is stunning but the wait is unbearable.
So, where am I going wrong?
The gritty details:-
Ubuntu 16.04.5 LTS
AMD FX(tm)-4350 Quad-Core Processor
16 GB RAM
Nvidia GTX 1050
HandBrake 20180928205937-77fa0c7-master (compiled with latest x264 and x265 libraries)
PS: as an aside, my HB log aoutput says...
x265 [info]: HEVC encoder version 2.8, x265 [info]: build info [Linux][GCC 5.4.0][64 bit][noasm] bit+10bit+12bit, x265 [info]: using cpu capabilities: none!sr55 commentedon Oct 4, 2018
Note, the x265 quality scale is not the same as nvenc h265 encode, so may require some adjustment to get the same ballpark bitrate for a fair comparison.
Also note, nvenc medium is not equivalent to x265 medium. It's very different.
NvEnc only supports a small subset of x264/5 features. So the software encoders can do a much better job.
For reference, in Nvidias latest release, they were saying the improvements they made to their RTX 20 series NVENC hardware, brings them up around x264 fast. The older 10 series cards are not as good. From looking at it, their 10 series h264 is reasonably mature and can do an OK job. Their h265 encoder is missing a lot of features. For example, there is no B-frame support in the HEVC encoder on the 10 series cards. (not sure about the 20 series)
Also, the reason x265 is so slow, is because it's not using CPU optimisations. You probably compiled it without having nasm on your system, or a version that's too old. It'll get an awful lot faster with it.
Not NVENC fast, but usable.
plittlefield commentedon Oct 23, 2018
Well, I am afraid to say that I am selling back my GTX1050 to Ebay... it's not doing what I thought it would do... use the GPU to number crunch and work with HB to produce a lovely picture with a small file. The 'nvenc_x265' encoder is fast but produces pointlessly large files that don't look as good as the normal 'x265' encoder that takes days to produce what I want... so, as they say on Dragon's Den... "It's a no from me, I'm out." :-(
sr55 commentedon Oct 23, 2018
I'm assuming you did play with the "encoder preset" on the video tab? Even the "slow" preset is usually faster.
However even then, the hardware is locked in stone so there isn't much in the way of improvements aside from next-gen hardware.
On another note, if you compile the app with x265 properly, it'll go a bit faster.
tracker1 commentedon Oct 24, 2018
@plittlefield the nv encoder was first and formost for live-stream feeds afaik... also, it looks like the RTX series cards have a much better encoder, but I'm not willing to pay the price of entry to find out at this point. Sticking with x265 overnight encodes for now.
plittlefield commentedon Oct 25, 2018
@sr55 I've now compiled HB and all codecs (nasm, x264, x265, ffmpeg, etc) from sources with full CPU supported flags and yes, speed of transcodes and quality of picture has improved. I've written it all down in my Wiki if anyone wants it in easy step by step instructions :-)
sr55 commentedon Oct 25, 2018
https://handbrake.fr/docs/en/latest/developer/build-linux.html ;)
FrancisChung commentedon Apr 13, 2019
@plittlefield : Would love to get some step by step instructions!
plittlefield commentedon Apr 13, 2019