HD Video Playback With A $20 CPU & $30 GPU On Linux

Written by Michael Larabel in Processors on 11 December 2008 at 03:00 AM EST. Page 2 of 9. 34 Comments.

Aside from the AMD Sempron and NVIDIA 8400GS, the rest of our system consisted of an ECS A780GM-A motherboard, 2GB of DDR2-800MHz memory, and a 250GB Seagate Barracuda ST3250310AS SATA HDD. The NVIDIA graphics card was driving a Samsung SyncMaster 305T 30" LCD and the resolution we selected was 1920 x 1080. The Linux distribution running on this system was Ubuntu 8.10 with the Linux 2.6.27 kernel, X Server 1.5.2, and GCC 4.3.2. We were using the latest driver at the time of testing, which is NVIDIA 180.11 and it was released just about a week ago. We had used the MPlayer SVN code from December 9, 2008 and the MPlayer VDPAU patches we used were version 3139462 and dated November 26, 2008. Over NVIDIA's original patches, the 3139462 set has a few fixes when it comes to supplying only H.264 slice data and not any unused headers, increasing the H.264 MAX_SLICES, handle H.264 streams inside containers that strip the H.264 start codes such as MOV and MKV, and various code clean-ups based upon feedback from the MPlayer and FFmpeg developers.

For the testing on this low-end hardware we had looked at the MPEG, H.264, and WMV3 formats. VDPAU does support accelerating VC-1, but this support can only be found on a few very select NVIDIA GPUs. With each test we had monitored the CPU usage during video playback without specifying any video output or video codec options and then again when using VDPAU for the codec and output module. The VDPAU codec for MPEG is ffmpeg12vdpau, H.264 is ffh264vdpau, and WMV3 is ffwmv3vdpau. To use VDPAU with a patched version of MPlayer can be done by running mplayer -vc <VDPAU-codec> -vo vdpau <video-file>. We had also used the -fs option to play all videos in full-screen mode. To monitor the CPU usage we had used the Phoronix Test Suite (the Tydal 1.6.0 Alpha 2 release) and executed MONITOR=all ./phoronix-test-suite benchmark idle to monitor the system sensors while the Phoronix Test Suite just idled for varying lengths of time.

After running all of these tests to see how well the video playback was offloaded to the GPU, we took the testing one-step further. Using the Phoronix Test Suite to benchmark the compile-time for the Linux kernel we had tried to play a high-resolution H.264 video file while the single-core processor was busy with compiling the kernel. We recorded a video of the process with and without NVIDIA's VDPAU.


Related Articles