Error when playing video in MediaPlayer

Asked 2 years ago, Updated 2 years ago, 49 views

The following exceptions occur when playing a video using MediaPlayer:

E/MediaPlayer(18065):Unable to create media player
E/DEBUG (18065): Error
E/DEBUG (18065): java.io.IOException: setDataSourceFD failed.—status=0x80000000

We are doing the following:

FileInputStream is = null;
try{
  is = new FileInputStream(mPath);
  mMediaPlayer.setDataSource(is.getFD());
} US>finally
  try{
    if(is!=null)
      is.close();
  } catch(Exceptione){}
}

Nexus 5 (Android 4.4.3) has an exception.There seems to be an error on certain models, and there are no exceptions on other models.

Thank you for your advice.

android java android-mediaplayer

2022-09-30 20:11

1 Answers

Selfless, ffmpeg could not play video combining audio and video, but changed audio codec format from mp3 to aac and it played.


2022-09-30 20:11

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.