Emad Razavi
Emad Razavi

Reputation: 2113

How Fix issue of Exoplayer with playinp H.264 format video

I have a device with android 4.2.2 running on it and created an app that uses the latest version of ExoPlayer as it's video player component. my player was working great on playing videos using ProgressiveMediaSource. but yesterday I found out that it has trouble with playing an H.264 format video. the video was playing but it just showed a gray screen.

I dug deeper and realized that the only difference between this video and the earlier videos was that they have different profile specifications (working videos were Main and that video was High).

First, I guessed that maybe it's codec is not supporting but I created an app with MediaPlayer and it played it with no issue.

This may seem a duplicate for this question but It did not help me.

I read the whole troubleshooting page of ExoPlayer docs, especially those related to my file type (MP4) but it did not seem to be related to my issue.

And the last thing that I tried was adding analytics to my ExoPlayer but did not see any log like this:

[ ] Track:x, id=x, mimeType=mime/type, ... , supported=NO_UNSUPPORTED_TYPE

I know that my knowledge about this issue is not vast and I need to improve it in order to fix the issue and any direct or indirect advice would be greatly appreciated.

PS. You can see my video files here. I added three working videos and that special corrupted one, there. all video files have standard formatting, bitrate, profile, and encoding.

Upvotes: 1

Views: 2779

Answers (1)

Biscuit
Biscuit

Reputation: 5247

I've also tried your video on my example of exoplayer-kotlin. It didn't work and got the same issue.

I went to check the github repo and found this exoplayer issue. It seems to be a bug that the library doesn't intend to solve. You either have to do some process on your video, or use another video component if this is vital for you application.

EDIT: I've taken the sample that official-exoplayer is offering and add in the media.exolist.json this:

"name": "Widevine DASH: MP4,H264",
"samples": [
  {
    "name": "TEST: CORRUPTED",
    "uri": "https://YOUR-IP/corrupted.mp4"
  },
...

in the log I got this :

tracks [eventTime=0.21, mediaPos=0.00, window=0, period=0, 
  Renderer:0 [
    Group:0, adaptive_supported=N/A [
      [X] Track:0, id=1, mimeType=video/avc, res=1280x800, fps=29.970032, supported=YES
    ]
  ]
]

However the video stutter a lot and is not viewable.

Upvotes: 1

Related Questions