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.7k stars 6.02k forks source link

Some videos don't play. It gave me codec error #7416

Closed bibutikoley closed 4 years ago

bibutikoley commented 4 years ago
E/ACodec: [OMX.google.aac.decoder] ERROR(0x80001001)
    signalError(omxError 0x80001001, internalError -2147483648)
E/MediaCodec: Codec reported err 0x80001001, actionCode 0, while in state 6
E/ExoPlayerImplInternal: Internal runtime error.
    java.lang.IllegalStateException
        at android.media.MediaCodec.native_queueInputBuffer(Native Method)
        at android.media.MediaCodec.queueInputBuffer(MediaCodec.java:2359)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.feedInputBuffer(MediaCodecRenderer.java:1115)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:654)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:575)
full stack trace E/ACodec: [OMX.google.aac.decoder] ERROR(0x80001001) signalError(omxError 0x80001001, internalError -2147483648) E/MediaCodec: Codec reported err 0x80001001, actionCode 0, while in state 6 E/ExoPlayerImplInternal: Internal runtime error. java.lang.IllegalStateException at android.media.MediaCodec.native_queueInputBuffer(Native Method) at android.media.MediaCodec.queueInputBuffer(MediaCodec.java:2359) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.feedInputBuffer(MediaCodecRenderer.java:1115) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:654) at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:575) at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:326) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:193) at android.os.HandlerThread.run(HandlerThread.java:65) E/ExoPlayerImplInternal: Disable failed. java.lang.IllegalStateException at android.media.MediaCodec.native_flush(Native Method) at android.media.MediaCodec.flush(MediaCodec.java:2131) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.flushOrReleaseCodec(MediaCodecRenderer.java:702) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onDisabled(MediaCodecRenderer.java:580) at com.google.android.exoplayer2.audio.MediaCodecAudioRenderer.onDisabled(MediaCodecAudioRenderer.java:627) at com.google.android.exoplayer2.BaseRenderer.disable(BaseRenderer.java:158) at com.google.android.exoplayer2.ExoPlayerImplInternal.disableRenderer(ExoPlayerImplInternal.java:1088) at com.google.android.exoplayer2.ExoPlayerImplInternal.resetInternal(ExoPlayerImplInternal.java:851) at com.google.android.exoplayer2.ExoPlayerImplInternal.stopInternal(ExoPlayerImplInternal.java:813) at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:399) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:193) at android.os.HandlerThread.run(HandlerThread.java:65) D/SurfaceUtils: disconnecting from surface 0x78f1e9e010, reason disconnectFromSurface E/ExoPlayerImplInternal: Reset failed. java.lang.IllegalStateException at android.media.MediaCodec.native_stop(Native Method) at android.media.MediaCodec.stop(MediaCodec.java:2084) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.releaseCodec(MediaCodecRenderer.java:609) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onReset(MediaCodecRenderer.java:587) at com.google.android.exoplayer2.audio.MediaCodecAudioRenderer.onReset(MediaCodecAudioRenderer.java:637) at com.google.android.exoplayer2.BaseRenderer.reset(BaseRenderer.java:164) at com.google.android.exoplayer2.ExoPlayerImplInternal.resetInternal(ExoPlayerImplInternal.java:860) at com.google.android.exoplayer2.ExoPlayerImplInternal.stopInternal(ExoPlayerImplInternal.java:813) at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:399) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:193) at android.os.HandlerThread.run(HandlerThread.java:65)
christosts commented 4 years ago

Can you please provide more information as requested in the issue template. The issue template can be found here.

This looks like a device/content specific issue, so we will need some test content, the player version, the device and Android version.

If you're unable to share bug reports or test content publicly, please send them to dev.exoplayer@gmail.com using a subject in the format "Issue #7416". Please also update this issue to indicate you’ve done this.

bibutikoley commented 4 years ago

I was just trying to play this video from the URL

http://ironoid-data.s3.amazonaws.com/Post/User-ID-12/Post-ID-246/1f36ac55-83b7-43e7-8226-f3d1d9d18071-MP4_20200516_020925.mp4

I used the Google CodeLabs for ExoPlayer - https://codelabs.developers.google.com/codelabs/exoplayer-intro/#0

and just replaced the URL with the custom URL as stated above

I am getting this error in all devices and not able to make this work. This video was recorded with a OnePlus device If any other details are required please let me know.

christosts commented 4 years ago

I tried to play the video on multiple platforms (Android, Mac, PC) including a OnePlus 3T, and audio doesn't work. mediainfo reports the audio codec as mp4a-40-0. I am not an expert on audio codecs but I don't think mp4a-40-0 (or mp4a.40.0) is a valid codec string. In addition, ffprobe (version 4.2.2) cannot detect the audio track. Overall, I'd say this is probably a problem in encoding.

I am not sure how much we can help here, it doesn't seem to be an ExoPlayer issue. Is this a file you produced with the phone's default camera application or custom code you have written? If this file is produced with the phone camera app, can the same phone play the recorded video?

bibutikoley commented 4 years ago

I had used this Library to compress that video before sending to server. https://github.com/fishwjy/VideoCompressor

Can this cause the Issue with the codec?

christosts commented 4 years ago

I can see at least one issue in this library where the audio is lost https://github.com/fishwjy/VideoCompressor/issues/31

so maybe you need to ask the library devs if they can assist.

I don't think this problem is specific to ExoPlayer, it looks like it's content-specific, therefore I will close this issue. If you create video with another app that still does not work on ExoPlayer, but works on other players/platforms, feel free to reach out to us.