space345e5 / test.sh
rahulreshma's picture
Upload test.sh with huggingface_hub
a45adca verified
raw
history blame contribute delete
779 Bytes
while true; do
fn=$(TZ="UTC" date +"%Y%m%d_%H%M%S")
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 &
pid=$!
echo "Created process $pid, File $fn.mp4"
echo "$pid|$fn.mp4" > audit
while [ $(ps $pid | grep $pid | wc -l) -gt 0 ]; do
lc=$(grep -Ei "Media sequence changed unexpectedly|404 Not found" $fn.log | wc -l)
if [[ $lc -gt 0 ]]; then
echo "Killing $pid"
kill $pid
break;
else
#echo "Sleeping"
sleep 5
fi
done
sleep 1.5
done