HLS (.m3u8) ParserException in v. 2.9.6 and above
See original GitHub issueContent description
The main problem is the Player gets stuck with some streams (hls). We produce great quantity of content and mostly works perfect, but there are some cases where Exoplayer launches an internal Exception, and stop playing.
It start happen, or we notice when we migrate from the 2.9.4 to the 2.10.[0-4] versions. We were forced to rollback the version.
The Exception is launched in the TsExtractor class, when it tries to calculate the size of the packet because he cannot find the starting point properly.
Simple bug report:
E/EventLogger: playerFailed [74.58, 884.12, window=0, period=0]
com.google.android.exoplayer2.ExoPlaybackException: com.google.android.exoplayer2.ParserException: Cannot find sync byte. Most likely not a Transport Stream.
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:386)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:193)
at android.os.HandlerThread.run(HandlerThread.java:65)
Caused by: com.google.android.exoplayer2.ParserException: Cannot find sync byte. Most likely not a Transport Stream.
at com.google.android.exoplayer2.extractor.ts.TsExtractor.findEndOfFirstTsPacketInBuffer(TsExtractor.java:412)
at com.google.android.exoplayer2.extractor.ts.TsExtractor.read(TsExtractor.java:280)
at com.google.android.exoplayer2.source.hls.HlsMediaChunk.feedDataToExtractor(HlsMediaChunk.java:357)
at com.google.android.exoplayer2.source.hls.HlsMediaChunk.loadMedia(HlsMediaChunk.java:325)
at com.google.android.exoplayer2.source.hls.HlsMediaChunk.load(HlsMediaChunk.java:301)
at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:381)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
Looks like was a known issue, previously reported, that where affecting older versions of ExoPlayer:
https://github.com/google/ExoPlayer/issues/5039 https://github.com/google/ExoPlayer/issues/4660
We don’t have any problem reproducing the stream in IOS or in the Web in any player we tried.
Link to test content
An example stream:
https://dc9jagk60w3y3mt6171f-ispjcf-fas.p5cdn.com/ck0mkmgdgtikk0h5voe8uu8c5/master.m3u8
Is possible to reproduce in the ExoPlayer demo project just by adding the next block to the HLS samples in the media.exolist.json:
{
"name": "TEST",
"uri": "https://dc9jagk60w3y3mt6171f-ispjcf-fas.p5cdn.com/ck0mkmgdgtikk0h5voe8uu8c5/master.m3u8"
}
Version of ExoPlayer being used
Versions: 2.10.5, 2.10.4 , 2.10.3, 2.10.2, 2.10.0, 2.9.6
Device(s) and version(s) of Android being used
Android 9, Pixel 3 (Emulator) Android 10, Pixel 3 (Real device)
A full bug report captured from the device
bugreport-sdk_gphone_x86-PSR1.180720.075-2019-09-19-11-13-05.zip
UPDATED : The error stream was updated to static one, not depending on the geographical location.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
I think this was fixed by b8ec05aea19be5eb3ef317a7daf10ed1d36154b4. Can you please patch that in and see if that fixes your issue, please?
@AquilesCanta Almost for this CDN compression issues, the patch works like a charm! We will try to apply to prod, and see if this solves this issue.
Thank you very much.