Skip to content

Instantly share code, notes, and snippets.

@migeorge
Created April 13, 2020 21:49
Show Gist options
  • Save migeorge/d3ef38a35a462649ce6aeeb3c2834264 to your computer and use it in GitHub Desktop.
Save migeorge/d3ef38a35a462649ce6aeeb3c2834264 to your computer and use it in GitHub Desktop.
FFMPEG: Download / Convert M3U8 Stream
#!/bin/bash
echo "Stream index URL:"
read STREAM_INDEX
echo "Video Title (no spaces):"
read VIDEO_TITLE
ffmpeg -i $STREAM_INDEX \
-user_agent "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/601.7.8 (KHTML, like Gecko) Version/9.1.3 Safari/537.86.7" \
-bsf:a aac_adtstoasc \
-vcodec copy \
-c copy \
-crf 50 \
$VIDEO_TITLE.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment