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

Newegg Daily Deals

Reply
 
Thread Tools
Old 07-01-11, 06:08 PM   #1
DBabo
Registered User
 
Join Date: Dec 2010
Posts: 15
Default vdpau + ffmpeg - no workie ???

hello,
i just compiled ffmpeg with vdpau support:
Code:
FFmpeg version 0.6.1, Copyright (c) 2000-2010 the FFmpeg developers
  built on Jul  1 2011 18:18:20 with gcc 4.4.4 20100726 (Red Hat 4.4.4-13)
  configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables' --enable-avfilter --enable-avfilter-lavf --enable-libdc1394 --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
  libavutil     50.15. 1 / 50.15. 1
  libavcodec    52.72. 2 / 52.72. 2
  libavformat   52.64. 2 / 52.64. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libavfilter    1.19. 0 /  1.19. 0
  libswscale     0.11. 0 /  0.11. 0
  libpostproc   51. 2. 0 / 51. 2. 0
for formats:
Code:
ffmpeg -formats | grep vdpau
FFmpeg version 0.6.1, Copyright (c) 2000-2010 the FFmpeg developers
  built on Jul  1 2011 18:18:20 with gcc 4.4.4 20100726 (Red Hat 4.4.4-13)
  configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables' --enable-avfilter --enable-avfilter-lavf --enable-libdc1394 --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
  libavutil     50.15. 1 / 50.15. 1
  libavcodec    52.72. 2 / 52.72. 2
  libavformat   52.64. 2 / 52.64. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libavfilter    1.19. 0 /  1.19. 0
  libswscale     0.11. 0 /  0.11. 0
  libpostproc   51. 2. 0 / 51. 2. 0
and for codecs:
Code:
ffmpeg -codecs | grep vdpau      
FFmpeg version 0.6.1, Copyright (c) 2000-2010 the FFmpeg developers
  built on Jul  1 2011 18:18:20 with gcc 4.4.4 20100726 (Red Hat 4.4.4-13)
  configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables' --enable-avfilter --enable-avfilter-lavf --enable-libdc1394 --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
  libavutil     50.15. 1 / 50.15. 1
  libavcodec    52.72. 2 / 52.72. 2
  libavformat   52.64. 2 / 52.64. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libavfilter    1.19. 0 /  1.19. 0
  libswscale     0.11. 0 /  0.11. 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
from my reading around i understand that this should be sufficient for enabling the decode on GPU ( i have GT240).

yet when i run :
Code:
ffmpeg -i 13.avi -target ntsc-dvd -aspect 16:9 -o out.mpg

FFmpeg version 0.6.1, Copyright (c) 2000-2010 the FFmpeg developers
  built on Jul  1 2011 18:18:20 with gcc 4.4.4 20100726 (Red Hat 4.4.4-13)
  configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables' --enable-avfilter --enable-avfilter-lavf --enable-libdc1394 --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
  libavutil     50.15. 1 / 50.15. 1
  libavcodec    52.72. 2 / 52.72. 2
  libavformat   52.64. 2 / 52.64. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libavfilter    1.19. 0 /  1.19. 0
  libswscale     0.11. 0 /  0.11. 0
  libpostproc   51. 2. 0 / 51. 2. 0
[mpeg4 @ 0x88b5b00]Invalid and inefficient vfw-avi packed B frames detected

Seems stream 0 codec frame rate differs from container frame rate: 23.98 (65535/2733) -> 23.98 (10000000/417083)
Input #0, avi, from '13.avi':
  Metadata:
    ISFT            : VirtualDubMod 1.5.10.2 (build 2542/release)
  Duration: 02:21:51.49, start: 0.000000, bitrate: 3557 kb/s
    Stream #0.0: Video: mpeg4, yuv420p, 1280x534 [PAR 1:1 DAR 640:267], 23.98 tbr, 23.98 tbn, 23.98 tbc
    Stream #0.1: Audio: ac3, 48000 Hz, 5.1, s16, 384 kb/s
Output #0, dvd, to 'out.mpg':
  Metadata:
    encoder         : Lavf52.64.2
    Stream #0.0: Video: mpeg2video, yuv420p, 720x480 [PAR 32:27 DAR 16:9], q=2-31, 6000 kb/s, 90k tbn, 29.97 tbc
    Stream #0.1: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
i "enjoy" the 65% CPU consumption by ffmpeg.

Am i doing smth wrong ?
thank you
Andrew

Last edited by DBabo; 08-07-11 at 12:37 PM.
DBabo is offline   Reply With Quote
Old 07-02-11, 05:10 AM   #2
Gusar
Registered User
 
Join Date: Apr 2006
Posts: 277
Default Re: vdpau + ffmpeg - no workie ???

FFMpeg doesn't support readback from vram into system ram. So you can only use VDPAU to display hardware decoded video, not to transcode it.
Gusar is offline   Reply With Quote
Old 07-02-11, 10:29 AM   #3
DBabo
Registered User
 
Join Date: Dec 2010
Posts: 15
Default Re: vdpau + ffmpeg - no workie ???

Quote:
Originally Posted by Gusar View Post
FFMpeg doesn't support readback from vram into system ram. So you can only use VDPAU to display hardware decoded video, not to transcode it.
i see. Is there any other program that would allow to take advantage of VDPAU for transcoding?
DBabo is offline   Reply With Quote
Old 07-02-11, 03:30 PM   #4
artem
Registered User
 
Join Date: Jun 2006
Posts: 704
Default Re: vdpau + ffmpeg - no workie ???

mplayer and all (lib)xine based players
artem is offline   Reply With Quote
Old 07-02-11, 03:49 PM   #5
Gusar
Registered User
 
Join Date: Apr 2006
Posts: 277
Default Re: vdpau + ffmpeg - no workie ???

Quote:
Originally Posted by artem View Post
mplayer and all (lib)xine based players
I am *very* sure mplayer doesn't support readback. No idea about xine, but I don't think it does either. And even if it does, xine is a playback-only library, so not useful for transcoding.

The only app I know which supports readback is VLC, but I have no idea how sophisticated VLC's transcoding abilities are.
Gusar is offline   Reply With Quote
Old 07-03-11, 01:33 PM   #6
crisalide
Registered User
 
Join Date: Dec 2008
Posts: 173
Default Re: vdpau + ffmpeg - no workie ???

MLT does, but do not expect a big speed increase, because in the transcoding chain, decoding is not the big part and because vram to sysram copy requires approx as much cpu time as soft decoding. In short, don't count on vdpau to speed up transcoding significantly.
crisalide is offline   Reply With Quote
Old 07-04-11, 05:39 PM   #7
DBabo
Registered User
 
Join Date: Dec 2010
Posts: 15
Default Re: vdpau + ffmpeg - no workie ???

Quote:
Originally Posted by crisalide View Post
MLT does,.... In short, don't count on vdpau to speed up transcoding significantly.
are you referring to MLT or to VLC transcoding speed ?
DBabo is offline   Reply With Quote
Old 07-20-11, 12:19 PM   #8
DBabo
Registered User
 
Join Date: Dec 2010
Posts: 15
Default Re: vdpau + ffmpeg - no workie ???

Quote:
Originally Posted by crisalide View Post
MLT does, but do not expect a big speed increase, because in the transcoding chain, decoding is not the big part and because vram to sysram copy requires approx as much cpu time as soft decoding. In short, don't count on vdpau to speed up transcoding significantly.
well, you guys and crisilide were right. To satisfy my curiosity bug i went ahead and compiled the vlc + vaapi and vdpau. And here are my results:

I ran
Code:
 cvlc --ffmpeg-hw A_File.avi --sout='#transcode{vcodec=mp1v,vb=1024,acodec=mpga,ab=128}:std{access=file,mux=ts,dst=./Trans_hw.mpg}'
cvlc A_File.avi --sout='#transcode{vcodec=mp1v,vb=1024,acodec=mpga,ab=128}:std{access=file,mux=ts,dst=./Trans.mpg}'
Here are some metrics:
to convert 668Mb avi file to mpg on 2Gb AMD Sempron 3200 system"
HW enabled transcoding ~ 40 minutes, CPU utilization ~80%
no HW enabled ~30 minutes, CPU utilization ~ 97% ( full load).

Thank you for your help and advise!
Andrew

P.S. Link to vlc forums with my steps ( to get vlc _ vdpau working) and some discussion. http://forum.videolan.org/viewtopic....304401#p304401

Last edited by DBabo; 07-20-11 at 12:22 PM. Reason: added link to vlc forum
DBabo 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.