Victor CS
Victor CS

Reputation: 71

How do video streaming M3U8?

I need to play a video in M3U8 format. I used the following example but does not play the video (.m3u8), someone could help me? Researched elsewhere and there are distorted information. Some say that the androids can not play, others say that only some versions reproduce and there are those who say to use VitamioBundle. Prem say is not guaranteed and increases the size of apk around 20mb.

Upvotes: 0

Views: 2194

Answers (2)

aergistal
aergistal

Reputation: 31209

Android supports HLS starting with version 4.0+. Most bugs were fixed on 4.4 so newer versions should work without issues.

Apart from the HLS protocol compatibility you need to make sure the stream you're trying to play is also supported. Older Android devices can only play Baseline Profile H.264/AVC with AAC in MPEG-TS. The supported media formats page lists HD 720p - 30 fps @ 2 Mbit/s as the maximum level supported on the majority of devices.

Newer Android devices are able to play High Profile, Level 4.2, 60 fps.

There are a couple of 3rd party libraries available but discussing them here is off-topic as it attracts opinion based answers. You'll need to do a bit of research depending on your required target/specs.

Upvotes: 2

mr.icetea
mr.icetea

Reputation: 2637

Try to use ExoPlayer.

ExoPlayer is an application level media player for Android. It provides an alternative to Android’s MediaPlayer API for playing audio and video both locally and over the Internet. ExoPlayer supports features not currently supported by Android’s MediaPlayer API, including DASH and SmoothStreaming adaptive playbacks. Unlike the MediaPlayer API, ExoPlayer is easy to customize and extend, and can be updated through Play Store application updates.

Upvotes: 1

Related Questions