【发布时间】:2018-05-15 11:30:27
【问题描述】:
我正在使用 ExoPlayer 在 Android 中播放视频。我们正在使用 ExoPlayer 播放 mp4 和现场视频。但有时我们会遇到下面描述的异常。
> 12-01 14:15:09.388 12080-12517/com.mse.monumentalsnetwork
> E/ExoPlayerImplInternal: Source error.
> com.google.android.exoplayer2.source.UnrecognizedInputFormatException:
> Input does not start with the #EXTM3U header.
> at
> com.google.android.exoplayer2.source.hls.playlist.HlsPlaylistParser.parse(HlsPlaylistParser.java:119)
> at
> com.google.android.exoplayer2.source.hls.playlist.HlsPlaylistParser.parse(HlsPlaylistParser.java:43)
> at
> com.google.android.exoplayer2.upstream.ParsingLoadable.load(ParsingLoadable.java:115)
> at
> com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:315)
> 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)
所以请帮帮我。
【问题讨论】:
-
看起来在解析 .m3u 播放列表文件时出错(假设您使用的是 m3u 格式)。这只发生在直播中吗?
-
发布您正在使用的播放列表
-
@pskink 播放列表是指我正在播放的网址?
-
我的意思是extended m3u 播放列表
-
@NibinSalim 是的,问题出在 HLS 网址上。 Exoplayer 无法解析该网址。所以检查你的网址。