Vovsoft Logo
Vovsoft Facebook Page Vovsoft Telegram Channel Vovsoft Youtube Channel Vovsoft Twitter Account
Menu
What is M3U8? Large Image

What is M3U8?

Home » Blog Posts » What is M3U8?
Date Last updated 10 months ago
*****
Rate this blog post

What is an M3U8 file?

M3U8 is a special file type that is used by various video and audio playback websites. It includes all the information that is necessary to download and play media files.

Video streaming sites use Adaptive Bitrate (ABR) streaming to deliver video. HLS or DASH can be used for that, but they work pretty much the same way. A large MP4 file is broken into a bunch of smaller video files and a manifest file is created to tell the video player how to play the stream. That manifest file is the M3U8, M3U or MPD file. The biggest advantage of using ABR is that you can package different quality levels (bitrates) together and the player can switch between them depending on the network connection.

The M3U8 file is a plain text file that specifies the location of one or more media files, rather than the video itself.

Here is an example of what an M3U8 file might look like:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-TARGETDURATION:8
#EXTINF:8.0,
http://example.com/path/to/media/file1.ts
#EXTINF:8.0,
http://example.com/path/to/media/file2.ts
#EXTINF:8.0,
http://example.com/path/to/media/file3.ts
#EXT-X-ENDLIST

In this example, the `#EXTM3U` and `#EXT-X-VERSION:3` are tags that specify this is an M3U8 playlist file. The `#EXT-X-MEDIA-SEQUENCE:0` tag indicates the first file in the playlist. The `#EXT-X-TARGETDURATION:8` tag indicates the maximum duration of the media file in seconds.

The `#EXTINF:8.0,` tag is followed by the URL of the media file. This pattern repeats for each media file in the playlist. The `#EXT-X-ENDLIST` tag indicates the end of the playlist.


How to detect M3U8 streams

Stream detector browser extensions can directly give you M3U8 filenames, however you can still get these files without any extension. Open Google Chrome's "developer tools" and click the "network" tab. Then, navigate to the page with the media and get it to start playing. Filter the list of files to "m3u8". The filename usually ends with "master.m3u8" or "playlist.m3u8".


Difference between M3U and M3U8 files

  • M3U files use a basic text format and typically employ the Latin-1 (ISO-8859-1) character set.
  • M3U8 files are a Unicode version of M3U files, utilizing UTF-8 character encoding to support a wider range of characters, including those from non-Latin scripts, such as Arabic or Chinese.

➡️ Difference between ANSI and UTF-8


Adaptive streaming with M3U8 across different devices

M3U8 significantly contributes to adaptive bitrate streaming by organizing video content into segmented playlists of varying qualities and bitrates. These playlists, in the form of M3U8 files, allow devices to select and switch between different segments based on network conditions and device capabilities, ensuring an optimal viewing experience. For instance, a smartphone with a strong Wi-Fi connection might seamlessly stream high-definition content, while the same device on a weaker cellular network might automatically adjust to a lower quality, preventing buffering or interruptions.

Example M3U8 playlist:

#EXTM3U
#EXT-X-STREAM-INF:BANDWIDTH=1280000,RESOLUTION=640x360
https://example.com/low_quality/stream.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2560000,RESOLUTION=1280x720
https://example.com/medium_quality/stream.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=5120000,RESOLUTION=1920x1080
https://example.com/high_quality/stream.m3u8

In this example, the M3U8 playlist offers three different streams with varying resolutions and bandwidths. A device using this playlist might automatically switch between these streams based on available network bandwidth or user-selected preferences, ensuring a smooth and uninterrupted viewing experience across devices.

Fatih Ramazan Çıkan
About Author
Fatih Ramazan Çıkan LinkedIn
Software development enthusiast | Electronics engineer


Continue Reading


Leave a Comment