-
-
Save ilovefood2/f2a0e5e15070a52cd905e47e374ce4af 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 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
# download | |
wget http://xxx.com/upload/20180419/79bf8642d29b9d51a5bebb8ddd0ea926/79bf8642d29b9d51a5bebb8ddd0ea926.m3u8 | |
aria2c -x 4 -j 4 -Z -P http://xxx.com/upload/20180419/79bf8642d29b9d51a5bebb8ddd0ea926/79bf8642d29b9d51a5bebb8ddd0ea926[000-286].ts | |
# 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 out.ts -vcodec copy -acodec copy newfile.mp4 | |
rm *.ts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment