LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   General (https://www.linuxquestions.org/questions/general-10/)
-   -   Chasing the Moon (https://www.linuxquestions.org/questions/general-10/chasing-the-moon-4175657110/)

teckk 07-09-2019 09:22 AM

Chasing the Moon
 
Great series on public tv right now. Chasing the Moon.
For anyone who is interested. And they did this pre unix.
What an incredible science project.
https://www.pbs.org/video/chasing-th...part-1-kpyzvq/

Code:

agent="Mozilla/5.0 (Windows NT 10.0; x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"

curl -A "$agent" https://ga.video.cdn.pbs.org/\
videos/american-experience/e6b00ef7-8237-418a-97b8-d9897c28bf47/2000121756/\
hd-16x9-mezzanine-1080p/\
aqaacl9d_amex3103-16x9-1080p-432p-1100k_[00001-01128].ts -o - >> ChasMoon1.ts

curl -A "$agent" https://ga.video.cdn.pbs.org/\
videos/american-experience/dc482b0b-e698-43e3-9bcd-66d290b62453/\
2000122314/hd-16x9-mezzanine-1080p/\
vqbzxzxq_amex3104_r-16x9-1080p-432p-1100k_[00001-01120].ts -o - >> ChasMoon2.ts

curl -A "$agent" https://ga.video.cdn.pbs.org/\
videos/american-experience/20e17b6e-8feb-4358-a51f-f3222131dcfe/\
2000122316/hd-16x9-mezzanine-1080p/\
hxydyuvx_amex3105-16x9-1080p-432p-1100k_[00001-01125].ts -o - >> ChasMoon3.ts

for i in ChasMoon{1..3}.ts; do
    ffmpeg -i "$i" -c:a copy -c:v copy "${i%.*}".mp4
done

Those videos will be about 1GB each.

Or if you want the segment playlists so that you can get the resolution that
you want, and use something like youtube-dl on them. Or just simply stream
them with a media player.
Code:

a="https://ga.video.cdn.pbs.org/videos/\
american-experience/e6b00ef7-8237-418a-97b8-d9897c28bf47/\
2000121756/hd-16x9-mezzanine-1080p/aqaacl9d_amex3103-16x9-1080p.m3u8"

b="https://ga.video.cdn.pbs.org/videos/\
american-experience/dc482b0b-e698-43e3-9bcd-66d290b62453/\
2000122314/hd-16x9-mezzanine-1080p/vqbzxzxq_amex3104_r-16x9-1080p.m3u8"

c="https://ga.video.cdn.pbs.org/videos/\
american-experience/20e17b6e-8feb-4358-a51f-f3222131dcfe/\
2000122316/hd-16x9-mezzanine-1080p/hxydyuvx_amex3105-16x9-1080p.m3u8"

for i in "$a" "$b" "$c"; do
    pl=$(curl "$agent" "$i")
    for j in $pl; do
        echo -e ""$j"\n"
    done
    str=$(printf "%70s")
    echo "${str// /=}"
done


michaelk 07-09-2019 10:01 AM

Darn it... I was traveling and missed the 1st episode and then forgot to watch the 2nd.

Thanks for posting the links.

ugjka 07-09-2019 11:46 AM

Dude, your direct links bypass geo restrictions on the website!


All times are GMT -5. The time now is 03:12 PM.