google / ExoPlayer

This project is deprecated and stale. The latest ExoPlayer code is available in https://github.com/androidx/media
https://developer.android.com/media/media3/exoplayer
Apache License 2.0
21.71k stars 6.02k forks source link

MediaCodec error #6503

Closed ddicaro closed 4 years ago

ddicaro commented 5 years ago

Content description

On many old devices that use OMX.MTK.VIDEO.DECODER.AVC decoder when try to play a MPEG-DASH stream on Akamai CDN with DRM we receive this error: I think this issue is linked to others that are marked in your code inside the MediaCodecVideoRenderer.class class (e.g # 3835, # 3236, # 3355, # 3439 etc ..). Inside the switch of method protected boolean codecNeedsSetOutputSurfaceWorkaround(String name) of class MediaCodecVideoRenderer.class adding, for example, the code of the wiko fever the media is playing correctly. We encounter the same error on many devices of our users (see attachment reportErrorDrmWithDevice.pdf), which clearly we have no chance to test. We wanted to know if you can test them and / or add them to the switch in the code

com.google.android.exoplayer2.ExoPlaybackException: com.google.android.exoplayer2.mediacodec.MediaCodecRenderer$DecoderInitializationException: Decoder init failed: OMX.MTK.VIDEO.DECODER.AVC, Format(1_0, null, null, video/avc, avc1.640028, 511750, null, [512, 288, -1.0], [-1, -1])
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodec(MediaCodecRenderer.java:479)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.reinitializeCodec(MediaCodecRenderer.java:1261)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:1111)
        at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:552)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:647)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:529)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:300)
        at android.os.Handler.dispatchMessage(Handler.java:107)
        at android.os.Looper.loop(Looper.java:207)

Version of ExoPlayer being used

2.9.2

Device(s) and version(s) of Android being used

Wiko Fever - l5460 - Android 6 and many others

kim-vde commented 5 years ago

Can you please provide a bug report as described here?

About the other devices, do you have a stack trace? Do you have access to the device names (see 3rd column of https://support.google.com/googleplay/answer/1727131?hl=en-GB)?

ddicaro commented 5 years ago

I sent an email with the two required files like attachements. I don't have full stacktrace access, I only have the information in the file (now there is also device name)

kim-vde commented 5 years ago

Sorry but this is not the kind of bug report that I need. Please generate the bug report with adb bugreport (as described here).

I don't see the device name in the csv file you sent. Note that it is not the same as the device model.

ddicaro commented 5 years ago

I got the file (bugreport.txt) with add bugreport command (see screenshot). I have also attached the screen taken from Android studio. Are there any other information you need?

Unfortunately in my analytics system at the moment the android.os.Build.DEVICE is not present but only android.os.Build.Model. Is there a way for this information to be sufficient?

Il giorno 4 ott 2019, alle ore 17:02, kim-vde notifications@github.com ha scritto:

Sorry but this is not the kind of bug report that I need. Please generate the bug report with adb bugreport (as described here https://github.com/google/ExoPlayer/blob/release-v2/.github/ISSUE_TEMPLATE/bug.md).

I don't see the device name in the csv file you sent. Note that it is not the same as the device model.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/google/ExoPlayer/issues/6503?email_source=notifications&email_token=ANLZOTL2DWKXEHNNVNMQER3QM5LJXA5CNFSM4I4U6LU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAL5Z4I#issuecomment-538434801, or mute the thread https://github.com/notifications/unsubscribe-auth/ANLZOTMGNSEC35ZEEHLL2HLQM5LJXANCNFSM4I4U6LUQ.

kim-vde commented 5 years ago

The command you should execute is adb bugreport, and not add bugreport. Where did you attach the screenshot?

ddicaro commented 5 years ago

I sent an email to dev.exoplayer@gmail.com. Yes, the command that I executed is adb bugreport. Inside message the automatic corrector changed the value writed

kim-vde commented 4 years ago

We will add your device (l5460) to the workaround list soon.

For the other devices, we don't have the resources to test them. Therefore, as they haven't been tested, we will add the devices that meet the following conditions: 1) The device can be uniquely identified from the model name; 2) There is already a device in the list in codecNeedsSetOutputSurfaceWorkaround with same brand and similar marketing name.

The only device from the list you provided that meet those conditions is the one with model name JSN-L21.

ddicaro commented 4 years ago

Just to clarify, having the android.os.Build.DEVICE would be enough for you to add other devices, or there also have to be another device with same brand and similar marketing name in the list?

kim-vde commented 4 years ago

There would need to be another device with same brand and similar marketing name, as those devices have not been tested. Having the Build.DEVICE would probably allow us to add more devices, as we would be able to uniquely identify them (using the Build.DEVICE and Build.MODEL).