1
0
Fork 0

add video record

This commit is contained in:
Christopher Latza 2020-06-16 00:35:35 +02:00
parent f1b94c82aa
commit aac0dc2b13
1 changed files with 4 additions and 0 deletions

View File

@ -54,8 +54,12 @@ while(TRUE)
$result = file_get_contents($DiscordWebhook, false, stream_context_create($startOptions));
echo "done.\n";
system('screen -dm ffmpeg -i '.$StreamURL.' tmp/rtmp/'.$videoFileName);
$lastOnlineTime = time();
system("rtmpdump -r ".$StreamURL." -m 15 -o /dev/null");
system("killall -9 ffmpeg");
if(($lastOnlineTime + 10) < time())
{