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

Playback hangs with v2, worked fine with v1 #1837

Closed abhishekjain89 closed 8 years ago

abhishekjain89 commented 8 years ago

Exoplayer (v2.0.0) playback hangs on short videos (<10seconds). The renderer is stuck in buffering state while the extractor has reached end of input. Happens near the end of the file. This worked fine with v1.

Here is a file that you can repro with. The file was generated on Nexus 5 (6.0.1). I added this to the demo app's media.exolist.json file to repro: file download link: https://dl.dropboxusercontent.com/s/8wzp8mz0dz1x7cs/exoplayer_test_file.mp4?dl=0

You will notice that the playback hangs (ends?) between 00:02 and 00:03. The playback state is stuck on BUFFERING.

Logs:

09-19 11:26:54.608 31981-31981/com.google.android.exoplayer2.demo I/ExoPlayerImpl: Init 2.0.0
09-19 11:26:54.611 31981-31981/com.google.android.exoplayer2.demo D/EventLogger: state [0.01, true, I]
09-19 11:26:54.651 31981-31981/com.google.android.exoplayer2.demo D/EventLogger: state [0.05, true, B]
09-19 11:26:54.651 31981-31981/com.google.android.exoplayer2.demo D/EventLogger: sourceInfo [periodCount=1, windowCount=1
09-19 11:26:54.651 31981-31981/com.google.android.exoplayer2.demo D/EventLogger:   period [?]
09-19 11:26:54.652 31981-31981/com.google.android.exoplayer2.demo D/EventLogger:   window [?, false, false]
09-19 11:26:54.652 31981-31981/com.google.android.exoplayer2.demo D/EventLogger: ]
09-19 11:26:54.652 31981-31981/com.google.android.exoplayer2.demo D/EventLogger: loading [true]
09-19 11:26:54.742 31981-32007/com.google.android.exoplayer2.demo D/OpenGLRenderer: endAllStagingAnimators on 0xb4095800 (ExpandableListView) with handle 0xa0d38d80
09-19 11:26:54.884 31981-31981/com.google.android.exoplayer2.demo D/EventLogger: sourceInfo [periodCount=1, windowCount=1
09-19 11:26:54.884 31981-31981/com.google.android.exoplayer2.demo D/EventLogger:   period [2.79]
09-19 11:26:54.884 31981-31981/com.google.android.exoplayer2.demo D/EventLogger:   window [2.79, true, false]
09-19 11:26:54.884 31981-31981/com.google.android.exoplayer2.demo D/EventLogger: ]
09-19 11:26:54.890 31981-31981/com.google.android.exoplayer2.demo D/EventLogger: Tracks [
09-19 11:26:54.890 31981-31981/com.google.android.exoplayer2.demo D/EventLogger:   Renderer:0 [
09-19 11:26:54.890 31981-31981/com.google.android.exoplayer2.demo D/EventLogger:     Group:0, adaptive_supported=N/A [
09-19 11:26:54.891 31981-31981/com.google.android.exoplayer2.demo D/EventLogger:       [X] Track:0, id=1, mimeType=video/avc, res=800x480, supported=YES
09-19 11:26:54.891 31981-31981/com.google.android.exoplayer2.demo D/EventLogger:     ]
09-19 11:26:54.891 31981-31981/com.google.android.exoplayer2.demo D/EventLogger:   ]
09-19 11:26:54.891 31981-31981/com.google.android.exoplayer2.demo D/EventLogger:   Renderer:1 [
09-19 11:26:54.891 31981-31981/com.google.android.exoplayer2.demo D/EventLogger:     Group:0, adaptive_supported=N/A [
09-19 11:26:54.891 31981-31981/com.google.android.exoplayer2.demo D/EventLogger:       [X] Track:0, id=2, mimeType=audio/mp4a-latm, channels=1, sample_rate=44100, language=```, supported=YES
09-19 11:26:54.891 31981-31981/com.google.android.exoplayer2.demo D/EventLogger:     ]
09-19 11:26:54.891 31981-31981/com.google.android.exoplayer2.demo D/EventLogger:   ]
09-19 11:26:54.891 31981-31981/com.google.android.exoplayer2.demo D/EventLogger: ]
09-19 11:26:54.891 31981-31981/com.google.android.exoplayer2.demo D/EventLogger: videoEnabled [0.29]
09-19 11:26:54.891 31981-31981/com.google.android.exoplayer2.demo D/EventLogger: audioEnabled [0.29]
09-19 11:26:54.891 31981-31981/com.google.android.exoplayer2.demo D/EventLogger: positionDiscontinuity
09-19 11:26:54.894 31981-12879/com.google.android.exoplayer2.demo I/OMXClient: Using client-side OMX mux.
09-19 11:26:54.987 31981-12878/com.google.android.exoplayer2.demo I/MediaCodec: [OMX.qcom.video.decoder.avc] setting surface generation to 32748551
09-19 11:26:55.016 31981-12879/com.google.android.exoplayer2.demo D/SurfaceUtils: set up nativeWindow 0xb3b03c08 for 800x480, color 0x7fa30c04, rotation 90, usage 0x42002900
09-19 11:26:55.030 31981-31981/com.google.android.exoplayer2.demo D/EventLogger: videoDecoderInitialized [0.43, OMX.qcom.video.decoder.avc]
09-19 11:26:55.030 31981-31981/com.google.android.exoplayer2.demo D/EventLogger: videoFormatChanged [0.43, id=1, mimeType=video/avc, res=800x480]
09-19 11:26:55.042 31981-12887/com.google.android.exoplayer2.demo I/OMXClient: Using client-side OMX mux.
09-19 11:26:55.046 31981-12887/com.google.android.exoplayer2.demo E/OMXMaster: A component of name 'OMX.qcom.audio.decoder.aac' already exists, ignoring this one.
09-19 11:26:55.060 31981-12879/com.google.android.exoplayer2.demo D/SurfaceUtils: set up nativeWindow 0xb3b03c08 for 800x480, color 0x7fa30c04, rotation 90, usage 0x42002900
09-19 11:26:55.063 31981-12888/com.google.android.exoplayer2.demo I/SoftAAC2: Reconfiguring decoder: 0->44100 Hz, 0->1 channels
09-19 11:26:55.064 31981-31981/com.google.android.exoplayer2.demo D/EventLogger: audioDecoderInitialized [0.46, OMX.google.aac.decoder]
09-19 11:26:55.065 31981-31981/com.google.android.exoplayer2.demo D/EventLogger: audioFormatChanged [0.46, id=2, mimeType=audio/mp4a-latm, channels=1, sample_rate=44100, language=```]
09-19 11:26:55.065 31981-31981/com.google.android.exoplayer2.demo D/EventLogger: loading [false]
09-19 11:26:55.104 31981-31981/com.google.android.exoplayer2.demo D/EventLogger: audioSessionId [5409]
09-19 11:26:55.209 31981-31981/com.google.android.exoplayer2.demo D/EventLogger: state [0.60, true, R]
09-19 11:26:57.274 31981-31981/com.google.android.exoplayer2.demo D/EventLogger: state [2.67, true, B]
BruceHwang commented 8 years ago

I have same problem and found that In my case when recording video and audio not synced audio delay 500ms But I can not fix that Sorry my bad English

ojw28 commented 8 years ago

We'll provide a fix for this shortly. It's unclear whether the second issue is the same, however.

abhishekjain89 commented 8 years ago

Thanks @ojw28, would you be able to share an estimate date for the patch?

ojw28 commented 8 years ago

Tomorrow.