diff --git a/start.php b/start.php index 6bd0e82..d4e9e31 100644 --- a/start.php +++ b/start.php @@ -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()) {