From 1a962969adb5f01e49eec303d61e53e81b7ea715 Mon Sep 17 00:00:00 2001 From: Christopher Latza Date: Tue, 16 Jun 2020 00:45:41 +0200 Subject: [PATCH] record video as webp --- start.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/start.php b/start.php index bf530b2..24a3a52 100644 --- a/start.php +++ b/start.php @@ -13,7 +13,7 @@ while(TRUE) if(($lastOnlineTime + 60) < time()) { $fileName = "output-".md5(time().rand(11111,99999)).".gif"; - $videoFileName = md5(time().rand(11111,99999)).".mp4"; + $videoFileName = md5(time().rand(11111,99999)).".webp"; echo "Checking stream and creating image...\n"; //system("ffmpeg -i ".$StreamURL." -vframes 1 -q:v 2 -vf scale=535:346 ".$fileName); @@ -56,7 +56,7 @@ while(TRUE) system('screen -dm ffmpeg -i '.$StreamURL.' tmp/rtmp/'.$videoFileName); sleep(1); - + $lastOnlineTime = time(); system("rtmpdump -r ".$StreamURL." -m 15 -o /dev/null");