title: Android and FFmpeg. Video is very slow
body: <p>I have built ffmpeg library for my Android device from here: <a href="https://github.com/appunite/AndroidFFmpeg" rel="nofollow">https://github.com/appunite/AndroidFFmpeg</a>. But some video files playing very very slow (i find out that very slow are playing videos which my Android device can play by itself). Here is build.sh script
  <a href="https://github.com/appunite/AndroidFFmpeg/blob/master/FFmpegLibrary/jni/build_android.sh" rel="nofollow">https://github.com/appunite/AndroidFFmpeg/blob/master/FFmpegLibrary/jni/build_android.sh</a></p>
  
  <p>May be this is because of these lines:</p>
  
  <pre><code>--enable-hwaccel=h264_vaapi \
  --enable-hwaccel=h264_vaapi \
  --enable-hwaccel=h264_dxva2 \
  --enable-hwaccel=mpeg4_vaapi \
  </code></pre>
  
  <p>As I have understood these lines are enabling hw acceleration (the author of that code says that this can raise some bugs). The basic idea of the player is to decode video and audio streams in native code, then render video frame into AndroidBitmap and render Audio into Android MediaPlayer. 
  Does anyone know how to solve problem of slow video decoding (maybe decrease video frame resolution or something else?) I will be pleased for any help and ideas.</p>