Android and FFmpeg. Video is very slow

I created the ffmpeg library for my Android device from here: https://github.com/appunite/AndroidFFmpeg . But some video files play very slowly (I find out that they play videos very slowly that my Android device can play separately). Here is the build.sh script https://github.com/appunite/AndroidFFmpeg/blob/master/FFmpegLibrary/jni/build_android.sh

Perhaps this is because of these lines:

--enable-hwaccel=h264_vaapi \
--enable-hwaccel=h264_vaapi \
--enable-hwaccel=h264_dxva2 \
--enable-hwaccel=mpeg4_vaapi \

As I understand it, these lines allow hw to be accelerated (the author of this code says that this may cause some errors). The main idea of ​​the player is to decode the video and audio streams in their own code, and then render the video frame in AndroidBitmap and display the audio in Android MediaPlayer. Does anyone know how to solve the problem of slow video decoding (maybe reduce the resolution of the video fragment or something else?) I will be happy for any help and ideas.

+3
source share
1 answer

It is strange that it --enable-hwaccel=h264_vaapiis indicated twice in the line, but I see that it is in the original assembly of the script that you linked to.

DXVA2 DirectX Video Acceleration, Windows. . VAAPI API . , Unix, Wikipedia , Android.

, . , ? , Android, MediaPlayer , - . , , , , , AndroidBitmaps ( Android).

FFmpeg VAAPI, VAAPI- > Android. FFmpeg, Android, VAAPI? VAAPI Android? , VAAPI - Android ( , ), , VAAPI . FFmpeg VAAPI? , FFmpeg .

+1

All Articles