From e240bcdf6f3f7d9e091a938807f02bb2ed6b6983 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Sun, 5 Feb 2023 06:19:00 +0100 Subject: [PATCH] Store recording as VP8 in webm rather than Theora in mkv MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Chromium does not seem to play all Theora files (might be related to timestamp problems), while VP8 is supported in both Firefox and Chromium. Similarly Firefox can not play Matroska containers, while webm is supported in both Firefox and Chromium. Signed-off-by: Daniel Calviño Sánchez --- lib/Service/RecordingService.php | 1 + recording/src/nextcloud/talk/recording/Service.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Service/RecordingService.php b/lib/Service/RecordingService.php index ef058ddb5e0d..e80b723a6248 100644 --- a/lib/Service/RecordingService.php +++ b/lib/Service/RecordingService.php @@ -50,6 +50,7 @@ class RecordingService { public const DEFAULT_ALLOWED_RECORDING_FORMATS = [ 'audio/ogg' => ['ogg'], 'video/ogg' => ['ogv'], + 'video/webm' => ['webm'], 'video/x-matroska' => ['mkv'], ]; diff --git a/recording/src/nextcloud/talk/recording/Service.py b/recording/src/nextcloud/talk/recording/Service.py index 3c5f256eea48..ebc06cf96685 100644 --- a/recording/src/nextcloud/talk/recording/Service.py +++ b/recording/src/nextcloud/talk/recording/Service.py @@ -54,11 +54,11 @@ def getRecorderArgs(status, displayId, audioSinkIndex, width, height, extensionl ffmpegInputAudio = ['-f', 'pulse', '-i', audioSinkIndex] ffmpegInputVideo = ['-f', 'x11grab', '-draw_mouse', '0', '-video_size', f'{width}x{height}', '-i', displayId] ffmpegOutputAudio = ['-c:a', 'libopus'] - ffmpegOutputVideo = ['-c:v', 'libtheora', '-q:v', '7'] + ffmpegOutputVideo = ['-c:v', 'libvpx', '-quality:v', 'realtime'] extension = '.ogg' if status == RECORDING_STATUS_AUDIO_AND_VIDEO: - extension = '.mkv' + extension = '.webm' outputFileName = extensionlessOutputFileName + extension