Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 11-25-10, 09:11 AM   #1
guro_nah
Registered User
 
Join Date: Nov 2010
Posts: 1
Default NVIDIA VDPAU doesn't works.

Hello there!

I have a strange problem. I want to use nvidia VDPAU to speed up decode video.

Configuration: Open suse 11.2, nVIDIA GeForce GTX 480, intel core 2 duo, 2G Ram.
I've install nvidia display drivers v260.

I have install ffmpeg and mplayer with vdpau from packman repository.

Code:
ffmpeg -codecs | grep vdpau
FFmpeg version SVN-r25702, Copyright (c) 2000-2010 the FFmpeg developers
  built on Nov 23 2010 15:20:23 with gcc 4.4.1 [gcc-4_4-branch revision 150839]
  configuration: --shlibdir=/usr/lib64 --prefix=/usr --mandir=/usr/share/man --libdir=/usr/lib64 --enable-shared --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libxvid --enable-postproc --enable-gpl --enable-x11grab --extra-cflags='-fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -fPIC -I/usr/include/gsm' --enable-debug --disable-stripping --enable-libschroedinger --enable-libdirac --enable-libgsm --enable-avfilter --enable-libvpx --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libdc1394 --enable-pthreads
  libavutil     50.32. 6 / 50.32. 6
  libavcore      0.12. 0 /  0.12. 0
  libavcodec    52.94. 3 / 52.94. 3
  libavformat   52.84. 0 / 52.84. 0
  libavdevice   52. 2. 2 / 52. 2. 2
  libavfilter    1.57. 0 /  1.57. 0
  libswscale     0.12. 0 /  0.12. 0
  libpostproc   51. 2. 0 / 51. 2. 0
 D V D  h264_vdpau      H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (VDPAU acceleration)
 D V DT mpeg1video_vdpau MPEG-1 video (VDPAU acceleration)
 D V DT mpeg4_vdpau     MPEG-4 part 2 (VDPAU)
 D V DT mpegvideo_vdpau MPEG-1/2 video (VDPAU acceleration)
 D V D  vc1_vdpau       SMPTE VC-1 VDPAU
 D V D  wmv3_vdpau      Windows Media Video 9 VDPAU

When I use mplayer to watch videos with vdpau, it works correctly, CPU load is about 3-5%.

Example:
Code:
mplayer -vo vdpau -vc ffh264vdpau Grey.ts
MPlayer dev-SVN-r31930-4.4-openSUSE Linux 11.2 (x86_64)-Packman (C) 2000-2010 MPlayer TeamCan't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing Grey.ts.
TS file format detected.
VIDEO H264(pid=255) AUDIO A52(pid=259) NO SUBS (yet)!  PROGRAM N. 1000
FPS seems to be: 25.000000
==========================================================================
Forced video codec: ffh264vdpau
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264vdpau] vfm: ffmpeg (FFmpeg H.264 (VDPAU))
==========================================================================
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
[ac3 @ 0xcc5e60]frame sync error
AUDIO: 48000 Hz, 2 ch, s16le, 448.0 kbit/29.17% (ratio: 56000->192000)
Selected audio codec: [ffac3] afm: ffmpeg (FFmpeg AC-3)
==========================================================================
AO: [oss] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
[VD_FFMPEG] Trying pixfmt=0.
Movie-Aspect is 1.76:1 - prescaling to correct movie aspect.
VO: [vdpau] 1920x1088 => 1920x1088 H.264 VDPAU acceleration
[VD_FFMPEG] XVMC-accelerated MPEG-2.
A:40344.9 V:40344.9 A-V: -0.000 ct:  2.705 805/805  1%  0%  0.6% 1 0
TS_PARSE: COULDN'T SYNC
[ac3 @ 0xcc5e60]incomplete frame
[ac3 @ 0xcc5e60]frame sync error
A:40347.6 V:40348.9 A-V: -1.319 ct:  0.399 904/904  1%  0%  0.6% 1 0


Exiting... (End of file)

But when I try to convert the same file with ffmpeg or mencoder, it fails.

Code:
mencoder Grey.ts -o test.avi -vc ffh264vdpau -oac copy -ovc lavc -lavcopts vcodec=mjpeg
MPlayer dev-SVN-r31930-4.4-openSUSE Linux 11.2 (x86_64)-Packman (C) 2000-2010 MPlayer Teamsuccess: format: 0  data: 0x0 - 0x21d0d00
TS file format detected.                                                                                                           
VIDEO H264(pid=255) AUDIO A52(pid=259) NO SUBS (yet)!  PROGRAM N. 1000                                                             
FPS seems to be: 25.000000                                                                                                         
[V] filefmt:29  fourcc:0x10000005  size:1920x1088  fps:25.000  ftime:=0.0400                                                       
==========================================================================                                                         
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders                                                                   
[ac3 @ 0x15310f0] frame sync error                                                                                                 
AUDIO: 48000 Hz, 2 ch, s16le, 448.0 kbit/29.17% (ratio: 56000->192000)                                                             
Selected audio codec: [ffac3] afm: ffmpeg (FFmpeg AC-3)                                                                            
==========================================================================                                                         
Opening video filter: [expand osd=1]                                                                                               
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1                                                                       
==========================================================================                                                         
Forced video codec: ffh264vdpau                                                                                                    
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family                                                                   
Selected video codec: [ffh264vdpau] vfm: ffmpeg (FFmpeg H.264 (VDPAU))                                                             
==========================================================================                                                         
audiocodec: framecopy (format=2000 chans=2 rate=48000 bits=16 B/s=56000 sample-1)                                                  
[VD_FFMPEG] Trying pixfmt=0.                                                                                                       
Could not find matching colorspace - retrying with -vf scale...                                                                    
Opening video filter: [scale]                                                                                                      
The selected video_out device is incompatible with this codec.                                                                     
Try appending the scale filter to your filter list,                                                                                
e.g. -vf spp,scale instead of -vf spp.                                                                                             
[h264_vdpau @ 0x18c6890] decoding to PIX_FMT_NONE is not supported.                                                                
[h264_vdpau @ 0x18c6890] decode_slice_header error                                                                                 
[VD_FFMPEG] Trying pixfmt=0.                                                                                                       
Could not find matching colorspace - retrying with -vf scale...                                                                    
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
Try appending the scale filter to your filter list,
e.g. -vf spp,scale instead of -vf spp.
[h264_vdpau @ 0x18c6890] decoding to PIX_FMT_NONE is not supported.
[h264_vdpau @ 0x18c6890] decode_slice_header error
[VD_FFMPEG] Trying pixfmt=0.
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
Try appending the scale filter to your filter list,
e.g. -vf spp,scale instead of -vf spp.
[h264_vdpau @ 0x18c6890] decoding to PIX_FMT_NONE is not supported.
[h264_vdpau @ 0x18c6890] decode_slice_header error
[VD_FFMPEG] Trying pixfmt=0.
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
Try appending the scale filter to your filter list,
e.g. -vf spp,scale instead of -vf spp.
[h264_vdpau @ 0x18c6890] decoding to PIX_FMT_NONE is not supported.
[h264_vdpau @ 0x18c6890] decode_slice_header error
[VD_FFMPEG] Trying pixfmt=0.
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
Try appending the scale filter to your filter list,
e.g. -vf spp,scale instead of -vf spp.
[h264_vdpau @ 0x18c6890] decoding to PIX_FMT_NONE is not supported.
[h264_vdpau @ 0x18c6890] decode_slice_header error
[VD_FFMPEG] Trying pixfmt=0.
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
Try appending the scale filter to your filter list,
e.g. -vf spp,scale instead of -vf spp.
[h264_vdpau @ 0x18c6890] decoding to PIX_FMT_NONE is not supported.
[h264_vdpau @ 0x18c6890] decode_slice_header error
[h264_vdpau @ 0x18c6890] no frame!
Error while decoding frame!

Exiting...

with ffmpeg:

Code:
ffmpeg -vcodec h264_vdpau -i Grey.ts -f null /dev/null
FFmpeg version SVN-r25702, Copyright (c) 2000-2010 the FFmpeg developers              
  built on Nov 23 2010 15:20:23 with gcc 4.4.1 [gcc-4_4-branch revision 150839]       
  configuration: --shlibdir=/usr/lib64 --prefix=/usr --mandir=/usr/share/man --libdir=/usr/lib64 --enable-shared --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libxvid --enable-postproc --enable-gpl --enable-x11grab --extra-cflags='-fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -fPIC -I/usr/include/gsm' --enable-debug --disable-stripping --enable-libschroedinger --enable-libdirac --enable-libgsm --enable-avfilter --enable-libvpx --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libdc1394 --enable-pthreads                                                       
  libavutil     50.32. 6 / 50.32. 6                                                                                                                                                
  libavcore      0.12. 0 /  0.12. 0                                                                                                                                                
  libavcodec    52.94. 3 / 52.94. 3                                                                                                                                                
  libavformat   52.84. 0 / 52.84. 0                                                                                                                                                
  libavdevice   52. 2. 2 / 52. 2. 2                                                                                                                                                
  libavfilter    1.57. 0 /  1.57. 0                                                                                                                                                
  libswscale     0.12. 0 /  0.12. 0                                                                                                                                                
  libpostproc   51. 2. 0 / 51. 2. 0       
......
Input #0, mpegts, from 'Grey.ts':                                                                                                                                                  
  Duration: 00:00:33.44, start: 40315.457822, bitrate: 8481 kb/s                                                                                                                   
  Program 1000                                                                                                                                                                     
    Stream #0.0[0xff]: Video: h264, yuvj420p, 1920x1088 [PAR 1:1 DAR 30:17], 27.45 fps, 25 tbr, 90k tbn, 50 tbc                                                                    
    Stream #0.1[0x103](???): Audio: ac3, 48000 Hz, stereo, s16, 448 kb/s                                                                                                           
[buffer @ 0x63f730] w:1920 h:1088 pixfmt:yuvj420p                                                                                                                                  
Output #0, null, to '/dev/null':                                                                                                                                                   
  Metadata:                                                                                                                                                                        
    encoder         : Lavf52.84.0                                                                                                                                                  
    Stream #0.0: Video: rawvideo, yuvj420p, 1920x1088 [PAR 1:1 DAR 30:17], q=2-31, 200 kb/s, 90k tbn, 25 tbc                                                                       
    Stream #0.1(???): Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s                                                                                                           
Stream mapping:                                                                                                                                                                    
  Stream #0.0 -> #0.0                                                                                                                                                              
  Stream #0.1 -> #0.1                                                                                                                                                              
Press [q] to stop encoding                                                                                                                                                         
[ac3 @ 0x63e3c0] frame sync error                                                                                                                                                  
Error while decoding stream #0.1    

Error while decoding stream #0.0                                                                                                                                                   
[h264_vdpau @ 0x63c490] decoding to PIX_FMT_NONE is not supported.                                                                                                                 
[h264_vdpau @ 0x63c490] decode_slice_header error                                                                                                                                  
[h264_vdpau @ 0x63c490] decoding to PIX_FMT_NONE is not supported.                                                                                                                 
[h264_vdpau @ 0x63c490] decode_slice_header error                                                                                                                                  
[h264_vdpau @ 0x63c490] decoding to PIX_FMT_NONE is not supported.                                                                                                                 
[h264_vdpau @ 0x63c490] decode_slice_header error                                                                                                                                  
[h264_vdpau @ 0x63c490] decoding to PIX_FMT_NONE is not supported.                                                                                                                 
[h264_vdpau @ 0x63c490] decode_slice_header error                                                                                                                                  
[h264_vdpau @ 0x63c490] no frame!

Where is problem? May be, VDPAU send result of decode to video device directly, and we can't get intermediate result? How to make it works?

Sorry for my bad English.
guro_nah is offline   Reply With Quote
Old 11-25-10, 10:45 AM   #2
cehoyos
FFmpeg developer
 
Join Date: Jan 2009
Location: Vienna, Austria
Posts: 467
Default Re: NVIDIA VDPAU doesn't works.

Quote:
Originally Posted by guro_nah View Post
But when I try to convert the same file with ffmpeg or mencoder, it fails.
FFmpeg and MEncoder do not support VDPAU decoding, and this is not the right place to discuss this (MPlayer and FFmpeg mailing lists and bug tracker are).
Note that several people believe it is unlikely you will ever get any speedup from using VDPAU for transcoding on real world hardware like your Core 2 Duo. (Even if that turns out to be wrong, the speedup will be limited.)

Carl Eugen
cehoyos is offline   Reply With Quote
Old 11-29-10, 11:02 AM   #3
Stephen Warren
Moderator
 
Stephen Warren's Avatar
 
Join Date: Aug 2005
Posts: 1,327
Default Re: NVIDIA VDPAU doesn't works.

In practice, many application developers are seeing significant speedup while transcoding and using the GPU to decode the video. However, the overhead of transferring the decoded video back to the CPU for CPU encoding is high, so the speedups probably rely on using the GPU to perform at least part of the encoding process using CUDA.
Stephen Warren is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 06:44 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.