GPU/Hardware Encoding/Acceleration FAQs

hardwareencoding
documentation
tweaking

(Administrator) #1

This thread is a quick compilation of the FAQs being asked around and answered related to GPU and Hardware encoding


1. What platforms and devices are supported for GPU encoding

MCEBuddy supports QuickSync, OpenCL (currently through Handbrake) and NVENC (currently through FFMPEG). QuickSync and NVENC are used for encoding the video and OpenCL is used to accelerate the decoding and video processing (deinterlacing, resizing, cropping etc). It can support any driver (Intel, ATI, NVidia) that support QuickSync, NVENC and OpenCL.

To use Intel QuickSync, see FAQ 2 for driver details
For H.264 hardware encoders, Intel Sandy Bridge (1st Generation) or newer chipsets are required
For H.265 hardware encoders, Intel Broadwell (4th Generation) or newer chipsets are required

To use NVENC encoders, NVIDIA driver version 347.09 or newer are required
For H.264 hardware encoding requires CUDA hardware capability version 3.0 or later (Kepler or newer)
For H.265 hardware encoding required CUDA hardware capability version 5.2 or later (Maxwell GM2xx or newer)

For Nvidia Pascal based cards used driver 376.51. See this post - Hardware Acceleration with new Nvidia Pascal based cards

2. What are the stable graphics drivers for Intel QuickSync and NVIDIA NvEnc

QuickSync: These drivers have been uploaded for your convenience here:
Windows 7/8.1 (build 15.33.30.3958)
32bit - Dropbox - Intel_10.18.10.3958 x86_15.33.30.3958.exe
64bit - Dropbox - Intel_ 10.18.10.3958 x64_15.33.30.3958.exe

Windows 10 (build 15.40.8.64.4281)
Dropbox - Intel_Win_10_8_7_10.18.15.4281_x64.zip

NVIDIA: The stable driver tested is v353.90 (which is part of NVIDIA SDK v7.5 64bit)
Win 7/8.1 - http://developer.download.nvidia.com/compute/cuda/7.5/Prod/local_installers/cuda_7.5.18_windows.exe
Win 10 - http://developer.download.nvidia.com/compute/cuda/7.5/Prod/local_installers/cuda_7.5.18_win10.exe

Nvidia Pascal based cards used driver 376.51. See this post - Hardware Acceleration with new Nvidia Pascal based cards

Other stable drivers are given below (see FAQ 10)

3. My conversion keeps hanging when I enable Hardware Encoding

If the conversion works when you disable Hardware Encoding (Conversion Task Settings -> Advanced Settings -> Expert Settings -> Enable Hardware Encoding) then most likely your driver is unstable (since the encoding is done via the graphics driver).

See above to get the most stable graphics driver.

4. How do I know if MCEBuddy is using hardware acceleration

This is a two step process, first find out if your system and driver support hardware acceleration and then check if the encoder is using it.

FOR INTEL QUICKSYNC:
Open the conversion log after the conversion is complete. To check if QuickSync is supported look for the following EXACT words:

QuickSync encoding support available ->

A True or False will tell you whether hardware encoding is available.
If your Intel QuickSync encoder is being used for encoding, in your log you will find the line

encoder: H.264 (Intel Media SDK)
OR
encoder: H.265 (Intel Media SDK)
OR
started ("H.264/AVC encoder (Intel QSV)")
OR
started ("H.265/AVC encoder (Intel QSV)")

If this line is not there then the QuickSync hardware encoder is not being used even if your driver supports it.

FOR NVIDIA NVENC:
Open the conversion log after the conversion is complete. To check if NVENC is supported look for the following EXACT words:

NVidia H.264 Hardware Encoder Detected :
NVidia H.265 Hardware Encoder Detected :

A True or False will tell you whether hardware encoding is supported by your hardware/drivers.
If your NVIDIA NVENC encoder is being used for encoding, in your log look for the words

nvenc_hevc
OR
nvenc_h264
OR
hevc_nvenc
OR
h264_nvenc

If these words are not there then the NVENC hardware encoder is not being used even if your driver supports it.

FOR OPENCL:
To check if OpenCL is support by your driver look for the exact words in the log:

OpenCL version:

If OpenCL is supported, you will need to manually enable the options (see the thread below for details) that will accelerate some functions while encoding and decoding.

5. Suddenly my encoding time is taking very long or for some video it takes a long time

Very likely your Intel driver is buggy and is causing issues. Use the recommended version in FAQ 2 and it should resolve your issues. Latest drivers are not always the most stable or faster drivers.

If you have a bugger driver, the symptoms may vary, from slow encoding to hanging the system, crashing the system or error messages in the logs. An example of a buggy driver or if you’re running heavy graphics apps/games while using hardware encoding can take the wind out of the Intel driver and causing it to run out of resources, you might see things like this in the log:

2014-04-15T20:43:36 MCEBuddy.AppWrapper.Handbrake --> Encoding: task 1 of 1, 0.02 %[20:43:36] qsv_enc_init: using ‘hardware (1)’ implementation, API: 1.3
2014-04-15T20:43:36 MCEBuddy.AppWrapper.Handbrake --> Error code -1, av_qsv_wait_on_sync 642
2014-04-15T20:43:36 MCEBuddy.AppWrapper.Handbrake --> Error code -1, av_qsv_wait_on_sync 642
2014-04-15T20:43:36 MCEBuddy.AppWrapper.Handbrake --> Encoding: tasError code -1, av_qsv_wait_on_sync 642
2014-04-15T20:43:36 MCEBuddy.AppWrapper.Handbrake --> Encoding: task 1 of 1, 0.06 %not enough to have 10 sync point(s) allocated
2014-04-15T20:43:36 MCEBuddy.AppWrapper.Handbrake --> ERROR: qsv: Not enough resources allocated for QSV encode

6. My system crashes or my system hangs or I see many errors in my log file when I try to convert a video

See FAQ 4 above, if you driver is buggy it can cause unknown issues with your system, because the encoding is done in the video driver and the video driver runs in the kernel space it can use the system to become unstable or even crash. The best way to determine if the video driver is causing the issue is to TURN OFF hardware encoding on the Conversion Options -> Expert Settings and then see if the symptoms go away. If do they try to update to a stable driver.

7. Is OpenCL and QuickSync hardware encoding auto enabled OR I’ve enabled quicksync/Intel GPU in the bios but it still says QuickSync is not present?

MCEBuddy will auto detect if you have an Intel QuickSync enabled chipset and enabled QuickSync encoding.

  1. If you have an Intel chipset and another graphics card and MCEBuddy is not detecting the QuickSync, use the FakeMonitor trick (http://mirillis.com/en/products/tutorials/action-tutorial-intel-quick-sync-setup_for_desktops.html#top) to enable the Intel graphics chipset and get MCEBuddy to recognize it.

If you have OpenCL support in your driver, you will need to manually enable support for it since it’s performance varies from system to system and there is no way for MCEBuddy to tell it will make the system faster or slower.

  1. If you have an older CPU like a Pentium/Core/Core 2 and good graphics card from Nvidia or ATI, then you may want to add -U the end of the handbrake-video line in the profile. This will enable hardware decoding. This ONLY works if the GPU is more powerful than the CPU, it will reduce the performance on new CPU’s which are much more powerful at decoding compared to graphics cards.
  2. If you have a newer graphics card (very powerful) which supports OpenCL 1.1 then add -P to the end of the handbrake-video line in the profile. This works if you’re using cropping reducing the video size (or the profile is using lookahead). Again, this will help only with a powerful graphics card with OpenCL drivers. If used on a weak graphics card it can reduce performance.

MCEBuddy cannot auto OpenCL since it is graphics card vs CPU dependent. MCEBuddy can only auto enable QuickSync if detected.

8. I have an Intel chipset, does it support QuickSync and which Chipset provides the fastest performance

So far only Intel Sandy Bridge, Ivy and Haswell chipsets support QuickSync encoding. Of the three our research has shown that Ivy Chipset is the fastest of the three.

9. My encoding is taking a long time even with hardware acceleration enabled or my FPS appears to be slow/low

Encoding performance depends upon many factors which can impact the FPS or time taken to encode. These include:

  1. Profile being used (High Quality take more time)
  2. Profile bitrate, higher bitrates take more time
  3. Input and output resolution, HD and high resolutions take significantly longer times
  4. Your GPU and CPU are being used by other processes or you have multiple simultaneous conversions. Check your GPU and CPU utilization using the CPUZ and GPUZ tools while encoding
  5. Check your hardware chipsets being used, some chipsets are faster than others (see FAQ 7 above)
  6. Check your video driver, buggy or slow video drivers are the primary cause of slow encoding. See FAQ 2 and FAQ 4 above
  7. Sometimes OpenCL settings are incompatible and may cause a slow down in the performance if manually enabled (see FAQ 6 above)

Depending upon the above factor GPU frame rates (FPS) can vary from 25FPS to 1200 FPS which typically represent a 5x to 50x increase in comparison to non-hardware acceleration performance.

Here is a comparison of a performance comparison between hardware and non hardware encoded versions:

10. What are the other stable drivers for Intel QuickSync

The other stable drivers for QuickSync reported/tested are:

22.20.16.4944 (aka 15.65)
These drivers have been uploaded for your convenience here:
Windows 10 64bit - Dropbox - Intel_W10_win64_15.65.3.4944.exe

Install the above using the Setup files

21.20.16.4839_
Windows 7/8.1/10 - Download from Microsoft Update Catalog

Extract the cab files and then install the above by running the file IgxPun.exe

10.18.14.4414 (this is reportedly also the faster performing driver)
These drivers have been uploaded for your convenience here:
32bit - Dropbox - win32_153631.4414.exe
64bit - Dropbox - win64_153631.4414.exe

Install the above using the Setup files

10.18.10.3621
These drivers have been uploaded for your convenience here:
32bit - Dropbox - Intel_Win7_8_8.1_32_10.18.10.3621.zip
64bit - Dropbox - Intel_Win7_8_8.1_64_10.18.10.3621.zip

10.18.10.3379
These drivers have been uploaded for your convenience here:
32bit - Dropbox - Intel_10.18.10.3379_x86.zip
64bit - Dropbox - Intel_10.18.10.3379_x64.zip

The above are ZIP files (repackaged from Windows Update CAB files) and you will need to extract the files and then manually install them through the device manager using the steps below:

  1. Extract the ZIP file contents into a folder (x86 or x64 depending upon your system)
  2. Open Device Manager (from Control Panel)
  3. Look for Display Adapters
  4. Expand it, (note the NAME of your graphics card you will need this in Step 12)
  5. Right click on your Intel graphics device and select Update Driver Software
  6. Select Browse my computer for driver software
  7. Select Let me pick from a list of device drivers from my computer
  8. Click on Have Disk
  9. Click Browse and select the folder where you extracted the file driver files in Step 1
  10. Select the setup information file igdlh and Click Open
  11. Click OK
  12. Select your Graphics card (see the name you noted in Step 4), name SURE you select the correct name here or it won’t work
  13. Click Next. If it gives a Update Driver Warning about Device driver is not recommended … go back and select the right Device Name. Do NOT proceed with the wrong device name as it may crash your system.
  14. It’ll give a warning about Windows can’t verify the publisher, click Install this driver anyway
  15. It’ll install the driver, you may need to reboot

How to Speed Up Conversions
Hardware encoding queries
How to fix Half Green Video screens after conversions
Big Brother Season 19 Conversion Issues
Get MCEBuddy to use NVidia GPU instead of Intel Integrated
Slow conversions randomly
Handbrake conversion failed with hardware encoder, retrying with default software encoder
Intermittent hardware encoding failure
2nd 1/2 of show is Black screen with audio
Confirming hardware encoding is working?
MCEBuddy - Solution to Common Errors and Issues
2.4.9 HW encode Trouble
After month of working fine, h/w encoding taking 3x longer
(Administrator) #2

#6

Just a heads up the nvidia gt 1030 does not support nvenc (hardware encoding). This is the only current exception to the rule that I know of.