Update index.html

logo download
This commit is contained in:
2024-08-02 12:36:23 +02:00
committed by GitHub
parent b04043bcca
commit 06e1cc4eb2
+3 -5
View File
@@ -5,14 +5,13 @@ ini_set('display_errors', 1);
class WebcamManager {
private $videoSrc = 'test_video.m3u8';
private $logoPath = 'logo.png';
public function displayWebcam() {
return '<video id="webcam-player" controls autoplay muted></video>';
}
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() {