Home >Common Problem >What file is m3u8?

What file is m3u8?

angryTom
angryTomOriginal
2020-02-06 17:17:4428008browse

What file is m3u8?

What is m3u8 file?

m3u8 is a video playback standard introduced by Apple. It is a type of m3u, but the encoding format is UTF-8.

M3u8 is an index file to be precise. Using the m3u8 file actually parses the corresponding video network address placed on the server to achieve online playback. The main reason for using m3u8 format files is that it can adapt to multi-bitrate videos. The video website can automatically match a suitable bitrate file for the client to play based on the user's network bandwidth, thereby ensuring the smoothness of the video.

The following is the format of an m3u8 file:

// M3U8文件必须包含的标签,并且必须在文件的第一行
#EXTM3U
// M3U8文件的版本,常见的是3
#EXT-X-VERSION:3
// 第一个TS分片的序列号
#EXT-X-MEDIA-SEQUENCE:0
// 是否允许cache
#EXT-X-ALLOW-CACHE:YES
// 每个每个媒体段(ts)的最大的时长
#EXT-X-TARGETDURATION:39
// 每个媒体段(ts)的持续时间
#EXTINF:1.084422,
/videolib1/1903/15/9b4wxrd1g/SD/9b4wxrd1g-mobile-0.ts
// 每个媒体段(ts)的持续时间
#EXTINF:2.002000,
/videolib1/1903/15/9b4wxrd1g/SD/9b4wxrd1g-mobile-1.ts
// 每个媒体段(ts)的持续时间
#EXTINF:2.919578,
/videolib1/1903/15/9b4wxrd1g/SD/9b4wxrd1g-mobile-2.ts

// ... 中间部分省略

/videolib1/1903/15/9b4wxrd1g/SD/9b4wxrd1g-mobile-130.ts
// 每个媒体段(ts)的持续时间
#EXTINF:11.386378,
/videolib1/1903/15/9b4wxrd1g/SD/9b4wxrd1g-mobile-131.ts
// 表示PlayList的末尾了
#EXT-X-ENDLIST

The above is the detailed content of What file is m3u8?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn