https://github.com/dostuffthatmatters/video-transport-stream-downloader
exports an mp4 video file from an m3u8 chunklist file on the internet
https://github.com/dostuffthatmatters/video-transport-stream-downloader
chunks download ffmpeg m3u8 mp4 playlist python transport-stream video video-streaming video-transport-stream wget
Last synced: 4 months ago
JSON representation
exports an mp4 video file from an m3u8 chunklist file on the internet
- Host: GitHub
- URL: https://github.com/dostuffthatmatters/video-transport-stream-downloader
- Owner: dostuffthatmatters
- Created: 2022-10-15T22:17:01.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-26T20:10:28.000Z (almost 3 years ago)
- Last Synced: 2025-03-30T06:01:56.117Z (7 months ago)
- Topics: chunks, download, ffmpeg, m3u8, mp4, playlist, python, transport-stream, video, video-streaming, video-transport-stream, wget
- Language: Python
- Homepage:
- Size: 16.6 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Video Transport Stream Downloader
## 📦 What does it do?
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:
```bash
#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:
```bash
#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.
## ⚔️ How to use it?
1. Install python3 (`^3.9`) (https://www.python.org/)
2. Install ffmpeg (https://ffmpeg.org/)
3. Make sure the `wget` and `cat` command work on your system
4. Use `config.default.json` to create a `config.json` file in the project directory
5. Run `python3.9 main.py`🎁 Your output file can be found at `out/.mp4`.