Hardware acceleration guide

General sales, licences, relationship issues

Moderators: Cougar_II, Claire, Benjamin, Forum admin

Hardware acceleration guide

Postby cedric » Tue Nov 13, 2012 10:57 am

Hi all,

The marjority of VSO software video products supports hardware acceleration, but many users don't know what that means.
To know if you should enable or not these options, follow this guide.

A conversion process can be separated in 3 parts:
- decode the source: all tracks (audio, video and subtitle) of the source file must be decoded first
- process the decoded data: resize video source and apply padding/cropping/rotate if needed, transform audio source to target format (sample rate, channel count, sample format...), resize subtitles
- encode the final file: once data is processed, send it to encoder engine. It will generate encoded data with requested codec/format.

Hardware acceleration can be used for part 1 (decoding) and part 3 (encoding).


First step: the video decoding (before encoding a file, we need to decode the source...)

The normal way (not the hardware way) to decode the video part of a multimedia file is to use the computer main processor (CPU).
The "problem" is the CPU is not only used to decode the video part of the source file, but also to decode the audio part, and in a conversion process the CPU is used to compute audio and video encoding too.

This process chain (decode audio/video then encode audio/video) can result in high CPU usage, especially with some video codecs like H264. A too high CPU usage gives a high computer latency time and seems to be locked.
To resolve this problem, we can delegate video part decoding to the graphic card processor (GPU). In doing so, the main CPU usage is decreased and computer becomes more reactive.The majority of graphic cards (NVidia, ATI...) supports this feature. To use hardware acceleration function, we use a Microsoft access layer called "DXVA2" (DirectX Video Acceleration).

A frequently asked question is "If using hardware acceleration is better, why this is an option and you don't use it all the time?".
The purpose of DXVA2 is to play (decode) a multimedia file in real time (30 frames by second max), not more!
For example, if your computer is able to encode at 80 Fps but the hardware decoding can decode only at 30 Fps, the final processing rate can be only of 30 Fps.
To know if hardware decoding is more effective than CPU usage on your computer, the best way is to start a conversion without any hardware acceleration.
If the encoding rate (you can see the FPS in the software interface) is bigger than 30 Fps, forget the hardware acceleration...

Important: Your graphic card can supports DXVA2, but not all video codecs. For example, some graphic cards supports Mpeg1, Mpeg2 but not Mpeg4 or H264...
If the video codec of source file is supported by your graphic card, you will see a log entry giving more details about video codec and graphic card used for hardware decoding like:
h264: using hardware decoder adapter #2 - NVIDIA GeForce GT 240, vendor 0x10DE (NVIDIA), device 0x0CA3, revision 162


Second step: the video encoding (the source video part is decoded, we need to encode it to another format now...)

This part will only help users having an NVidia graphic card supporting CUDA feature. If you do not have this, you can ignore this section.

Same thing as hardware decoding, the video encoding process can be delegated to the Graphic Card Processor.
This nice feature called "CUDA" developed by NVidia allow to encode a video stream using the GPU. The big difference with DXVA2 is the encoding rate is not limited to real time, but only by GPU speed & capabilities. (CUDA cores number can be a good indication. more cores the graphic card have, faster will be the encoding process).
Same as DXVA2, the only way to know if hardware encoding must be enabled is by testing with and without. In the majority of cases, CUDA option enabled will give better results.

Important: NVidia CUDA encoding is only used to encode a file with H264 and VC1 codecs. For all other codecs, we use main CPU. This means that this option is not available in ConvertXtoDVD (which encodes to mpeg2).


If you need more details, you can post any question in this thread.

Regards,
User avatar
cedric
VSO Team Member
 
Posts: 1375
Joined: Fri May 02, 2008 9:31 am
Location: Toulouse-FRANCE

Re: Hardware acceleration guide

Postby Blitter » Wed Nov 14, 2012 8:48 am

A frequently asked question is "If using hardware acceleration is better, why this is an option and you don't use it all the time?".
The purpose of DXVA2 is to play (decode) a multimedia file in real time (30 frames by second max), not more!
For example, if your computer is able to encode at 80 Fps but the hardware decoding can decode only at 30 Fps, the final processing rate can be only of 30 Fps.
To know if hardware decoding is more effective than CPU usage on your computer, the best way is to start a conversion without any hardware acceleration.
If the encoding rate (you can see the FPS in the software interface) is bigger than 30 Fps, forget the hardware acceleration...

Even at only 30fps hardwardware acceleration may be useful because it reduces the CPU load making the PC more responsive for other tasks.
Blitter
 

Re: Hardware acceleration guide

Postby igor_lvk » Fri Apr 19, 2013 1:43 pm

Hi there! Just want to ask. Why convertx do not use graphic card at full speed? I've got Geforce590 and so? The time of converting is 20 hours using best video quality!!! What a silly using of a "hardware acceleration" What CUDA you talk about!? If you really used a graphic card it wouldn't take so much time. By the way processor is core2duo 3.33Ghz
igor_lvk
 
Posts: 362
Joined: Fri Apr 19, 2013 12:53 pm


Return to Sales and general questions

Who is online

Users browsing this forum: No registered users and 0 guests