ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

UnrecognizedInputFormatException when play dash live stream in v2

Open jiafei1986 opened this issue 9 years ago • 2 comments

There is a live stream(dash with widevine), it worked fine in exoplayer v1, but after upgrade to v2, it shows below error

                                                                       at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractorHolder.selectExtractor(ExtractorMediaPeriod.java:722)
                                                                       at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:645)
                                                                       at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:295)
                                                                       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
                                                                       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
                                                                       at java.lang.Thread.run(Thread.java:761)
06-19 22:23:13.812 2750-3372/com.test.player 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:722)
                                                                                 at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:645)
                                                                                 at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:295)
                                                                                 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
                                                                                 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
                                                                                 at java.lang.Thread.run(Thread.java:761)
06-19 22:23:13.812 2750-2750/com.test.player E/playback error >>>: com.google.android.exoplayer2.ExoPlaybackException

Should I email you the MPD file? Thanks.

jiafei1986 avatar Jun 19 '17 13:06 jiafei1986

You're trying to play a DASH stream using ExtractorMediaSource, where-as you should be using DashMediaSource.

ojw28 avatar Jun 19 '17 13:06 ojw28

@ojw28 Thank you very very much, i just check the code, found the playback URL does not end with mpd, so the sample code will use ExtractorMediaSource, now i force to use DashMediaSource, the problem fixed. THANK YOU !!!!

jiafei1986 avatar Jun 19 '17 14:06 jiafei1986