From Frederick Wilson, 1 Week ago, written in Plain Text.
  1. ########################
  2. #!/bin/bash
  3.  
  4. outfile="bbc2017-07-30.mp4"
  5.  
  6. rm -f $outfile
  7. wget -q -O-
  8. http://vs-dash-ww-rd-live.bbcfmt.hs.llnwd.net:80/al/lossless/A1/IS.mp4
  9. >$outfile
  10.  
  11. lastseq=$(expr $(date +%s) '*' 100 / 384 - 32)
  12. seq=$lastseq
  13.  
  14. while true; do
  15.   # wait for seq to change - then we have 3.84s to download it
  16.   while test $seq = $lastseq; do
  17.     sleep 0.5
  18.     seq=$(expr $(date +%s) '*' 100 / 384 - 32)
  19.   done
  20.   lastseq=$seq
  21.   wget -q -O-
  22. http://vs-dash-ww-rd-live.bbcfmt.hs.llnwd.net:80/al/lossless/A1/${seq}.m4s
  23. >>$outfile
  24.   ls -la $outfile
  25. done
  26. ########################
  27.  
captcha