NVIDIA hardware acceleration enabled

Announcements made by Zeranoe.
User avatar
Zeranoe
Site Admin
Posts: 613
Joined: Sat May 07, 2011 7:12 pm
Contact:

NVIDIA hardware acceleration enabled

Postby Zeranoe » Mon Jan 16, 2017 7:28 pm

The builds now come with NVIDIA hardware acceleration though the options:

Code: Select all

--enable-cuda --enable-cuvid --enable-nvenc

hydra3333
Posts: 98
Joined: Sun Apr 28, 2013 1:03 pm
Contact:

Re: NVIDIA hardware acceleration enabled

Postby hydra3333 » Wed Jan 18, 2017 7:08 am

Zeranoe wrote:The builds now come with NVIDIA hardware acceleration though the options:

Code: Select all

--enable-cuda --enable-cuvid --enable-nvenc

Goodness me, thank you very much !!!

I'm am going to try this immediately since my own attempted cuda/cuvid build was largely unsuccessful at runtime. https://trac.ffmpeg.org/wiki/HWAccelInt ... IDNvDecode says

Code: Select all

# Sample decode using CUVID, the cuvid decoder copies the frames to system memory in this case:
ffmpeg -c:v h264_cuvid -i input output.mkv
# Full hardware transcode with CUVID and NVENC:
ffmpeg -hwaccel cuvid -c:v h264_cuvid -i input -c:v h264_nvenc -preset slow output.mkv
# Partial hardware transcode, with frames passed through system memory (This is necessary for transcoding 10bit content):
ffmpeg -c:v h264_cuvid -i input -c:v h264_nvenc -preset slow output.mkv


May I gently enquire about any possibility of OpenCL for GPU processing too ?
I was able to get it to build and work OK in Winx64 per the attachment here https://github.com/rdp/ffmpeg-windows-b ... -200949748
Using unsharp with OpenCL=1 GPU processing seems to speed up an end-to-end mpeg2 -> h264 re-encoding process by 300% as compared to unsharp with OpenCL=0 ... and unsharp is the only ffmpeg sharpen filter I am aware of.

hydra3333
Posts: 98
Joined: Sun Apr 28, 2013 1:03 pm
Contact:

Re: NVIDIA hardware acceleration enabled

Postby hydra3333 » Wed Jan 18, 2017 7:37 am

Also, maybe it's supposed to be this way, however in

https://ffmpeg.zeranoe.com/builds/win64 ... static.zip
https://ffmpeg.zeranoe.com/builds/win64 ... -static.7z

the .7z seems to contain "current" files according to the date modified on files inside it
the .zip seems to contain files a couple of days out of date according to the date modified inside it

even though the .7z and .zip have the same creation date/time.

Just a thought.

gravitygunner
Posts: 2
Joined: Wed Jan 18, 2017 6:39 pm

Re: NVIDIA hardware acceleration enabled

Postby gravitygunner » Wed Jan 18, 2017 6:43 pm

Zeranoe wrote:The builds now come with NVIDIA hardware acceleration though the options:

Code: Select all

--enable-cuda --enable-cuvid --enable-nvenc


Does this include the scale_npp filter by any chance?

GPU encoding is extremely fast right up until you include the need to scale the video, which bottlenecks everything.

I think you have to add '--enable-libnpp' to the configuration but I don't know if this introduces any concerns with distributing such a build.

BiDouiLle
Posts: 40
Joined: Wed Oct 17, 2012 7:45 am
Location: Corsica

Re: NVIDIA hardware acceleration enabled

Postby BiDouiLle » Wed Jan 18, 2017 7:26 pm

Hi gravitygunner,

you are correct, npp needs to configure with "--enable-libnpp".

But according to hydra in this post, scale npp is buggy.

And licensing may require non-free :/

gravitygunner
Posts: 2
Joined: Wed Jan 18, 2017 6:39 pm

Re: NVIDIA hardware acceleration enabled

Postby gravitygunner » Wed Jan 18, 2017 8:50 pm

Yeah, looks like a 'pure' GPU encode is out of the question right now if you want even basic filtering.

It's odd as the one thing you'd think a GPU would be even better at accelerating than video encoding would be scaling an image.

BiDouiLle
Posts: 40
Joined: Wed Oct 17, 2012 7:45 am
Location: Corsica

Re: NVIDIA hardware acceleration enabled

Postby BiDouiLle » Thu Jan 19, 2017 7:34 pm

A few days ago, I found a company website that pretend to have ported a few filters plugins to use opencl on ffmpeg.
I have to found the website again as I don't even remember the name.

That would be the right way to do as opencl is vendor agnostic... once we'll have opencl by default :p

User avatar
Zeranoe
Site Admin
Posts: 613
Joined: Sat May 07, 2011 7:12 pm
Contact:

Re: NVIDIA hardware acceleration enabled

Postby Zeranoe » Thu Jan 19, 2017 7:41 pm

hydra3333 wrote:May I gently enquire about any possibility of OpenCL for GPU processing too ?


OpenCL is not written into FFmpeg with the support for LoadLibrary();

This function allows the dll to be loaded at the needed time and not initially at execution. Since OpenCL is not supported this way the dll would need to be present on every machine FFmpeg is run on or FFmpeg would error. This is not feasible for servers or other machines that do not include this dll.

OpenCL's code in FFmpeg will need to be tweaked to support this.

gravitygunner wrote:Does this include the scale_npp filter by any chance?


As BiDouiLle mentioned npp is non-free and cannot be included in a public FFmpeg build.

hydra3333
Posts: 98
Joined: Sun Apr 28, 2013 1:03 pm
Contact:

Re: NVIDIA hardware acceleration enabled

Postby hydra3333 » Sat Jan 21, 2017 1:51 pm

gravitygunner wrote:Yeah, looks like a 'pure' GPU encode is out of the question right now if you want even basic filtering.

Yes, sort of. Depends to what lengths you're willing to go.
viewtopic.php?f=3&p=11934#p11934
and viewtopic.php?f=5&p=11908#p11908


Return to “Offical Announcements”

Who is online

Users browsing this forum: No registered users and 3 guests