summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2023-09-15 14:22:06 +0200
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2023-09-15 15:50:44 +0200
commit92b74622e07e1a1e9860eed675ae64db90f5a12c (patch)
tree3ac330b7fa3c112ecd2247bd454e1cff1a0c28be
parent7aae0ed1ed30fc35f23a15797ee5e8dc0c2d56e9 (diff)
Allow configuring ffmpeg executable and global options also in benchmarkrutgerputter-allow-custom-common-options
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
-rw-r--r--recording/src/nextcloud/talk/recording/Benchmark.py2
-rw-r--r--recording/src/nextcloud/talk/recording/RecorderArgumentsBuilder.py3
2 files changed, 5 insertions, 0 deletions
diff --git a/recording/src/nextcloud/talk/recording/Benchmark.py b/recording/src/nextcloud/talk/recording/Benchmark.py
index af9c43f6e..cafac515f 100644
--- a/recording/src/nextcloud/talk/recording/Benchmark.py
+++ b/recording/src/nextcloud/talk/recording/Benchmark.py
@@ -164,6 +164,7 @@ class BenchmarkService:
status = RECORDING_STATUS_AUDIO_ONLY if args.audio_only else RECORDING_STATUS_AUDIO_AND_VIDEO
recorderArgumentsBuilder = RecorderArgumentsBuilder()
+ recorderArgumentsBuilder.setFfmpegCommon(args.ffmpeg_common.split())
recorderArgumentsBuilder.setFfmpegOutputAudio(args.ffmpeg_output_audio.split())
recorderArgumentsBuilder.setFfmpegOutputVideo(args.ffmpeg_output_video.split())
recorderArgumentsBuilder.setExtension(f".{extension}")
@@ -277,6 +278,7 @@ def main():
parser.add_argument("-l", "--length", help="benchmark duration (in seconds)", default=180, type=int)
parser.add_argument("--width", help="output width", default=defaultConfig.getBackendVideoWidth(""), type=int)
parser.add_argument("--height", help="output height", default=defaultConfig.getBackendVideoHeight(""), type=int)
+ parser.add_argument("--ffmpeg-common", help="ffmpeg executable and global options", default=" ".join(defaultConfig.getFfmpegCommon()), type=str)
parser.add_argument("--ffmpeg-output-audio", help="output audio options for ffmpeg", default=" ".join(defaultConfig.getFfmpegOutputAudio()), type=str)
parser.add_argument("--ffmpeg-output-video", help="output video options for ffmpeg", default=" ".join(defaultConfig.getFfmpegOutputVideo()), type=str)
parser.add_argument("--audio-only", help="audio only recording", action="store_true")
diff --git a/recording/src/nextcloud/talk/recording/RecorderArgumentsBuilder.py b/recording/src/nextcloud/talk/recording/RecorderArgumentsBuilder.py
index 38e6535ee..f228fb686 100644
--- a/recording/src/nextcloud/talk/recording/RecorderArgumentsBuilder.py
+++ b/recording/src/nextcloud/talk/recording/RecorderArgumentsBuilder.py
@@ -102,6 +102,9 @@ class RecorderArgumentsBuilder:
return config.getFfmpegExtensionAudio()
+ def setFfmpegCommon(self, ffmpegCommon):
+ self._ffmpegCommon = ffmpegCommon
+
def setFfmpegOutputAudio(self, ffmpegOutputAudio):
self._ffmpegOutputAudio = ffmpegOutputAudio