Android FFmpegMediaPlayer Error (0, 0) during playback?

I am trying to play Video using FFmpegMediaPlayer when I play a video. I got Error (0,0) and for this I am trying FFmpegMediaPlayer . Here is my code.

 FFmpegMediaPlayer fFmpegMediaPlayer = new FFmpegMediaPlayer(); try { fFmpegMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); fFmpegMediaPlayer.setDataSource(videoPath); fFmpegMediaPlayer.prepareAsync(); } catch (IllegalArgumentException | SecurityException | IllegalStateException | IOException e) { e.printStackTrace(); } fFmpegMediaPlayer.setOnPreparedListener(new FFmpegMediaPlayer.OnPreparedListener() { @Override public void onPrepared(FFmpegMediaPlayer mp) { mp.start(); } }); fFmpegMediaPlayer.setOnErrorListener(new FFmpegMediaPlayer.OnErrorListener() { @Override public boolean onError(FFmpegMediaPlayer mp, int what, int extra) { mp.release(); return false; } }); 

Here is my Log

 I/AppCompatViewInflater: app:theme is now deprecated. Please move to using android:theme instead. V/FFmpegMediaPlayer-JNI: native_init V/FFmpegMediaPlayer-JNI: native_setup V/FFmpegMediaPlayer-JNI: setAudioStreamType: 3 V/FFmpegMediaPlayer-JNI: setDataSource: path https://app.snapinfo.com/Areas/Museum/AppImages/SubCategory/290/11_14_16_13_21_39_Art%20Gallery%20Spheres-Mobile.mp4 I/com.jagdeep.util.MyLifecycleHandler: still foreground E/EGL_emulation: tid 29418: eglSurfaceAttrib(1174): error 0x3009 (EGL_BAD_MATCH) W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0x7d55d5fcaf80, error=EGL_BAD_MATCH V/FFmpegMediaPlayer-JNI: notify: 100 E/FFmpegMediaPlayer: Error (0,0) V/FFmpegMediaPlayer-JNI: release 
+5
source share

Source: https://habr.com/ru/post/1262409/


All Articles