I started using ExoPlayer
recently to play stream links on my android application, such as .m3u8
and .mp4
files, but when I tried to play .ts
files, the message below started appearing in the Android logcat:
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:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:761)
Is there a possibility to play .ts
streams with EXOPlayer2
?
It is not a supported format. Check here https://google.github.io/ExoPlayer/supported-formats.html