[FFmpeg-user] Using a AMD Radeon RX5xx with ffmpeg

Lukas Obermann obermann.lukas at gmail.com
Mon Jul 23 22:30:34 EEST 2018


Hi all,

I want to use a RX570 for transcoding with ffmpeg. Have been looking into this for some time now and testing around various things.
I use Ubuntu 18.04 and I have it running with VAAPI. But the performance is not good imo. For a 1080p file I only get like 1.8x speed. I was expecting something around 6x to 8x.
Is VAAPI the right way to go here? I see that AMF is not yet ready for linux and VDPAU only support decoding, not encoding.

Following is the command:
ffmpeg -hwaccel vaapi -vaapi_device /dev/dri/card1 -hwaccel_output_format vaapi -i fs_experiental_method.avi -y -c:v h264_vaapi -profile:v main output.avi

ffmpeg version n4.0.2
mesa 18
amdgpu-pro-18.20-606296
libva: VA-API version 1.1.0

And here below the non-debug output of the command, to show the formats. 
I would appreciate any help on this.

Thanks!
Lukas


ffmpeg version n4.0.2-2 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
  configuration: --prefix=/usr --extra-version=2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared --enable-vaapi --enable-vdpau
  libavutil      56. 14.100 / 56. 14.100
  libavcodec     58. 18.100 / 58. 18.100
  libavformat    58. 12.100 / 58. 12.100
  libavdevice    58.  3.100 / 58.  3.100
  libavfilter     7. 16.100 /  7. 16.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  1.100 /  5.  1.100
  libswresample   3.  1.100 /  3.  1.100
  libpostproc    55.  1.100 / 55.  1.100
Input #0, avi, from 'fs_experiental_method.avi':
  Metadata:
    encoder         : Lavf57.83.100
  Duration: 00:33:38.10, start: 0.000000, bitrate: 8133 kb/s
    Stream #0:0: Video: h264 (Constrained Baseline) (H264 / 0x34363248), yuv420p(progressive), 1920x1080, 8057 kb/s, 30 fps, 30 tbr, 30 tbn, 60 tbc
    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 32000 Hz, mono, fltp, 64 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_vaapi))
  Stream #0:1 -> #0:1 (mp3 (mp3float) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
[h264_vaapi @ 0x55fcc47055c0] B frames are not supported (0x1) by the underlying driver.
[h264_vaapi @ 0x55fcc47055c0] Warning: some packed headers are not supported (want 0xd, got 0).
Output #0, avi, to 'output.avi':
  Metadata:
    ISFT            : Lavf58.12.100
    Stream #0:0: Video: h264 (h264_vaapi) (Main) (H264 / 0x34363248), vaapi_vld, 1920x1080, q=0-31, 30 fps, 30 tbn, 30 tbc
    Metadata:
      encoder         : Lavc58.18.100 h264_vaapi
    Stream #0:1: Audio: mp3 (libmp3lame) (U[0][0][0] / 0x0055), 32000 Hz, mono, fltp
    Metadata:
      encoder         : Lavc58.18.100 libmp3lame
frame=  202 fps= 52 q=-0.0 Lsize=    4309kB time=00:00:06.80 bitrate=5187.5kbits/s speed=1.74x    
video:4249kB audio:40kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.444606%


More information about the ffmpeg-user mailing list