Last active
October 5, 2023 15:17
-
-
Save stepbrobd/4c3ff3f9ea0575e0adc5969d5fea0eb9 to your computer and use it in GitHub Desktop.
download m3u8 stream to mp4 with ffmpeg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -exuo pipefail | |
ffmpeg \ | |
-v debug \ | |
-headers $'Connection: Keep-Alive\r\n' \ | |
-headers $'User-Agent: <user agent>\r\n' \ | |
-headers $'Cookie: key1=value1; key2=value2\r\n' \ | |
-i 'https://<target m3u8 URL>' \ | |
-c copy -bsf:a aac_adtstoasc output.mp4 \ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment