CUDA H.264 transcoding test report in MediaCoderMediaCoder的CUDA H.264编码技术预览及测试报告 (zoominla posted on June 9th, 2009 )

NVIDIA’s cutting-edge CUDA tech is cool, and it’s been talking about throughout the internet. Also it’s attractive to us, we started cuda working from the start of the year. After a period of hard working, we finally successfully integrated it into MediaCoder, it’s very awsome. We can’t wait to annouce it and publish the test report.

The report mainly compares transcoding performance between CUDA-accelerated H.264 and X264. There are two parts, one is performance on HD encoding, the other is on low resolution encoding.
近两年NVIDIA的CUDA技术似乎成为业界新宠,其优良的科学运算加速能力确实首屈一指,引领着并行运算潮流,各行业都纷纷采用它来加速,搞得我们也跃跃欲试,呵呵,另外还有很多网友对MediaCoder的厚爱,希望在MC上体验一下CUDA加速的快感,于是我们决定了用CUDA加速MediaCoder转码。
年初我们几个开发人员就开始酝酿着采用CUDA加速H.264编码,毕竟H.264现在比较火,还是比较有前途。经过一段时间的紧张的开发,CUDA加速的H264编码器终于诞生,让性能卓越的MediaCoder有添一利器。废话不多说,下面贴一下内部测试的结果以飨各位网友,主要与x264编码性能做个对比。

Test platform:   CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 5200+

GPU: NVIDIA GeForce 9600 GT

Memory: DDR2 2G

Source video: transformer.mov preview clip (1920X800), details as fowllowing:

1. Test one: HD encoding(output: 1920X800)

CUDA H264 encoding result

video info get from MediaInfo:

Video
ID                               : 1
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : High@L4.0
Format settings, CABAC           : Yes
Format settings, ReFrames        : 2 frames
Codec ID                         : avc1
Codec ID/Info                    : Advanced Video Coding
Duration                         : 2mn 16s
Bit rate mode                    : Variable
Bit rate                         : 4 801 Kbps
Maximum bit rate                 : 14.7 Mbps
Width                            : 1 920 pixels
Height                           : 800 pixels

X264 result

video info get from MediaInfo:
Video
ID                               : 1
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : High@L4.0
Format settings, CABAC           : Yes
Format settings, ReFrames        : 2 frames
Codec ID                         : avc1
Codec ID/Info                    : Advanced Video Coding
Duration                         : 2mn 16s
Bit rate mode                    : Variable
Bit rate                         : 4 808 Kbps
Nominal bit rate                 : 5 000 Kbps
Maximum bit rate                 : 14.8 Mbps
Width                            : 1 920 pixels
Height                           : 800 pixels

2. Test two: low resolution encoding(output: 480X272)

CUDA H.264 Result

x264 Result

Conclusion: Generally, CUDA H.264 Encoder is superior to x264 Encoder on my platform(midrange NV GPU and midrange dual-core CPU). Especially doing HD transcoding, CUDA H.264 Encoder is 3~4 times as faster as X264 encoder.

测试片源为 “变形金刚”预告片高清版(1920X800), 影片属性如下图所示:

测试平台: 处理器 AMD Athlon(tm) 64 X2 Dual Core Processor 5200+
显示卡 NVIDIA GeForce 9600 GT
内存 威刚万紫千红DDR2 800  2G
系统 Windows XP SP3

测试一: 低分辨率输出(480X272), 音频复制,CUDA加速的H264编码及x264编码结果如下图:
CUDA H.264结果


目标格式用MediaInfo查看,主要参数为:
Video
ID                               : 1
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : Main@L2.1
Format settings, CABAC           : Yes
Format settings, ReFrames        : 2 frames
Codec ID                         : avc1
Codec ID/Info                    : Advanced Video Coding
Duration                         : 2mn 16s
Bit rate mode                    : Variable
Bit rate                         : 607 Kbps
Maximum bit rate                 : 2 317 Kbps
Width                            : 480 pixels
Height                           : 272 pixels

X264 结果

目标格式用MediaInfo查看,主要参数为:
Video
ID                               : 1
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : Main@L2.1
Format settings, CABAC           : Yes
Format settings, ReFrames        : 2 frames
Codec ID                         : avc1
Codec ID/Info                    : Advanced Video Coding
Duration                         : 2mn 16s
Bit rate mode                    : Variable
Bit rate                         : 607 Kbps
Maximum bit rate                 : 2 317 Kbps
Width                            : 480 pixels
Height                           : 272 pixels

测试二: 高清输出(1920X800), 音频复制,CUDA加速的H264编码及x264编码结果如下图:
CUDA H.264结果


X264 结果

结论: CUDA H264编码在中档NV显卡及中档的双核CPU平台上的性能明显优于x264编码。尤其是高清编码,采用
高规格时,CUDA H264编码性能是x264的 3~4倍。

PS:好消息,MediaCoder今天发布CUDA版的测试版!

COMMENTS: 10 Comments »

10 Responses

  1. CM says:

    HI: since the AVIVO codec now works pretty well for most windows OSs (even 64 bits) I’m just wondering if you will support ATI STREAM for MEDIACODER soon. Thanks

  2. Hi, could you please support ATI’s Stream too.

    Thanks.

  3. mediaman_o says:

    Due to license issues, the CUDA encoder is temporaliy disabled.

    So i can’t use the CUDA Speed…

  4. stanley says:

    Sorry for that. We need a new license to be signed with nvidia before we can re-enable this feature.

  5. mbloch says:

    What about quality ?

  6. mbloch says:

    by the way please compare cuda encoder speed vs AMD Phenome x4.

  7. St Devious says:

    How long until you get the license from Nvidia ?

    I thought CUDA was supposed to be free.

  8. square says:

    to bad. how long will it take until you can reenable CUDA?

  9. stanley says:

    We have not yet received the license document from nvidia which they claimed to send us this week.

  10. Matt says:

    Does the cudaH264enc.exe encoder have a bitrate limit? I have a large (12GB) move that was trying to transcode to a bitrate of 9700 kbps. The maximum it would outupt was about 4500 kbps. Just wondering.
    I could never get it to work from the command line either, even if i did a cut/paste from the console. Always said it was missing a needed parameter…