Closed donpec closed 6 years ago
Cannot find sync byte. Most likely not a Transport Stream.
Thanks @ojw28, I bold that at the description error on purpose.
If this is playing fine using a web player and a Roku Device, Do you have any suggestion on how can I modified my Nimble Streamer server settings in order to add this Sync Byte with this audioOnly tracks? Or what's Exoplayer requirements or the theory behind this error.
Could you help me pointing me at any direction in order to make Exoplayer works with multiple audio tracks.
Thanks in advance.
I cannot do much without looking at the content (which was skipped; the master playlist's content is not enough). However, #4194 might be relevant: Check that the file extension of the segments in the media playlist matches the actual container format. In this case, the extension is probably .ts while the file is, for example, an mp3 audio file.
Thanks Aquiles, in fact the original file is an mp4 file but the Nimble Streamer is doing a mp4 transmuxing to HLS using .ts chunks, so if I force the extension at the Exoplayer (EXTENSION_EXTRA) and pass the value "mp4", "ts" or anything but "m3u8" this error is shown: E/ExoPlayerImplInternal: Source error. com.google.android.exoplayer2.source.UnrecognizedInputFormatException: None of the available extractors (MatroskaExtractor, FragmentedMp4Extractor, Mp4Extractor, Mp3Extractor, AdtsExtractor, Ac3Extractor, TsExtractor, FlvExtractor, OggExtractor, PsExtractor, WavExtractor) could read the stream. at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractorHolder.selectExtractor(ExtractorMediaPeriod.java:924) at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:846) at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:308) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818)
I'm going to upload the m3u8 master list to a public server for your testing, thanks.
Hi @donpec, no need to force a specific extension. EXTENSION_EXTRA is just used to choose the media source, which in this case needs to be HlsMediaSource, which was correctly chosen initially. The extension which I was referring to was the segment extension in the media playlists. To check this, have a look at any of the media playlists in the master playlist provided above. For example (you'll need to prepend the master's url's base):
VideoFile.mp4_videochunk.m3u8?nimblesessionid=3226118&wmsAuthSign=c2VydmVyX3RpbWU9MDUvMDcvMjAxOCAwMjoxNToxNyBBTSZoYXNoX3ZhbHVlPTJMb2N4ZzZ2YlZ1VThuVVlUdFRlSWc9PSZ2YWxpZG1pbnV0ZXM9MzYw
The media playlist will have a list of segments:
segmenturl.ts
other.ts?maybe_an_argument=3
So as you can see, the extension here is .ts. What I suspect is that the segments are not actually transport streams (maybe mp4's). Try downloading a segment and probing it with mediainfo or similar software to get the container format. Once you know the format, you can use your own HlsExtractorFactory to force a specific extractor.
Thanks for you reply AquilesCanta, I downloaded a segment and is a .ts fragment. Tested in VLC and all were playable.
Check this output from web player:
If I download the file it saves a .ts file playable as I mentioned.
Thanks in advance.
That URL points to localhost, @donpec. Ideally, please provide a public master playlist URL to dev.exoplayer@gmail.com so I can take a look at the content. The fact that has .ts extension (as pointed out in my comment above) does not mean it is actually a TS. Instead, it could be a playable mp3 (despite the extension).
let me send you the link to your email, I edited the server IP to 127.0.0.1. Thanks AquilesCanta.
Unfortunately I don't have access to the provided e-mail account right now. Will do early next week and will take a look. However, do make sure that changing the configuration of the server to use .aac instead of .ts for the audio segments does not fix the issue. This is my first guess of what's going on.
EDIT: Also, probing the segment with mediainfo would help.
Hi @donpec, the e-mail is not in our inbox. Please send the link to dev.exoplayer@gmail.com, and make sure you use the subject "Issue #4213". I will reopen the issue once you update this thread confirming you have sent an e-mail containing the link.
Issue description
I have a Nimble Streamer server setup playing fine with HLS Live Streaming, the problem comes with playing VOD HLS using multiple audio tracks. Note: Using this m3u8 on other players like Roku is fine.
Reproduction steps
My m3u8:
EXTM3U
EXT-X-VERSION:3
EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a1",LANGUAGE="es",NAME="Stereo",DEFAULT="YES",URI="VideoFile.mp4_audiochunk.m3u8?nimblesessionid=3226118&wmsAuthSign=c2VydmVyX3RpbWU9MDUvMDcvMjAxOCAwMjoxNToxNyBBTSZoYXNoX3ZhbHVlPTJMb2N4ZzZ2YlZ1VThuVVlUdFRlSWc9PSZ2YWxpZG1pbnV0ZXM9MzYw"
EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a2",LANGUAGE="en",NAME="Stereo",URI="VideoFile.mp4_audiochunk.m3u8?nimblesessionid=3226118&nimble_audio_index=1&wmsAuthSign=c2VydmVyX3RpbWU9MDUvMDcvMjAxOCAwMjoxNToxNyBBTSZoYXNoX3ZhbHVlPTJMb2N4ZzZ2YlZ1VThuVVlUdFRlSWc9PSZ2YWxpZG1pbnV0ZXM9MzYw"
EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a3",LANGUAGE="es",NAME="5.1",URI="VideoFile.mp4_audiochunk.m3u8?nimblesessionid=3226118&nimble_audio_index=2&wmsAuthSign=c2VydmVyX3RpbWU9MDUvMDcvMjAxOCAwMjoxNToxNyBBTSZoYXNoX3ZhbHVlPTJMb2N4ZzZ2YlZ1VThuVVlUdFRlSWc9PSZ2YWxpZG1pbnV0ZXM9MzYw"
EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a4",LANGUAGE="en",NAME="5.1",URI="VideoFile.mp4_audiochunk.m3u8?nimblesessionid=3226118&nimble_audio_index=3&wmsAuthSign=c2VydmVyX3RpbWU9MDUvMDcvMjAxOCAwMjoxNToxNyBBTSZoYXNoX3ZhbHVlPTJMb2N4ZzZ2YlZ1VThuVVlUdFRlSWc9PSZ2YWxpZG1pbnV0ZXM9MzYw"
EXT-X-STREAM-INF:BANDWIDTH=4500000,CODECS="avc1.64002a,mp4a.40.2",AUDIO="a1"
VideoFile.mp4_videochunk.m3u8?nimblesessionid=3226118&wmsAuthSign=c2VydmVyX3RpbWU9MDUvMDcvMjAxOCAwMjoxNToxNyBBTSZoYXNoX3ZhbHVlPTJMb2N4ZzZ2YlZ1VThuVVlUdFRlSWc9PSZ2YWxpZG1pbnV0ZXM9MzYw
EXT-X-STREAM-INF:BANDWIDTH=4500000,CODECS="avc1.64002a,mp4a.40.2",AUDIO="a2"
VideoFile.mp4_videochunk.m3u8?nimblesessionid=3226118&wmsAuthSign=c2VydmVyX3RpbWU9MDUvMDcvMjAxOCAwMjoxNToxNyBBTSZoYXNoX3ZhbHVlPTJMb2N4ZzZ2YlZ1VThuVVlUdFRlSWc9PSZ2YWxpZG1pbnV0ZXM9MzYw
EXT-X-STREAM-INF:BANDWIDTH=4500000,CODECS="avc1.64002a,mp4a.40.2",AUDIO="a3"
VideoFile.mp4_videochunk.m3u8?nimblesessionid=3226118&wmsAuthSign=c2VydmVyX3RpbWU9MDUvMDcvMjAxOCAwMjoxNToxNyBBTSZoYXNoX3ZhbHVlPTJMb2N4ZzZ2YlZ1VThuVVlUdFRlSWc9PSZ2YWxpZG1pbnV0ZXM9MzYw
EXT-X-STREAM-INF:BANDWIDTH=4500000,CODECS="avc1.64002a,mp4a.40.2",AUDIO="a4"
VideoFile.mp4_videochunk.m3u8?nimblesessionid=3226118&wmsAuthSign=c2VydmVyX3RpbWU9MDUvMDcvMjAxOCAwMjoxNToxNyBBTSZoYXNoX3ZhbHVlPTJMb2N4ZzZ2YlZ1VThuVVlUdFRlSWc9PSZ2YWxpZG1pbnV0ZXM9MzYw
Link to test content
Version of ExoPlayer being used
exoplayer:2.7.3
Device(s) and version(s) of Android being used
AmazonFireTV Stick AFTT Android 5.1.1, API 22 Emulator Nexus 5 API 24
A full bug report captured from the device
05-06 22:18:56.738 8953-8953/tv D/EventLogger: Tracks [ Renderer:0 [ Group:0, adaptive_supported=N/A [ [X] Track:0, id=0, mimeType=video/avc, bitrate=4500000, supported=YES ] ] Renderer:1 [ Group:0, adaptive_supported=N/A [ 05-06 22:18:56.739 8953-8953/tv D/EventLogger: [X] Track:0, id=Stereo, mimeType=audio/mp4a-latm, language=es, supported=YES ] Group:1, adaptive_supported=N/A [ [ ] Track:0, id=Stereo, mimeType=audio/mp4a-latm, language=en, supported=YES ] Group:2, adaptive_supported=N/A [ [ ] Track:0, id=5.1, mimeType=audio/mp4a-latm, language=es, supported=YES ] Group:3, adaptive_supported=N/A [ [ ] Track:0, id=5.1, mimeType=audio/mp4a-latm, language=en, supported=YES ] ] Renderer:2 [ Group:0, adaptive_supported=N/A [ 05-06 22:18:56.740 8953-8953/tv D/EventLogger: [X] Track:0, id=null, mimeType=application/x-subrip, language=es, supported=YES ] ] ] 05-06 22:18:56.921 8953-12561/tv D/MediaCodec: [SVP] MediaCodec::Init=AMessage(what = 'init', target = 228) = { string name = "OMX.MTK.VIDEO.DECODER.AVC" int32_t nameIsType = 0 } 05-06 22:18:56.944 8953-12574/tv I/OMXClient: Using client-side OMX mux. 05-06 22:18:56.947 8953-12574/tv D/ACodec: [SVP] msg=AMessage(what = 'allo', target = 227) = { string componentName = "OMX.MTK.VIDEO.DECODER.AVC" } 05-06 22:18:56.933 8953-12571/tv I/Kernel: [90766.441661]-(0)[12571:HlsPlaylistTrac][printk_delayed:start] [90766.441714]-(0)[12571:HlsPlaylistTrac][WDK], local_bit:0x0, cpu:0,RT[90766431683479] [90766.441714][WDK], local_bit:0x1, cpu:0, check bit0x:f,RT[90766431700325] [90766.441714][thread:60][RT:90766431712556] 2018-05-07 03:18:56.925830 UTC; android time 2018-05-06 22:18:56.925830 [90766.441756]-(0)[12571:HlsPlaylistTrac][printk_delayed:done] 05-06 22:18:56.992 8953-12573/tv I/MediaCodecLogger: [ASAP] HW.video.avc P2 + 90766486 05-06 22:18:56.999 8953-12573/tv D/MediaCodecLogger: Got m Service!!! 05-06 22:18:57.007 8953-12574/tv D/ACodec: sendFormatChange 1 05-06 22:18:57.008 8953-12574/tv D/ACodec: sendFormatChange 1 05-06 22:18:57.022 8953-12573/tv I/MediaCodecLogger: [ASAP] HW.video.avc P2 - 90766517 05-06 22:18:57.023 8953-12561/tv I/MediaCodecLogger: [ASAP] HW.video.avc P3 + 90766517 05-06 22:18:57.023 8953-12561/tv D/MediaCodec: start : turning on cabl 05-06 22:18:57.023 8953-12561/tv I/MediaCodec: setContextAdaptiveBacklight 05-06 22:18:57.023 8953-12561/tv E/MediaCodec: setContextAdaptiveBacklight: Could not open file to turn on/off CABL err = No such file or directory 05-06 22:18:57.023 8953-12561/tv I/MediaCodec: setContextAdaptiveBacklight: Best effort to turn context adaptive backlight ON 05-06 22:18:57.036 8953-12574/tv D/ACodec: native_window_set_buffers_geometry W(1280), H(544), Stride(1280), SliceH(544) 05-06 22:18:57.038 8953-12574/tv W/ACodec: [OMX.MTK.VIDEO.DECODER.AVC] setting nBufferCountActual to 7 failed: -2147483648 05-06 22:18:57.045 8953-12573/tv I/MediaCodecLogger: [ASAP] HW.video.avc P3 - 90766539 05-06 22:18:57.046 8953-12574/tv D/ACodec: submitOutputMetaBuffers send FTB for ouptut 05-06 22:18:57.046 8953-8953/tv D/EventLogger: videoDecoderInitialized [1.14, OMX.MTK.VIDEO.DECODER.AVC] 05-06 22:18:57.047 8953-8953/tv D/EventLogger: videoFormatChanged [1.14, id=1/27, mimeType=video/avc, res=1280x544] 05-06 22:18:57.114 8953-12574/tv D/ACodec: native_window_set_buffers_geometry W(1280), H(544), Stride(1280), SliceH(544) 05-06 22:18:57.115 8953-12574/tv W/ACodec: [OMX.MTK.VIDEO.DECODER.AVC] setting nBufferCountActual to 19 failed: -2147483648 05-06 22:18:57.168 8953-12574/tv D/ACodec: submitOutputMetaBuffers send FTB for ouptut 05-06 22:18:57.211 8953-12574/tv D/ACodec: sendFormatChange 1 05-06 22:18:57.220 8953-8953/tv D/EventLogger: videoSizeChanged [1280, 544] 05-06 22:18:57.260 8953-8953/tv D/EventLogger: renderedFirstFrame [Surface(name=null)/@0x3d272837] 05-06 22:18:57.642 8953-8953/tv E/EventLogger: internalError [1.73, loadError] com.google.android.exoplayer2.ParserException: Cannot find sync byte. Most likely not a Transport Stream. at com.google.android.exoplayer2.extractor.ts.TsExtractor.read(TsExtractor.java:256) at com.google.android.exoplayer2.source.hls.HlsMediaChunk.loadMedia(HlsMediaChunk.java:285) at com.google.android.exoplayer2.source.hls.HlsMediaChunk.load(HlsMediaChunk.java:219) at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:308) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818) 05-06 22:18:57.651 8953-12561/tv E/ExoPlayerImplInternal: Source error. com.google.android.exoplayer2.ParserException: Cannot find sync byte. Most likely not a Transport Stream. at com.google.android.exoplayer2.extractor.ts.TsExtractor.read(TsExtractor.java:256) at com.google.android.exoplayer2.source.hls.HlsMediaChunk.loadMedia(HlsMediaChunk.java:285) at com.google.android.exoplayer2.source.hls.HlsMediaChunk.load(HlsMediaChunk.java:219) at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:308) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818)