This tool exports an MP4 video file from a .m3u8
chunklist file on the internet. These files contain a list of .ts
file names which each contain a short video snippet. Example:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:8.333,
some_video_id_0.ts
#EXTINF:8.334,
some_video_id_1.ts
#EXTINF:8.333,
some_video_id_2.ts
...
Another example:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:8.333,
https://.../some_video_id_0.ts
#EXTINF:8.334,
https://.../some_video_id_1.ts
#EXTINF:8.333,
https://.../some_video_id_2.ts
...
After fetching the chunklist, the tool will download all .ts
files, merge them into one big file and convert this file into an MP4 file. It uses wget
and ffmpeg
under the hood.
- Install python3 (
^3.9
) (https://www.python.org/) - Install ffmpeg (https://ffmpeg.org/)
- Make sure the
wget
andcat
command work on your system - Use
config.default.json
to create aconfig.json
file in the project directory - Run
python3.9 main.py
🎁 Your output file can be found at out/<config.title>.mp4
.