From 6ba0094666c44c7ecafa5be22e1a951cacc1b409 Mon Sep 17 00:00:00 2001 From: Christopher Latza Date: Fri, 12 Jun 2020 15:17:02 +0200 Subject: [PATCH] try to convert to gif --- start.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/start.php b/start.php index 3f784ea..f5d2388 100644 --- a/start.php +++ b/start.php @@ -12,11 +12,12 @@ while(TRUE) { if(($lastOnlineTime + 60) < time()) { - $fileName = "output-".time().".jpg"; + $fileName = "output-".time().".gif"; $videoFileName = "record-".time().".dump"; echo "Checking stream and creating image...\n"; - system("ffmpeg -i ".$StreamURL." -vframes 1 -q:v 2 -vf scale=535:346 ".$fileName); + //system("ffmpeg -i ".$StreamURL." -vframes 1 -q:v 2 -vf scale=535:346 ".$fileName); + system('ffmpeg -i '.$StreamURL.' -vframes 150 -vf "fps=10,scale=320:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 '.$fileName); if(is_file($fileName)) {