From 2bb0f30c6f902522831c29365c29cb9b67a4b32f Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Fri, 29 Sep 2023 10:27:53 -0700 Subject: [PATCH] admin: allow configuring GOP size workaround (fix #800) Signed-off-by: Varun Patil --- lib/Service/BinExt.php | 1 + lib/SystemConfigDefault.php | 1 + src/components/admin/AdminTypes.ts | 1 + src/components/admin/sections/VideoAccel.vue | 19 ++++++++++++++++--- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/lib/Service/BinExt.php b/lib/Service/BinExt.php index 1d6249195..31b24e807 100644 --- a/lib/Service/BinExt.php +++ b/lib/Service/BinExt.php @@ -170,6 +170,7 @@ public static function getGoVodConfig($local = false) 'nvencScale' => Util::getSystemConfig('memories.vod.nvenc.scale'), 'useTranspose' => Util::getSystemConfig('memories.vod.use_transpose'), + 'useGopSize' => Util::getSystemConfig('memories.vod.use_gop_size'), ]; if (!$local) { diff --git a/lib/SystemConfigDefault.php b/lib/SystemConfigDefault.php index e1529c3e9..c15635fdd 100644 --- a/lib/SystemConfigDefault.php +++ b/lib/SystemConfigDefault.php @@ -39,6 +39,7 @@ // Extra streaming configuration 'memories.vod.use_transpose' => false, + 'memories.vod.use_gop_size' => false, // Paths to ffmpeg and ffprobe binaries 'memories.vod.ffmpeg' => '', diff --git a/src/components/admin/AdminTypes.ts b/src/components/admin/AdminTypes.ts index 445adc38d..6ad6a7f9f 100644 --- a/src/components/admin/AdminTypes.ts +++ b/src/components/admin/AdminTypes.ts @@ -28,6 +28,7 @@ export type ISystemConfig = { 'memories.vod.nvenc.scale': string; 'memories.vod.use_transpose': boolean; + 'memories.vod.use_gop_size': boolean; enabledPreviewProviders: string[]; preview_max_x: number; diff --git a/src/components/admin/sections/VideoAccel.vue b/src/components/admin/sections/VideoAccel.vue index 569468317..f5e6c7132 100644 --- a/src/components/admin/sections/VideoAccel.vue +++ b/src/components/admin/sections/VideoAccel.vue @@ -106,9 +106,9 @@ ) }}
- {{ - t('memories', 'Enable the following option only if you have incorrectly oriented videos during playback.') - }} + + {{ t('memories', 'Try this option only if you have incorrectly oriented videos during playback.') }} + {{ t('memories', 'Enable streaming transpose workaround') }} + + {{ t('memories', 'Some NVENC devices have issues with force_key_frames.') }} +
+ {{ t('memories', 'Try this option only if you use NVENC and have issues with video playback.') }} + + + {{ t('memories', 'Enable streaming GOP size workaround') }} +