Since FFMPEG 2 is there OpenCL Support

Website, builds, or other suggestions.
User avatar
Zeranoe
Site Admin
Posts: 702
Joined: Sat May 07, 2011 7:12 pm
Contact:

Re: Since FFMPEG 2 is there OpenCL Support

Post by Zeranoe » Fri Jul 12, 2013 5:31 pm

I would consider adding OpenCL support because GPU encoding seems to be pretty popular now.

If I just compile FFmpeg with the OpenCL lib, will it work with other encoders? Is x264 with patches the only way to utilize it?

Ajaja
Posts: 69
Joined: Fri Mar 08, 2013 2:00 pm

Re: Since FFMPEG 2 is there OpenCL Support

Post by Ajaja » Fri Jul 12, 2013 6:42 pm

Zeranoe wrote:If I just compile FFmpeg with the OpenCL lib, will it work with other encoders? Is x264 with patches the only way to utilize it?
x264 (without any patches, git version of x264 has official OpenCl support for lookahead feature), deshake and unsharp filters, for now. Other encoders and filters are not utilize OpenCl yet. It's just the beginning, I think ;)

ramitbhalla
Posts: 30
Joined: Wed Dec 19, 2012 5:45 am

Re: Since FFMPEG 2 is there OpenCL Support

Post by ramitbhalla » Tue Jan 28, 2014 2:58 pm

Does anyone know how exact to build ffmpeg using --enable-opencl?
Where does one get the necessary libraries and headers and where should it be put for 32bit and 64bit builds?
I can't seem to find a thread that explains this.

Ajaja
Posts: 69
Joined: Fri Mar 08, 2013 2:00 pm

Re: Since FFMPEG 2 is there OpenCL Support

Post by Ajaja » Tue Jan 28, 2014 7:07 pm

ramitbhalla wrote:Where does one get the necessary libraries and headers and where should it be put for 32bit and 64bit builds?
You can make library from c:\Windows\System32\OpenCL.dll

Code: Select all

gendef OpenCL.dll
dlltool -l libOpenCL.a -d OpenCL.def -k -A
Headers: http://www.khronos.org/registry/cl/

My library+headers for x64 in attachment.
Attachments
OpenCL.zip
(48.41 KiB) Downloaded 344 times

ramitbhalla
Posts: 30
Joined: Wed Dec 19, 2012 5:45 am

Re: Since FFMPEG 2 is there OpenCL Support

Post by ramitbhalla » Sun Feb 02, 2014 7:22 pm

Awesome thank you very very much - this is SUPER helpful (the most I've found anywhere on the web so far).

Do you happen to have the x86 headers and library also?

Ajaja
Posts: 69
Joined: Fri Mar 08, 2013 2:00 pm

Re: Since FFMPEG 2 is there OpenCL Support

Post by Ajaja » Sun Feb 02, 2014 8:44 pm

ramitbhalla wrote:Do you happen to have the x86 headers and library also?
Headers are the same. x86 library here. I did not test it with ffmpeg (because I build only x64 for myself), but it must work.
Attachments
libOpenCL.x86.7z
(3.03 KiB) Downloaded 311 times

ramitbhalla
Posts: 30
Joined: Wed Dec 19, 2012 5:45 am

Re: Since FFMPEG 2 is there OpenCL Support

Post by ramitbhalla » Mon Feb 03, 2014 1:55 am

Thank you so very much - you're just amazing!

ramitbhalla
Posts: 30
Joined: Wed Dec 19, 2012 5:45 am

Re: Since FFMPEG 2 is there OpenCL Support

Post by ramitbhalla » Mon Feb 03, 2014 4:13 am

Works like a charm. Been busting my chops for days and you just solved it in a minute.thanks!

ramitbhalla
Posts: 30
Joined: Wed Dec 19, 2012 5:45 am

Re: Since FFMPEG 2 is there OpenCL Support

Post by ramitbhalla » Thu Feb 06, 2014 2:18 am

So to clarify, I didn't see an answer to x264 and opencl above (lookahead).

Does opencl with x264 work only with 2 pass or with 1 pass also?

ramitbhalla
Posts: 30
Joined: Wed Dec 19, 2012 5:45 am

Re: Since FFMPEG 2 is there OpenCL Support

Post by ramitbhalla » Thu Feb 06, 2014 2:35 am

BTW when I try to use open with x264 I get the following error:

[libx264 @ 000000000326cc60] OpenCL: Unable to find a compatible device

Have the latest Intel OpenCL drivers and it's working with Handbrake (see below)

[13:16:14] CPU: Intel(R) Core(TM) i7-3540M CPU @ 3.00GHz
[13:16:14] - Intel microarchitecture Ivy Bridge
[13:16:14] - logical processor count: 4
[13:16:14] OpenCL device #1: Intel(R) Corporation Intel(R) HD Graphics 4000
[13:16:14] - OpenCL version: 1.2
[13:16:14] - driver version: 10.18.10.3379
[13:16:14] - device type: GPU
[13:16:14] - supported: no
[13:16:14] Intel Quick Sync Video support: yes
[13:16:14] - Intel Media SDK hardware: API 1.7 (minimum: 1.3)
[13:16:14] - Preferred implementation: hardware (any)


Any idea what's going on?

Post Reply