ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

An error occur at the end of H.265 video playback

Open pineapplevine opened this issue 3 years ago • 0 comments

Hello, I have a problem playing H.265 video. When playing content converted from H264 to H265 using ffmpeg, throws an exception at the end of playback.

I'm guessing it's a codec issue, but I don't know what's wrong. Could you tell me know, if you know why the error occurs in that H.265 video?

ExoPlayer Version 2.18.1

FFmpeg Version n5.2-dev

Devices that reproduce the issue I confirmed that this error occurs on Pixel5 models.

Device1 ・Android device:Pixel5a ・Build number:SQ3A.220705.003.A1 ・Android version:Android 12

Device2 ・Android device:Pixel5 ・Build number:SP2A.220405.003 ・Android version:Android 12

Devices that do not reproduce the issue Device1 ・Android device:SH-51A ・Android version:Android 12

Device2 ・Android device:Pixel3a ・Android version:Android 12

Reproducible in the demo app? Yes

Reproduction steps 1.download the below "https://storage.googleapis.com/wvmedia/clear/h264/tears/tears.mpd" 2.convert mpd files to mp4 ffmpeg -i "https://storage.googleapis.com/wvmedia/clear/h264/tears/tears.mpd" -c copy tears_H264.mp4 3.convert tears_H264.mp4 to tears_H265.mp4 ffmpeg -i bbb_H264_video.mp4 -c:v hevc tears_H265.mp4 4.add tears_H265.mp4 to media.exolist.json 5.launch the demo application 6.start playback of the tears_H265.mp4 7.play to the end

Expected result No error occurs at the end of playback

Actual result Throws an exception at the end of playback

Media https://test-video-content.s3.ap-northeast-1.amazonaws.com/tears_H265.mp4

Log

2022-08-23 18:35:45.192 5003-5047/com.google.android.exoplayer2.demo D/MediaCodec: keep callback message for reclaim
2022-08-23 18:35:45.193 5003-5061/com.google.android.exoplayer2.demo I/CCodecConfig: query failed after returning 19 values (BAD_INDEX)
2022-08-23 18:35:45.193 5003-5061/com.google.android.exoplayer2.demo W/Codec2Client: query -- param skipped: index = 1342179345.
2022-08-23 18:35:45.193 5003-5061/com.google.android.exoplayer2.demo W/Codec2Client: query -- param skipped: index = 2415921170.
2022-08-23 18:35:45.193 5003-5061/com.google.android.exoplayer2.demo W/Codec2Client: query -- param skipped: index = 1610614798.
2022-08-23 18:35:45.197 5003-5003/com.google.android.exoplayer2.demo D/EventLogger: videoDisabled [eventTime=20.09, mediaPos=735.58, window=0, period=0]
2022-08-23 18:35:45.198 5003-5061/com.google.android.exoplayer2.demo D/CCodecBufferChannel: [c2.android.aac.decoder#467] MediaCodec discarded an unknown buffer
2022-08-23 18:35:45.198 5003-5061/com.google.android.exoplayer2.demo D/CCodecBufferChannel: [c2.android.aac.decoder#467] MediaCodec discarded an unknown buffer
2022-08-23 18:35:45.198 5003-5061/com.google.android.exoplayer2.demo D/CCodecBufferChannel: [c2.android.aac.decoder#467] MediaCodec discarded an unknown buffer
2022-08-23 18:35:45.198 5003-5061/com.google.android.exoplayer2.demo D/CCodecBufferChannel: [c2.android.aac.decoder#467] MediaCodec discarded an unknown buffer
2022-08-23 18:35:45.199 5003-5061/com.google.android.exoplayer2.demo I/hw-BpHwBinder: onLastStrongRef automatically unlinking death recipients
2022-08-23 18:35:45.202 5003-5003/com.google.android.exoplayer2.demo D/EventLogger: audioDisabled [eventTime=20.10, mediaPos=735.58, window=0, period=0]
2022-08-23 18:35:45.204 5003-5003/com.google.android.exoplayer2.demo D/EventLogger: videoDecoderReleased [eventTime=20.10, mediaPos=735.58, window=0, period=0, c2.qti.hevc.decoder]
2022-08-23 18:35:45.206 5003-5003/com.google.android.exoplayer2.demo D/EventLogger: audioDecoderReleased [eventTime=20.11, mediaPos=735.58, window=0, period=0, c2.android.aac.decoder]
2022-08-23 18:35:45.211 5003-5003/com.google.android.exoplayer2.demo E/EventLogger: playerFailed [eventTime=20.11, mediaPos=735.58, window=0, period=0, errorCode=ERROR_CODE_DECODING_FAILED
      com.google.android.exoplayer2.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(1, null, null, video/hevc, hvc1.1.6.L120.90, -1, null, [1920, 856, 23.999979], [-1, -1]), format_supported=YES
        at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:566)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loopOnce(Looper.java:201)
        at android.os.Looper.loop(Looper.java:288)
        at android.os.HandlerThread.run(HandlerThread.java:67)
     Caused by: com.google.android.exoplayer2.video.MediaCodecVideoDecoderException: Decoder failed: c2.qti.hevc.decoder
        at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.createDecoderException(MediaCodecVideoRenderer.java:1590)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:813)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:989)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:490)
        at android.os.Handler.dispatchMessage(Handler.java:102) 
        at android.os.Looper.loopOnce(Looper.java:201) 
        at android.os.Looper.loop(Looper.java:288) 
        at android.os.HandlerThread.run(HandlerThread.java:67) 
     Caused by: android.media.MediaCodec$CodecException: Error 0x80000000
    ]
2022-08-23 18:35:45.212 5003-5003/com.google.android.exoplayer2.demo D/EventLogger: state [eventTime=20.11, mediaPos=735.58, window=0, period=0, IDLE]
2022-08-23 18:35:45.216 5003-5003/com.google.android.exoplayer2.demo D/EventLogger: isPlaying [eventTime=20.12, mediaPos=735.58, window=0, period=0, false]
2022-08-23 18:35:50.245 5003-5054/com.google.android.exoplayer2.demo D/BufferPoolAccessor2.0: bufferpool2 0x7919fafaf8 : 0(0 size) total buffers - 0(0 size) used buffers - 815/820 (recycle/alloc) - 5/809 (fetch/transfer)
2022-08-23 18:35:50.245 5003-5054/com.google.android.exoplayer2.demo D/BufferPoolAccessor2.0: bufferpool2 0x7919fbd6a8 : 0(0 size) total buffers - 0(0 size) used buffers - 563/570 (recycle/alloc) - 7/566 (fetch/transfer)
2022-08-23 18:35:50.245 5003-5054/com.google.android.exoplayer2.demo D/BufferPoolAccessor2.0: evictor expired: 2, evicted: 2

pineapplevine avatar Aug 25 '22 08:08 pineapplevine