title: How to use hardware acceleration with ffmpeg
body: <p>I need to have ffmpeg decode my video(e.g. h264) using hardware acceleration. I'm using the usual way of decoding frames: read packet -> decode frame. And I'd like to have ffmpeg speed up decoding. So I've built it with <code>--enable-vaapi</code> and <code>--enable-hwaccel=h264</code>. But I don't really know what should I do next. I've tried to use <code>avcodec_find_decoder_by_name("h264_vaapi")</code> but it returns nullptr. 
  Anyway, I might want to use others API and not just VA API. How one is supposed to speed up ffmpeg decoding?</p>
  
  <p>P.S. I didn't find any examples on Internet which uses ffmpeg with hwaccel. </p>