https://github.com/schachte/cloudflare-stream-downloader
Download tool for Cloudflare Stream
https://github.com/schachte/cloudflare-stream-downloader
cloudflare cloudflare-stream cloudflare-streams m3u8-downloader stream
Last synced: 21 days ago
JSON representation
Download tool for Cloudflare Stream
- Host: GitHub
- URL: https://github.com/schachte/cloudflare-stream-downloader
- Owner: Schachte
- Created: 2023-07-29T04:58:35.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2025-01-06T16:36:46.000Z (4 months ago)
- Last Synced: 2025-03-27T19:50:35.058Z (about 1 month ago)
- Topics: cloudflare, cloudflare-stream, cloudflare-streams, m3u8-downloader, stream
- Language: Go
- Homepage:
- Size: 3.71 MB
- Stars: 46
- Watchers: 2
- Forks: 14
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ☁️ Cloudflare Stream Video Downloader
Utility to download MP4 videos and individual [MPEG-TS](https://en.wikipedia.org/wiki/MPEG_transport_stream) segments for varying resolutions off a [Cloudflare Stream](https://developers.cloudflare.com/stream/) HLS manifest URL.
## Supports
- ✅ Download video and segments
- ✅ List available resolutions & manifests
- ✅ Upload support
- ✅ Count number of segments## Installation
```
go install github.com/Schachte/cloudflare-stream-downloader@master
```### Troubleshooting
- Make sure you have Go installed on your system - [download here](https://go.dev/doc/install)
- Make sure you `GOPATH` and `GOBIN` values are set correctlyExample:
```
GOPATH=$HOME/Documents/go
GOBIN=$GOPATH/bin
PATH=$PATH:$GOBIN
go install github.com/Schachte/cloudflare-stream-downloader@mastercloudflare-stream-downloader
```## Usage
```sh
cloudflare-stream-downloader --manifestUrl --output#If an output path is not provided then it will be saved to the directory where the binary is executed
```For building the binary, see section below on `Builds & Releases` or [download latest release here.](https://github.com/Schachte/cloudflare-stream-downloader/releases)
You can grab the HLS manifest from the Cloudflare Dash as shown in the image below:

In case you wish to download an embedded video on a different site and you don't have the access to the Cloudflare Dash, get to the frame's source code, find the poster url in the following format `https://customer-
.cloudflarestream.com//thumbnails/thumbnail.jpg` and replace `thumbnail/thumbnanil.jpg` with `manifest/video.m3u8`. Example URL: `https://customer-f33zs165nr7gyfy4.cloudflarestream.com/6b9e68b07dfee8cc2d116e4c51d6a957/manifest/video.m3u8`
## Example Output
```
cloudflare-stream-downloader --manifestUrl https://.../manifest/video.m3u8 --outputPathUse the arrow keys to navigate: ↓ ↑ → ←
? Cloudflare Stream Downloader::
▸ Download video and segments
List available resolutions
Count number of segments
🚫 Exit✔ Download video and segments
📋 Listing all available resolutions for video UID: f92743594bb2d9471c8ef80b9437c1ff0) 766x360
1) 510x240
2) 🚫 Exit📼 Select resolution: 0
🌱 Beginning download for [766x360]
10% complete
20% complete
30% complete
40% complete
50% complete
60% complete
70% complete
80% complete
90% complete
Complete!
---------------------------------------------
Video output:
./f92743594bb2d9471c8ef80b9437c1ff/766x360/f92743594bb2d9471c8ef80b9437c1ff.mp4Segments output:
./f92743594bb2d9471c8ef80b9437c1ff/766x360/segments/Playback:
ffplay ./f92743594bb2d9471c8ef80b9437c1ff/766x360/f92743594bb2d9471c8ef80b9437c1ff.mp4
---------------------------------------------
```## Builds & Releases
### Releases
[Download latest release here.](https://github.com/Schachte/cloudflare-stream-downloader/releases)
or
You can also run the latest builds for all operating systems by running: `make all`.