Last active
November 17, 2024 05:11
-
-
Save patrickgill/130bf9eaa76138596137c7234e80f339 to your computer and use it in GitHub Desktop.
download m3u8 ts segments, then decode, join, and remux them! (HTTP Live Streaming TS files)
This file contains 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
# download | |
aria2c -x 5 -i file.m3u8 | |
# decode (example) | |
openssl aes-128-cbc -d -K 15D0F46608409DA364E3F5D92BDE9F61 -iv 00000000000000000000000000000000 -nosalt -in G00000000.ts -out G00000000.d.ts | |
# join all ts files | |
cat *.ts > out.ts | |
# convert ts output file | |
# This will re-encode the video and stream copy the audio: | |
# ffmpeg -i input -c:v libx264 -c:a copy -bsf:a aac_adtstoasc output.mp4 | |
ffmpeg -i d_out.ts-vcodec copy -acodec copy -bsf:a aac_adtstoasc d_out.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment