Record of some of the computer tech I deal with so that it's documented at least somewhere.

Friday, 30 April 2010

Mplayer using Nvidia Vdpau

I did a side by side projection last night. Two 1280x768 projectors pretending to be 1280x1024 (I can probably drive them dot for dot but I didn't have enough tinker time).

Instead of the MatroxDualHeadToGo I used mplayer with Jason Holt's udp-patch.

The playback machine has two Nvidia 8600GTs and I used one for each projector.

The mp4s were only 25Mb each, even so I played them from RAMdisk

# ls -l /dev/shm/LR
total 47164
-rw-r--r-- 1 maht maht 22602673 Apr 29 12:16 L.mp4
-rw-r--r-- 1 maht maht 25579796 Apr 29 12:16 R.mp4


With Vdpau

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3884 maht 20 0 220m 45m 17m R 24 0.6 32:23.67 mpu
3886 maht 20 0 221m 45m 17m R 23 0.6 31:07.02 mpu

# cat /proc/3884/cmdline | tr '\0' ' '
mpu -vo vdpau -fs -zoom -fixed-vo -udp-master -loop 0 -input file=/dev/null /dev/shm/LR/R.mp4

# cat /proc/3886/cmdline | tr '\0' ' '
mpu -vo vdpau -framedrop -fs -zoom -fixed-vo -udp-slave -loop -0 -input file=/dev/null /dev/shm/LR/L.mp4


Without Vdpau

DISPLAY=:0.1 mpu -vo xv -framedrop -fs -zoom -fixed-vo -udp-slave -loop -0 -input 'file=/dev/null' /dev/shm/LR/L.mp4 &
DISPLAY=:0.0 mpu -vo xv -fs -zoom -fixed-vo -udp-master -loop 0 -input 'file=/dev/null' /dev/shm/LR/R.mp4

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
4252 maht 20 0 221m 47m 20m R 31 0.6 0:16.00 mpu
4253 maht 20 0 221m 47m 20m R 30 0.6 0:14.82 mpu
3860 root 20 0 114m 40m 26m R 15 0.5 0:16.31 X


So for this low bandwidth mp4 using vdpau saved me 25 %CPU points on the quad core, or even 1 whole CPU if you think about how it will get scheduled with > 2 cores. Looks tasty for the dual core player.

No comments: