0

I have an Ubuntu PC with no video card.

I use avconv for video conversion:

avconv -i video.wmv -c:v libx264 -c:a libmp3lame -b:v 1800K video.mp4

My CPU (Intel Core i7-4770K) processes 1.5-2Gb video in around 7-10 minutes.

In the avconv github sources I saw the options

Hardware accelerators:
  --enable-d3d11va         enable D3D11VA code
  --enable-dxva2           enable DXVA2 code
  --enable-vaapi           enable VAAPI code
  --enable-vda             enable VDA code
  --enable-vdpau           enable VDPAU code

I am thinking of compiling avconv with --enable-vdpau and putting a video card into the PC.

Does this allow avconv to use the video card for video conversion?

How can this increase the speed of video conversion (I mean my command)?

Can you help me to do this test, if you have avconv in your PC with a video card?

Here is an example of WMV.

psmears
  • 26,070
  • 4
  • 40
  • 48
Alex Bern
  • 1
  • 1
  • 2

1 Answers1

0

If you don't want to compile anything from source or use PPAs for extra packages, you can first see what the distribution has to offer:

$ avconv -codecs | grep vdpau
avconv version 9.18-6:9.18-0ubuntu0.14.04.1, Copyright (c) 2000-2014 the Libav developers
  built on Mar 16 2015 13:19:10 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
DEV.L. mpeg1video           MPEG-1 video (decoders: mpeg1video mpeg1video_vdpau )
DEV.L. mpeg2video           MPEG-1 video (decoders: mpeg2video mpegvideo_vdpau )
DEV.L. mpeg4                MPEG-4 part 2 (decoders: mpeg4 mpeg4_vdpau ) (encoders: mpeg4 libxvid )
DEV.LS h264                 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_vdpau ) (encoders: libx264 )
D.V.L. vc1                  SMPTE VC-1 (decoders: vc1 vc1_vdpau )
D.V.L. wmv3                 Windows Media Video 9 (decoders: wmv3 wmv3_vdpau )

Look carefully at the letters "D" - for decoding, "E" for encoding. As you see, VDPAU is only for decoding - it won't help you with encoding the video back. You'd have to measure if this:

avconv -vcodec wmv3_vdpau -i video.wmv -c:v libx264 -c:a libmp3lame -b:v 1800K video.mp4

... gives you any improvement in the tanscoding time.

From my experience the VDPAU is great for watching video - Mplayer2 and VLC support it for display, and I got Mplayer2 to use it also for h264 decoding. The same 1080p clip can play with 80% CPU load on 2 cores with software decoding, and 5-10% CPU load when both the decoding and presentation (video output) is done via VDPAU.

For encoding you could research AMD's VCE, Intel's QuickSync and Nvidia's NVENC (alphabetical order).

Meantime, from ffmpeg:

I had problems with getting avconv to use VDPAU for decoding. Then I stumbled upon this (recommended reading for this kind of question anyway): https://trac.ffmpeg.org/wiki/HWAccelIntro

-> it seems that the VDPAU decoders support state is:

Actually yes, but is deprecated and should not be used.

So, the final answer is - a card with VDPAU is likely of no advantage in your situation.

Tomasz Gandor
  • 8,235
  • 2
  • 60
  • 55