Body: <p>Why in ffmpeg do I have VAAPI encoders but no VAAPI decoders?  I have used VAAPI encoders successfully, but would like to use VAAPI for decoding as well (specifically, mpeg2_vaapi decoding).  I build my own ffmpeg from git master branch, so am I missing configure options or libraries for decoding?</p>
  
  <pre><code>$ ffmpeg -version
  ffmpeg version N-91119-g2940af9389 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
  configuration: --prefix=/usr/local --enable-shared --enable-pic --enable-rpath --extra-ldflags='-Wl,-rpath,/usr/local/lib' --enable-libx264 --enable-libx265 --enable-libxvid --enable-libvorbis --enable-nonfree --enable-gpl --enable-zlib --enable-libmp3lame --enable-libfdk-aac --enable-libv4l2 --enable-libbluray --enable-libvpx --enable-libwebp --enable-libmfx --enable-vaapi --enable-vdpau --enable-opencl
  libavutil      56. 18.102 / 56. 18.102
  libavcodec     58. 19.102 / 58. 19.102
  libavformat    58. 14.100 / 58. 14.100
  libavdevice    58.  4.100 / 58.  4.100
  libavfilter     7. 24.100 /  7. 24.100
  libswscale      5.  2.100 /  5.  2.100
  libswresample   3.  2.100 /  3.  2.100
  libpostproc    55.  2.100 / 55.  2.100
  $
  
  $ ffmpeg -encoders 2&gt;&amp;1|grep _vaapi
   V..... h264_vaapi           H.264/AVC (VAAPI) (codec h264)
   V..... hevc_vaapi           H.265/HEVC (VAAPI) (codec hevc)
   V..... mjpeg_vaapi          MJPEG (VAAPI) (codec mjpeg)
   V..... mpeg2_vaapi          MPEG-2 (VAAPI) (codec mpeg2video)
   V..... vp8_vaapi            VP8 (VAAPI) (codec vp8)
   V..... vp9_vaapi            VP9 (VAAPI) (codec vp9)
  $
  
  $ ffmpeg -decoders 2&gt;&amp;1|grep _vaapi
  $ 
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-22T15:05:07.947Z
Comments.Text: Don't have access to a linux box now, but it should be `ffmpeg -hwaccel vaapi -i file ...`
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-22T17:09:22.847Z
Comments.Text: This is what I am using, but Is there a way to verify the decoder is actually using VAAPI?  There is no indication of it in the ffmpeg output (that I've spotted).  And when I also use VAAPI encoding, Linux is reporting 50% CPU usage on the ffmpeg process (although this is down from 200% when using non-VAAPI encoding).  So what I'm saying is I'm confident the encoder is working, but I see no indication the decoder is using VAAPI.
Comments.UserDisplayName: acker9
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-22T17:10:50.203Z
Comments.Text: See the stream mapping lines
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-22T17:36:10.800Z
Comments.Text: Ok.  This is what I see: `Stream #0:0 -> #0:0 (mpeg2video (native) -> mpeg2video (mpeg2_vaapi))`.  mpeg2video (native) leads me to believe it's not using VAAPI for decoding.  Command line is `ffmpeg -hwaccel_device /dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_format vaapi -i video.ts -an -c:v mpeg2_vaapi -f null /dev/null`.
Comments.UserDisplayName: acker9
Tags: <ffmpeg>
Title: Why in ffmpeg do I have VAAPI encoders but no VAAPI decoders?
UserDisplayName: acker9
ThreadText: # Why in ffmpeg do I have VAAPI encoders but no VAAPI decoders?
  
  (Asked by: username_0 on 2018-05-22)
  
  Why in ffmpeg do I have VAAPI encoders but no VAAPI decoders? I have used VAAPI encoders successfully, but would like to use VAAPI for decoding as well (specifically, mpeg2\_vaapi decoding). I build my own ffmpeg from git master branch, so am I missing configure options or libraries for decoding?
  
  ```
  $ ffmpeg -version
  ffmpeg version N-91119-g2940af9389 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
  configuration: --prefix=/usr/local --enable-shared --enable-pic --enable-rpath --extra-ldflags='-Wl,-rpath,/usr/local/lib' --enable-libx264 --enable-libx265 --enable-libxvid --enable-libvorbis --enable-nonfree --enable-gpl --enable-zlib --enable-libmp3lame --enable-libfdk-aac --enable-libv4l2 --enable-libbluray --enable-libvpx --enable-libwebp --enable-libmfx --enable-vaapi --enable-vdpau --enable-opencl
  libavutil      56. 18.102 / 56. 18.102
  libavcodec     58. 19.102 / 58. 19.102
  libavformat    58. 14.100 / 58. 14.100
  libavdevice    58.  4.100 / 58.  4.100
  libavfilter     7. 24.100 /  7. 24.100
  libswscale      5.  2.100 /  5.  2.100
  libswresample   3.  2.100 /  3.  2.100
  libpostproc    55.  2.100 / 55.  2.100
  $
  
  $ ffmpeg -encoders 2>&1|grep _vaapi
   V..... h264_vaapi           H.264/AVC (VAAPI) (codec h264)
   V..... hevc_vaapi           H.265/HEVC (VAAPI) (codec hevc)
   V..... mjpeg_vaapi          MJPEG (VAAPI) (codec mjpeg)
   V..... mpeg2_vaapi          MPEG-2 (VAAPI) (codec mpeg2video)
   V..... vp8_vaapi            VP8 (VAAPI) (codec vp8)
   V..... vp9_vaapi            VP9 (VAAPI) (codec vp9)
  $
  
  $ ffmpeg -decoders 2>&1|grep _vaapi
  $ 
  
  ```
  
  **Tags:** ffmpeg
  
  > **Comments:**
  > **username_1**: Don't have access to a linux box now, but it should be `ffmpeg -hwaccel vaapi -i file ...`  
  > **username_0**: This is what I am using, but Is there a way to verify the decoder is actually using VAAPI?  There is no indication of it in the ffmpeg output (that I've spotted).  And when I also use VAAPI encoding, Linux is reporting 50% CPU usage on the ffmpeg process (although this is down from 200% when using non-VAAPI encoding).  So what I'm saying is I'm confident the encoder is working, but I see no indication the decoder is using VAAPI.  
  > **username_1**: See the stream mapping lines  
  > **username_0**: Ok.  This is what I see: `Stream #0:0 -> #0:0 (mpeg2video (native) -> mpeg2video (mpeg2_vaapi))`.  mpeg2video (native) leads me to believe it's not using VAAPI for decoding.  Command line is `ffmpeg -hwaccel_device /dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_format vaapi -i video.ts -an -c:v mpeg2_vaapi -f null /dev/null`.  
  
  ---
  
  ## 0 answers
  
  