CGJU
CGJU
June 3, 2026 · 5 min read

What is the M3U8 Format

M3U8 is the Unicode version of the M3U playlist file format, using UTF-8 encoding. It was originally designed as a playlist format for audio players like Winamp, and was later adopted and refined by Apple for use in HLS (HTTP Live Streaming) streaming technology, becoming one of the most mainstream streaming media playlist formats today.

Simply put, an M3U8 file itself does not contain audio or video data — it is a plain text playlist file that records metadata such as video segment addresses, durations, and encryption information. Players parse the M3U8 file and sequentially download and play the video segments referenced within it.

Main Use Cases of M3U8

  • Online video streaming: HLS streaming playback on major video platforms
  • Live streaming: Real-time live streaming of sports events, concerts, etc.
  • IPTV: Internet TV live channels
  • Short video platforms: Adaptive bitrate playback of short videos
  • Education industry: Video playback for online courses

How M3U8 Works

M3U8 is the core component of HLS technology. The basic idea of HLS is to split the entire video into multiple small TS segment files, each typically 2–10 seconds long, and then manage these segments through an M3U8 playlist file.

HLS Playback Process

  1. The player requests the M3U8 playlist file
  2. Parses the M3U8 file to obtain the segment address list
  3. Downloads TS video segments in sequence
  4. Plays while downloading, achieving a smooth streaming media experience
  5. Automatically switches between different bitrate segments based on network conditions

Master Playlist vs Media Playlist

M3U8 playlists are divided into two types: Master Playlist and Media Playlist.

Master Playlist

The master playlist contains multiple media playlist addresses with different bitrates and resolutions, used to implement adaptive bitrate playback. The player automatically selects the most appropriate quality based on current network bandwidth.

#EXTM3U
#EXT-X-STREAM-INF:BANDWIDTH=800000,RESOLUTION=640x360
360p/index.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1400000,RESOLUTION=854x480
480p/index.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2800000,RESOLUTION=1280x720
720p/index.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=5000000,RESOLUTION=1920x1080
1080p/index.m3u8

Media Playlist

The media playlist contains the actual video segment addresses and duration information — it is the actual playlist used for playback.

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:10.0,
segment0.ts
#EXTINF:10.0,
segment1.ts
#EXTINF:10.0,
segment2.ts
#EXTINF:8.5,
segment3.ts
#EXT-X-ENDLIST

Common Tag Reference

M3U8 files start with #EXTM3U and contain a series of tags beginning with #EXT. Below are some of the most common tags:

Basic Tags

  • #EXTM3U: M3U8 file start marker — must be on the first line
  • #EXT-X-VERSION: Specifies the HLS protocol version number
  • #EXTINF: Specifies the duration (in seconds) of the next segment; optional title follows the comma
  • #EXT-X-TARGETDURATION: Specifies the maximum duration of all segments
  • #EXT-X-MEDIA-SEQUENCE: Sequence number of the first segment

Advanced Tags

  • #EXT-X-STREAM-INF: In master playlists, specifies sub-stream attributes (bandwidth, resolution, etc.)
  • #EXT-X-KEY: Specifies encryption method and key address (AES-128 encryption)
  • #EXT-X-ENDLIST: Playlist end marker (present for VOD, absent for live streaming)
  • #EXT-X-DISCONTINUITY: Marks encoding parameter changes (e.g., quality switch)
  • #EXT-X-MAP: Specifies the initialization segment (for fMP4-format HLS)

Desktop Methods for Opening

There are multiple ways to open and play M3U8 files on desktop computers — choose the right tool based on your needs.

1. VLC Media Player (Recommended)

VLC is the most popular open-source player, with native support for M3U8/HLS playback and cross-platform support for Windows, Mac, and Linux.

Steps:

  1. Open VLC Player
  2. Click menu: Media → Open Network Stream
  3. Enter the M3U8 link or select a local M3U8 file
  4. Click the play button

2. PotPlayer

PotPlayer is a very popular player on the Windows platform, with powerful features and M3U8 playback support.

3. FFmpeg Command Line

If you need to download or convert M3U8 videos, you can use FFmpeg:

ffmpeg -i "https://example.com/stream.m3u8" -c copy output.mp4

Mobile Methods for Opening

There are also many players that support the M3U8 format on mobile devices.

1. iOS Devices

iPhones and iPads have native HLS playback support in the Safari browser — simply open the M3U8 link directly in the browser. You can also use the following apps:

  • VLC for Mobile: Free and open-source, comprehensive features
  • nPlayer: Paid app with excellent experience
  • Infuse: Beautiful interface, supports multiple formats

2. Android Devices

For the Android platform, the following players are recommended:

  • VLC for Android: Free and open-source, supports many formats
  • MX Player: A very popular player
  • ExoPlayer: Google's official player library (for developers)

Web Playback

Playing M3U8 videos on web pages is one of the most common requirements. Since only Safari natively supports HLS, other browsers need to use JavaScript libraries to implement playback.

1. Using HLS.js (Recommended)

HLS.js is the most popular open-source HLS playback library, supporting all browsers with MSE support.

<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
<video id="video" controls></video>
<script>
    const video = document.getElementById('video');
    const hls = new Hls();
    hls.loadSource('https://example.com/stream.m3u8');
    hls.attachMedia(video);
</script>

2. Using Online Player Tools

If you don't want to write code, you can directly use an online M3U8 player, such as our M3U8 Online Player — just paste the link to play, with additional features like screenshots and playback speed control.

3. video.js + videojs-contrib-hls

If you use the video.js player framework, you can pair it with the videojs-contrib-hls plugin to implement HLS playback.

Tool Recommendations

Playback Tools

  • VLC Media Player: Cross-platform, open-source and free, powerful features
  • FFmpeg: Command-line tool, suitable for developers and batch processing
  • OBS Studio: Live streaming and recording tool, supports HLS

Development Tools

  • HLS.js: Top choice for web HLS playback
  • hls-parser: Node.js M3U8 parsing library
  • Bento4: MP4/HLS toolset
  • Shaka Player: Google's open-source DASH/HLS player

Common Issues

1. What is the difference between M3U8 and MP4?

M3U8 is a text playlist file that does not contain actual video data; MP4 is a video container format that contains complete audio and video data. M3U8 is suitable for streaming media playback, while MP4 is suitable for local storage and sharing.

2. How to convert M3U8 to MP4?

You can use the FFmpeg command-line tool, or use our M3U8 to MP4 Online Tool to convert without downloading any software.

3. Why can't M3U8 videos play?

Common causes include: expired links, CORS restrictions, encrypted videos requiring decryption keys, network issues, unsupported players, etc. You can first test whether the link is valid using VLC.

Summary

As the core format of HLS streaming technology, M3U8 has become the de facto standard in the online video field. Understanding the format structure and working principles of M3U8 is extremely helpful for video development, video downloading, live streaming playback, and other scenarios.

Whether you are an ordinary user or a developer, mastering the methods for opening and playing M3U8 files will give you more flexibility in handling online videos. If you need to quickly play M3U8 videos, try our M3U8 Online Player.

Related Recommendations

More great articles and useful tools

Want to Play M3U8 Videos Online?

Use our free M3U8 Online Player — paste the link to play, with speed control, screenshots, and loop playback

Try It Now ➡