Answer the question
In order to leave comments, you need to log in
Error when uploading video using ExoPlayer via DASH, how to fix?
06-18 12:51:26.056 3762-3851/com.roundsquare.myapplication E/LoadTask: Unexpected exception loading stream
java.lang.IllegalStateException
at com.google.android.exoplayer2.util.Assertions.checkState(Assertions.java:79)
at com.google.android.exoplayer2.source.dash.manifest.DashManifestParser.checkContentTypeConsistency(DashManifestParser.java:806)
at com.google.android.exoplayer2.source.dash.manifest.DashManifestParser.parseAdaptationSet(DashManifestParser.java:262)
at com.google.android.exoplayer2.source.dash.manifest.DashManifestParser.parsePeriod(DashManifestParser.java:209)
at com.google.android.exoplayer2.source.dash.manifest.DashManifestParser.parseMediaPresentationDescription(DashManifestParser.java:137)
at com.google.android.exoplayer2.source.dash.manifest.DashManifestParser.parse(DashManifestParser.java:99)
at com.google.android.exoplayer2.source.dash.manifest.DashManifestParser.parse(DashManifestParser.java:54)
at com.google.android.exoplayer2.upstream.ParsingLoadable.load(ParsingLoadable.java:115)
at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:295)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
06-18 12:51:26.067 3762-3850/com.roundsquare.myapplication E/ExoPlayerImplInternal: Source error.
com.google.android.exoplayer2.upstream.Loader$UnexpectedLoaderException: Unexpected IllegalStateException: null
at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:317)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.IllegalStateException
at com.google.android.exoplayer2.util.Assertions.checkState(Assertions.java:79)
at com.google.android.exoplayer2.source.dash.manifest.DashManifestParser.checkContentTypeConsistency(DashManifestParser.java:806)
at com.google.android.exoplayer2.source.dash.manifest.DashManifestParser.parseAdaptationSet(DashManifestParser.java:262)
at com.google.android.exoplayer2.source.dash.manifest.DashManifestParser.parsePeriod(DashManifestParser.java:209)
at com.google.android.exoplayer2.source.dash.manifest.DashManifestParser.parseMediaPresentationDescription(DashManifestParser.java:137)
at com.google.android.exoplayer2.source.dash.manifest.DashManifestParser.parse(DashManifestParser.java:99)
at com.google.android.exoplayer2.source.dash.manifest.DashManifestParser.parse(DashManifestParser.java:54)
at com.google.android.exoplayer2.upstream.ParsingLoadable.load(ParsingLoadable.java:115)
at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:295)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
SimpleExoPlayerView exoPlayerView = (SimpleExoPlayerView) layout.findViewById(R.id.exoPlayer);
DataSource.Factory dataSourceFactory = new DefaultDataSourceFactory(getContext(), Util.getUserAgent(getContext(), "ExoPlayer"));
Uri uri = Uri.parse("http://192.168.0.12/dash/new_dash.mpd");
DashMediaSource dashMediaSource = new DashMediaSource(uri, dataSourceFactory,
new DefaultDashChunkSource.Factory(dataSourceFactory), null, null);
BandwidthMeter bandwidthMeter = new DefaultBandwidthMeter();
TrackSelector trackSelector = new DefaultTrackSelector(new AdaptiveTrackSelection.Factory(bandwidthMeter));
SimpleExoPlayer simpleExoPlayer = ExoPlayerFactory.newSimpleInstance(getContext(), trackSelector);
exoPlayerView.setPlayer(simpleExoPlayer);
simpleExoPlayer.prepare(dashMediaSource);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question