Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to make m3u8 file smaller by removing the base URL parts of all ts file URL in m3u8

1). My .m3u8 files and all .ts files are all located at a website like http://m3u8.abc.com/xxx.m3u8(.ts).

2). In m3u8 file, every #EXTINF parts points to a URL such as:

#EXTINF:3.436767,  
http://m3u8.ffmlive.com/47AE361A16FF0BA311E272CA925AEB4004751D6C0000.ts
#EXTINF:2.268933,
http://m3u8.ffmlive.com/47AE361A16FF0BA311E272CA925AEB4004751D6C0001.ts
#EXTINF:1.968633,
http://m3u8.ffmlive.com/47AE361A16FF0BA311E272CA925AEB4004751D6C0002.ts
#EXTINF:1.034367,
http://m3u8.ffmlive.com/47AE361A16FF0BA311E272CA925AEB4004751D6C0003.ts
...

3). There are hundreds of .ts files in each m3u8 file.

My question is: Does m3u8 file standard supports to set a base URL, and make all segment parts use relative URIs. so it helps to make m3u8 file smaller and easier to load. such as

#EXT-X-BASE-URL: http://m3u8.ffmlive.com
#EXTINF:3.436767,  
/47AE361A16FF0BA311E272CA925AEB4004751D6C0000.ts
#EXTINF:2.268933,
/47AE361A16FF0BA311E272CA925AEB4004751D6C0001.ts
#EXTINF:1.968633,
/47AE361A16FF0BA311E272CA925AEB4004751D6C0002.ts
#EXTINF:1.034367,
/47AE361A16FF0BA311E272CA925AEB4004751D6C0003.ts
...

If it does, how to do with it?

like image 567
Henry Leu Avatar asked Oct 18 '25 02:10

Henry Leu


1 Answers

It supports realitive URLs, just like HTML. But the base is the manifest URL, and there is not a way to override that.

like image 197
szatmary Avatar answered Oct 20 '25 18:10

szatmary