From aac0dc2b13ac5efdb4ef9ae992151f38bbfea830 Mon Sep 17 00:00:00 2001 From: Christopher Latza Date: Tue, 16 Jun 2020 00:35:35 +0200 Subject: [PATCH] add video record --- start.php | 4 ++++ 1 file changed, 4 insertions(+) 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()) {