Skip to content

Commit

Permalink
Store recording as VP8 in webm rather than Theora in mkv
Browse files Browse the repository at this point in the history
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 <danxuliu@gmail.com>
  • Loading branch information
danxuliu committed Feb 5, 2023
1 parent e9d87ad commit e240bcd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/Service/RecordingService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
];

Expand Down
4 changes: 2 additions & 2 deletions recording/src/nextcloud/talk/recording/Service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit e240bcd

Please sign in to comment.