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

audio streams getting struck with new exoplayer update #202

Closed sachinbhanot closed 9 years ago

sachinbhanot commented 9 years ago

Hi , we are trying to playing some audio in new updated exoplayer. the video is getting stuck. .

Its working in version 1.0.11

http://music.hdi.cdn.ril.com/mod/_definst_/smil:test/1_2021_2.smil/playlist.m3u8

Here are some waring:- 12-12 16:25:06.236: W/SoftAAC2(5245): aacDecoder_DecodeFrame decoderErr = 0x4004 12-12 16:25:06.236: W/SoftAAC2(5245): AAC decoder returned error 0x4004, substituting silence 12-12 16:25:06.428: W/SoftAAC2(5245): aacDecoder_DecodeFrame decoderErr = 0x4004 12-12 16:25:06.429: W/SoftAAC2(5245): AAC decoder returned error 0x4004, substituting silence 12-12 16:25:06.574: E/AudioTrack(5245): Discontinuity detected [expected 18823589, got 19102226] 12-12 16:25:06.735: W/SoftAAC2(5245): aacDecoder_DecodeFrame decoderErr = 0x4004 12-12 16:25:06.736: W/SoftAAC2(5245): AAC decoder returned error 0x4004, substituting silence 12-12 16:25:07.107: W/SoftAAC2(5245): aacDecoder_DecodeFrame decoderErr = 0x4004 12-12 16:25:07.108: W/SoftAAC2(5245): AAC decoder returned error 0x4004, substituting silence

Error:- 12-12 16:26:36.816: E/AudioTrack(5245): Discontinuity detected [expected 58134975, got 58367170] 12-12 16:26:37.779: E/AudioTrack(5245): Discontinuity detected [expected 59295969, got 59621048] 12-12 16:26:38.105: E/AudioTrack(5245): Discontinuity detected [expected 59969347, got 60247984] 12-12 16:26:38.442: E/AudioTrack(5245): Discontinuity detected [expected 60596283, got 60898148] 12-12 16:26:39.002: E/AudioTrack(5245): Discontinuity detected [expected 61455427, got 61734059] 12-12 16:26:39.496: E/AudioTrack(5245): Discontinuity detected [expected 62221678, got 62430659] 12-12 16:26:39.520: E/AudioTrack(5245): Discontinuity detected [expected 62453879, got 62709304] 12-12 16:26:39.983: E/AudioTrack(5245): Discontinuity detected [expected 63173703, got 63405904] 12-12 16:26:40.518: E/AudioTrack(5245): Discontinuity detected [expected 63939963, got 64241815] 12-12 16:26:40.884: E/AudioTrack(5245): Discontinuity detected [expected 64613334, got 64868759] 12-12 16:26:41.259: E/AudioTrack(5245): Discontinuity detected [expected 65240279, got 65565359] 12-12 16:26:41.739: E/AudioTrack(5245): Discontinuity detected [expected 66052978, got 66331615] 12-12 16:26:41.984: E/AudioTrack(5245): Discontinuity detected [expected 66563814, got 66819237] 12-12 16:26:42.455: E/AudioTrack(5245): Discontinuity detected [expected 67283636, got 67585492] 12-12 16:26:42.677: E/AudioTrack(5245): Discontinuity detected [expected 67817692, got 68073115] 12-12 16:26:43.025: E/AudioTrack(5245): Discontinuity detected [expected 68421414, got 68676828] 12-12 16:26:43.420: E/AudioTrack(5245): Discontinuity detected [expected 69071567, got 69326992] 12-12 16:26:43.917: E/AudioTrack(5245): Discontinuity detected [expected 69837831, got 70116461] 12-12 16:26:44.156: E/AudioTrack(5245): Discontinuity detected [expected 70348661, got 70627304] 12-12 16:26:44.643: E/AudioTrack(5245): Discontinuity detected [expected 71114923, got 71393559] 12-12 16:26:44.880: E/AudioTrack(5245): Discontinuity detected [expected 71625759, got 71950848] 12-12 16:26:45.263: E/AudioTrack(5245): Discontinuity detected [expected 72322367, got 72577781]

ojw28 commented 9 years ago

Investigating. Seems behavior changed in: 4280511a33e961ad18670cb99432cc617ce32dfe

ojw28 commented 9 years ago

ExoPlayer doesn't like the chunklist_b320000.m3u8 variant of this stream. Or chunklist_b256000.m3u8, although the issue is less pronounced. I'm not sure why yet.

The underlying issue exists prior to the change referenced above; it's just that before that change the player wouldn't have switched to these variants.

ojw28 commented 9 years ago

Are you sure the audio is correctly encoded? VLC doesn't seem to be able to play it either. It spews logs like:

VLC media player 2.1.4 Rincewind (revision 2.1.4-0-g2a072be) [0x2044118] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface. [0x7fa2e0c04388] httplive stream: HTTP Live Streaming (jgsite.cdnsrv.ril.com/music.hdi.cdn.ril.com/mod/definst/smil:test/1_2021_2.smil/playlist.m3u8) [0x7fa2e0c0f1a8] ts demux error: MPEG-4 descriptor not found [0x7fa2e0ca7c98] packetizer_mpeg4audio packetizer: AAC channels: 2 samplerate: 44100 [0x7fa2e0c0f1a8] ts demux error: libdvbpsi (PSI decoder): TS duplicate (received 0, expected 1) for PID 0 [0x7fa2e0c0f1a8] ts demux error: libdvbpsi (PSI decoder): TS duplicate (received 0, expected 1) for PID 4095 [0x7fa2e0c0f1a8] ts demux error: libdvbpsi (PSI decoder): TS duplicate (received 0, expected 1) for PID 0 [0x7fa2e0c0f1a8] ts demux error: libdvbpsi (PSI decoder): TS duplicate (received 0, expected 1) for PID 4095 [0x7fa2e0c0f1a8] ts demux error: libdvbpsi (PSI decoder): TS duplicate (received 0, expected 1) for PID 0 [0x7fa2e0c0f1a8] ts demux error: libdvbpsi (PSI decoder): TS duplicate (received 0, expected 1) for PID 4095 [0x7fa2e0c0f1a8] ts demux error: libdvbpsi (PSI decoder): TS duplicate (received 0, expected 1) for PID 0 [0x7fa2e0c0f1a8] ts demux error: libdvbpsi (PSI decoder): TS duplicate (received 0, expected 1) for PID 4095 [0x7fa2e0c0f1a8] ts demux error: libdvbpsi (PSI decoder): TS duplicate (received 0, expected 1) for PID 0 [0x7fa2e0c0f1a8] ts demux error: libdvbpsi (PSI decoder): TS duplicate (received 0, expected 1) for PID 4095

ojw28 commented 9 years ago

Assuming the media is bad. Please re-open if you disagree.

sachinbhanot commented 9 years ago

okay sure, let me check.. if i got any issue .. i will let u know

skyshine999 commented 9 years ago

http://music.hdi.cdn.ril.com/mod/_definst_/smil:test/1_2021_2.smil/playlist.m3u8 same url playing fine in mx player and exo player old versions but in updated exoplayer audio streaming getting struck

ojw28 commented 9 years ago

Exact same comments as in the 3rd, 4th and 5th posts in this thread apply to that stream as to the one at the top of this issue. I tried the stream in MX Player, and wouldn't describe it as playing fine. It jumps around all over the place for me, and MX Player spews the following messages about the media into the logs. So yes, I'm pretty sure the media you're trying to play is broken:

12-24 15:21:02.686: W/ESQueue(190): First ADTS AAC frame length is 917 bytes, while the buffer size is 2789 bytes. 12-24 15:21:02.695: W/ESQueue(190): First ADTS AAC frame length is 936 bytes, while the buffer size is 2807 bytes. 12-24 15:21:02.697: W/ESQueue(190): First ADTS AAC frame length is 938 bytes, while the buffer size is 2903 bytes. 12-24 15:21:02.705: W/ESQueue(190): First ADTS AAC frame length is 951 bytes, while the buffer size is 2712 bytes. 12-24 15:21:02.708: W/ESQueue(190): First ADTS AAC frame length is 936 bytes, while the buffer size is 2807 bytes. 12-24 15:21:02.716: W/ESQueue(190): First ADTS AAC frame length is 936 bytes, while the buffer size is 2808 bytes. 12-24 15:21:02.721: W/ESQueue(190): First ADTS AAC frame length is 936 bytes, while the buffer size is 2807 bytes. 12-24 15:21:02.729: W/ESQueue(190): First ADTS AAC frame length is 1026 bytes, while the buffer size is 3011 bytes. 12-24 15:21:02.732: W/ESQueue(190): First ADTS AAC frame length is 867 bytes, while the buffer size is 2723 bytes. 12-24 15:21:02.740: W/ESQueue(190): First ADTS AAC frame length is 1035 bytes, while the buffer size is 2939 bytes. 12-24 15:21:02.745: W/ESQueue(190): First ADTS AAC frame length is 870 bytes, while the buffer size is 2650 bytes. 12-24 15:21:02.753: W/ESQueue(190): First ADTS AAC frame length is 997 bytes, while the buffer size is 2906 bytes. 12-24 15:21:02.756: W/ESQueue(190): First ADTS AAC frame length is 907 bytes, while the buffer size is 2690 bytes.

skyshine999 commented 9 years ago

so should i replace media content or any solution is there in latest exoplayer lib,changing buffer size or any parameters for playing that content. one more is oldversion of exoplayer lib is playing that content without getting struck why new exoplayer lib is unable to play that content is there any reason for that

ojw28 commented 9 years ago

The reason for the difference is already described in the third post in this issue (i.e. the older version switch up to the higher quality variants of the stream, which are the ones that are broken).

Ideally you should replace the content. Alternatively you can play the initial stream directly, which will prevent the player from switching to the other variants. For the example link above, you can play the initial stream using:

http://music.hdi.cdn.ril.com/mod/_definst_/smil:test/1_2021_2.smil/chunklist_b32000.m3u8

amifer commented 9 years ago

@suresh777 Where can I get the old Exoplayer library?