From 06e1cc4eb26153e2b06d303a4a64332126e5521a Mon Sep 17 00:00:00 2001 From: metacube2 Date: Fri, 2 Aug 2024 12:36:23 +0200 Subject: [PATCH] Update index.html logo download --- index.html | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 361c6c1..862cfb6 100644 --- a/index.html +++ b/index.html @@ -5,14 +5,13 @@ ini_set('display_errors', 1); class WebcamManager { private $videoSrc = 'test_video.m3u8'; - + private $logoPath = 'logo.png'; public function displayWebcam() { return ''; } - public function captureSnapshot() { $outputFile = 'snapshot_' . date('YmdHis') . '.jpg'; - $command = "ffmpeg -i {$this->videoSrc} -vframes 1 -q:v 2 {$outputFile}"; + $command = "ffmpeg -i {$this->videoSrc} -i {$this->logoPath} -filter_complex 'overlay=10:10' -vframes 1 -q:v 2 {$outputFile}"; exec($command, $output, $returnVar); @@ -29,7 +28,7 @@ class WebcamManager { public function captureVideoSequence($duration = 10) { $outputFile = 'sequence_' . date('YmdHis') . '.mp4'; - $command = "ffmpeg -i {$this->videoSrc} -t {$duration} -c copy {$outputFile}"; + $command = "ffmpeg -i {$this->videoSrc} -i {$this->logoPath} -filter_complex 'overlay=10:10' -t {$duration} -c:v libx264 -preset fast -crf 23 {$outputFile}"; exec($command, $output, $returnVar); @@ -51,7 +50,6 @@ class WebcamManager { - public function getJavaScript() {