Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 3rd November 2024, 17:12   #1  |  Link
bencuri
Registered User
 
Join Date: Apr 2024
Posts: 6
x264.exe - GPU recognised but OpenCL fails

I am trying to use the --opencl parameter during rendering with x264.exe, but it fails on my machine. I have Intel HD4000 chip. The following is written when I add the parameter to the command:


Quote:


C:\Users\admin\Videos\zaiko>x264.exe --preset faster --crf 20 --opencl --outpu
t zaiko.mp4 script.avs
mp4 [info]: audio muxing feature is disabled.
Creating lwi index file 100%
avs [info]: 1920x1080p 0:0 @ 50/1 fps (cfr)
avs [info]: color matrix: undef
mp4 [info]: audio muxing feature is disabled.
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x264 [info]: OpenCL acceleration enabled with Intel(R) Corporation Intel(R) HD G
raphics 4000
x264 [info]: Compiling OpenCL kernels...
x264 [info]: profile High, level 4.2, 4:2:0, 8-bit
x264 [info]: opencl=1 cabac=1 ref=2 deblock=1:0:0 analyse=0x3:0x113 me=hex subme
=4 psy=1 fade_compensate=0.00 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me
=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threa
ds=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_co
mpat=0 constrained_intra=0 fgo=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct
=1 weightb=1 open_gop=0 weightp=1 keyint=250 keyint_min=25 scenecut=40 intra_ref
resh=0 rc_lookahead=20 rc=crf mbtree=1 crf=20.0000 qcomp=0.60 qpmin=0:0:0 qpmax=
69:69:69 qpstep=4 ip_ratio=1.40 aq=1:1.00 aq-sensitivity=10.00 aq-factor=1.00:1.
00:1.00 aq2=0 aq3=0
x264 [info]: started at Sun Nov 03 16:55:05 2024
x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode
x264 [error]: x264_encoder_encode failed

x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode
x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode
x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode
x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode
x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode
x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode
x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode
x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode
x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode
x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode
x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode
x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode
x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode

aborted at input frame 23, output frame 0
mp4 [error]: failed to finish movie.
x264 [info]: ended at Sun Nov 03 16:55:11 2024
x264 [info]: encoding duration 0:00:06

C:\Users\admin\Videos\zaiko>x264.exe --preset faster --crf 20 --opencl --outpu
t zaiko.mp4 script.avs

C:\Users\admin\Videos\zaiko>
The X264.exe I use is either the default one from the Videolan Player website or a modified version from:
https://github.com/jpsdr/x264/releases

Without the --opencl parameter both versions work fine.

What causes the error?
bencuri is offline   Reply With Quote
Old 3rd November 2024, 20:56   #2  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 3,172
I'm not sure. I've never used it with an integrated intel graphics, though, only with dedicated NVIDIA GPUs.
Back in 2013, I used my old NVIDIA GTX 650 (1GB GDDR5) and it worked just fine.
The same goes for the NVIDIA GTX 980Ti (6GB GDDR5) I upgraded to in 2016.
At work I've been using both NVIDIA Quadro P4000 and M5000 (both with 8GB GDDR5) over the last 7 years without any issues.
While the latter (M5000) is in my personal workstation, the P4000 is in the actual servers doing the hard work in the farm and they use it all the time in production without any issues.
I think that the culprit here is your intel integrated graphics.
From what I'm reading, your Intel Integrated Graphics HD 4000 supports up to OpenCL 1.2, which is quite an old revision of the standard, while all the cards I mentioned support OpenCL 3.0, so it might be that, but I'm not sure.
FranceBB is online now   Reply With Quote
Old 3rd November 2024, 22:20   #3  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,058
I'm a bit rusty on this (well maybe a lot rusty) but dont you have to install OpenCL runtimes or something.

OpenCL™ Runtimes for Intel® Processors
https://www.intel.com/content/www/us...l-drivers.html

Google:- installing opencl on intel
https://www.google.co.uk/search?q=in...sNOVVUXAPvHb3l

EDIT: From the first link
Quote:
Important Changes

Starting in the 2020 February release ("igfx_win10_100.7870.exe"), the CPU runtime for OpenCL is no longer included with the OpenCL Driver package. Please use of the methods listed here to obtain the CPU runtime for OpenCL. The Graphics Compute runtime continues to be included with the OpenCL Driver package.
Intel® SDK for OpenCL Applications is EOL. The transition to Intel® oneAPI and its unified, cross-architecture programming model brings greater efficiency and reuse across hardware targets. See the Intel® oneAPI Programming Guide for information migrating OpenCL code and OpenCL interoperability by way of SYCL* objects.
EDIT:
GPU Caps Viewer [current v1.63.0.0]
Geeks3D downloads:- https://www.geeks3d.com/dlz/#gpu_monitoring
Look for
2 – System Tools
2.1 – GPU Information, Monitoring and Tweaking

About the 5th one down.
Shows OpenCL runtime version actually installed for NVidia/Intel (and If it is installed).
(Has some nice 3D demos for Vulkan, OpenGL, OpenCL [CPU/GPU])
Direct link v1.63.0.0 (Zip, No Installer):- https://www.geeks3d.com/dl/show/735
Direct Link v1.63.0.0 (Installer) https://www.geeks3d.com/dl/show/736
EDIT: The Geeks3D downloads link is a big list of download links to lots of goodies.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 4th November 2024 at 11:04.
StainlessS is offline   Reply With Quote
Old 24th December 2024, 04:14   #4  |  Link
Balling
Registered User
 
Join Date: Feb 2020
Posts: 572
You need to install CPU OpenCL https://registrationcenter-download....5.0.0.1166.exe
Balling is offline   Reply With Quote
Old 24th December 2024, 14:21   #5  |  Link
Z2697
Registered User
 
Join Date: Aug 2024
Posts: 361
Erm, the CPU runtime for OpenCL is for running OpenCL codes on CPU (not iGPU, not dGPU), which doesn't sound like what the thread starter wants to achieve here.
I can't help with it, but I think there will be no meaningful benefit if you successfully run the x264 OpenCL codes on iGPU. (except for those new "handheld gaming PC" chips... perhaps)

Last edited by Z2697; 24th December 2024 at 14:31.
Z2697 is offline   Reply With Quote
Old 22nd January 2025, 18:07   #6  |  Link
ReinerSchweinlin
Registered User
 
Join Date: Oct 2001
Posts: 475
Using OPENCL on HD4000 wonßt help a lot, the iGPU simply is not powerful enough... but worth a try, it depends on the x264 settings, if it will help or not (only some parts of x264 encoding are offloaded to opencl).

Forcing CPU OPENCL will be slower than simply doing it native on the CPU.

Download GPU-Z and see if OPENCL is installed.

If not, download most recent Intel drivers, which should install OPENCL alongside.

Check with GPU-Z afterwards, if openCL is present now. To make sure it runs, download a OPENCL benchmark and see if that works... I often use Mandelbulbler for this.

If installing most recent iGPU Intel drivers won´t give you OPENCL, we have to see then what we can do about..



Having said all that - HD4000 is so old, as are the CPUs that come with it... You could probably get any old PC for free or very little money that outperforms your current setup.
ReinerSchweinlin is offline   Reply With Quote
Old 23rd January 2025, 08:55   #7  |  Link
Jamaika
Registered User
 
Join Date: Jul 2015
Posts: 838
Quote:
Originally Posted by bencuri View Post
I am trying to use the --opencl parameter during rendering with x264.exe, but it fails on my machine. I have Intel HD4000 chip. The following is written when I add the parameter to the command:

The X264.exe I use is either the default one from the Videolan Player website or a modified version from:
https://github.com/jpsdr/x264/releases

Without the --opencl parameter both versions work fine.

What causes the error?
I had errors for a long time for NVIDIA RTX 3050. Caused by OpenCL software errors
https://github.com/KhronosGroup/OpenCL-ICD-Loader
https://github.com/KhronosGroup/OpenCL-Headers
What versions of OpenCL did I use?
Did I test my ffmpeg with the latest versions of OpenCL?

My ASUS Z790-P motherboard based on the Intel driver doesn't support OpenCL as can be seen in the KNLMeansCL plugin for Avisynth. I installed the drivers half a year ago.

Last edited by Jamaika; 23rd January 2025 at 09:03.
Jamaika is offline   Reply With Quote
Old 24th January 2025, 18:33   #8  |  Link
Balling
Registered User
 
Join Date: Feb 2020
Posts: 572
So this appears to be a bug with all recent Intel drivers, if Davinci resolve crashes when you launch it you have this bug

Basically go to regedit and delete the values from there.

HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenCL\Vendors

HKEY_LOCAL_MACHINE\SOFTWARE
\Wow6432Node\Khronos\OpenCL\Vendors

Found it here https://stackoverflow.com/questions/...rms-on-windows


After that reinstall/repair OpenCL for CPUs. And reinstall Intel iGPU driver to get GPU opencl and not just CPU OpenCL but that was not needed in my case.


After that you will see GPU-Z will report OpenCL in both Nvidia and Intel and you will be able to submit stuff for gpuinfo using their app

https://opencl.gpuinfo.org

I appear to be the first to submit Arrow Lake intel core Ultra 7, congrats to me, two entries one for CPU and one for Intel Graphics.

Last edited by Balling; 24th January 2025 at 19:23.
Balling is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 23:49.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.