Skip to content

Instantly share code, notes, and snippets.

@andreif
Last active February 15, 2025 11:41
Show Gist options
  • Select an option

  • Save andreif/e03606b676c784d01d1eca9262840667 to your computer and use it in GitHub Desktop.

Select an option

Save andreif/e03606b676c784d01d1eca9262840667 to your computer and use it in GitHub Desktop.
ffmpeg -i "http://example.com/video_url.m3u8" -c copy -bsf:a aac_adtstoasc "output.mp4"
# Download FFmpeg
curl -O https://evermeet.cx/ffmpeg/ffmpeg-7.1.zip
unzip ffmpeg-7.1.zip
sudo mv ffmpeg /usr/local/bin/
# Go to past broadcasts
https://www.twitch.tv/zackrawrr/videos?filter=archives&sort=time
# Choose which to download
https://www.twitch.tv/videos/2380240462
# Find stream url in network requests, filtering by "m3u" and "chunked" (i.e. source resolution)
URL = https://d1m7jfoe9zdc1j.cloudfront.net/ee842cd51b0d2ff12199_zackrawrr_316622955389_1739470683/chunked/index-muted-D8ALVYRJFH.m3u8
# Download to mp4
ffmpeg -i ${URL} -c copy -y twitch-stream.mp4
# Expected file size is around 20-30 GB for a 6-hour stream at 1080p60
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment