Update index.html
logo download
This commit is contained in:
+3
-5
@@ -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);
|
||||
|
||||
@@ -53,7 +52,6 @@ class WebcamManager {
|
||||
|
||||
|
||||
|
||||
|
||||
public function getJavaScript() {
|
||||
return "
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
|
||||
Reference in New Issue
Block a user