rahulreshma commited on
Commit
a45adca
·
verified ·
1 Parent(s): c99e23f

Upload test.sh with huggingface_hub

Browse files
Files changed (1) hide show
  1. test.sh +20 -0
test.sh ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ while true; do
2
+ fn=$(TZ="UTC" date +"%Y%m%d_%H%M%S")
3
+ nohup ffmpeg -report -i "https://use01-smr03-relay.ozolio.com:443/hls-live/_definst_/relay01.vtcldi6.fd0.sm1.av2.mt1.at0.as1.dv0.sh2.rt7993.rc0.edge.vpass.stream/playlist.m3u8" -t $(( 2*60*60 )) -c copy -live_start_index -1 -ignore_editlist 1 $fn.mp4 > $fn.log 2>&1 &
4
+ pid=$!
5
+ echo "Created process $pid, File $fn.mp4"
6
+ echo "$pid|$fn.mp4" > audit
7
+ while [ $(ps $pid | grep $pid | wc -l) -gt 0 ]; do
8
+ lc=$(grep -Ei "Media sequence changed unexpectedly|404 Not found" $fn.log | wc -l)
9
+ if [[ $lc -gt 0 ]]; then
10
+ echo "Killing $pid"
11
+ kill $pid
12
+
13
+ break;
14
+ else
15
+ #echo "Sleeping"
16
+ sleep 5
17
+ fi
18
+ done
19
+ sleep 1.5
20
+ done