Skip to content

Instantly share code, notes, and snippets.

@tanuj101 tanuj101/download
Created Mar 8, 2020

What would you like to do?
Script to download a video stream
mkdir -p /tmp/gfg
rm -rf /tmp/gfg/*
for ((i=1;i<5;i++));
seg_num=$(printf %04d $i)
curl "$seg_num.ts" -H 'Referer:' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36' -H 'Sec-Fetch-Dest: empty --compressed' --output /tmp/gfg/$seg_num.ts
cat /tmp/gfg/* > video.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.