From dc99fcd3e5ab9fbd775150b09e37f18130deb8ec Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Thu, 3 Aug 2023 13:13:17 -0700 Subject: [PATCH] admin: support go-vod useTranscoder option Signed-off-by: Varun Patil --- CHANGELOG.md | 2 + lib/Service/BinExt.php | 4 +- lib/SystemConfigDefault.php | 3 + src/components/admin/AdminMain.vue | 74 +++++++++++--------- src/components/admin/AdminTypes.ts | 2 + src/components/admin/sections/VideoAccel.vue | 25 ++++++- 6 files changed, 73 insertions(+), 37 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 61a1d3d6..605e5850 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ All notable changes to this project will be documented in this file. - **Feature**: Allow adding photos to multiple albums together ([#752](https://github.com/pulsejet/memories/pull/752)) - **Feature**: Show albums of photo in metadata ([#752](https://github.com/pulsejet/memories/pull/752)) - **Feature**: Show faces in photo in sidebar metadata +- **Feature**: Improvements in admin interface +- **Bugfix**: You can now configure the transpose strategy of the transcoder (required for QSV) ## [v5.2.1] - 2023-07-03 diff --git a/lib/Service/BinExt.php b/lib/Service/BinExt.php index e4de760b..0d97b947 100644 --- a/lib/Service/BinExt.php +++ b/lib/Service/BinExt.php @@ -9,7 +9,7 @@ use OCA\Memories\Util; class BinExt { public const EXIFTOOL_VER = '12.60'; - public const GOVOD_VER = '0.1.8'; + public const GOVOD_VER = '0.1.9'; public const NX_VER_MIN = '1.0'; /** Copy a binary to temp dir for execution */ @@ -168,6 +168,8 @@ class BinExt 'nvenc' => Util::getSystemConfig('memories.vod.nvenc', false), 'nvencTemporalAQ' => Util::getSystemConfig('memories.vod.nvenc.temporal_aq'), 'nvencScale' => Util::getSystemConfig('memories.vod.nvenc.scale'), + + 'useTranspose' => Util::getSystemConfig('memories.vod.use_transpose'), ]; if (!$local) { diff --git a/lib/SystemConfigDefault.php b/lib/SystemConfigDefault.php index b1709bf5..27a19d3f 100644 --- a/lib/SystemConfigDefault.php +++ b/lib/SystemConfigDefault.php @@ -33,6 +33,9 @@ return [ 'memories.vod.nvenc.temporal_aq' => false, 'memories.vod.nvenc.scale' => 'npp', // npp or cuda + // Extra streaming configuration + 'memories.vod.use_transpose' => false, + // Paths to ffmpeg and ffprobe binaries 'memories.vod.ffmpeg' => '', 'memories.vod.ffprobe' => '', diff --git a/src/components/admin/AdminMain.vue b/src/components/admin/AdminMain.vue index 874a5c36..3603230f 100644 --- a/src/components/admin/AdminMain.vue +++ b/src/components/admin/AdminMain.vue @@ -160,8 +160,46 @@ export default defineComponent({ } } - .admin-section { + :deep a { + color: var(--color-primary-element); + } + + :deep .admin-section { margin-top: 20px; + + form { + margin-top: 1em; + } + + .checkbox-radio-switch { + margin: 2px 16px; + } + + .m-radio { + display: inline-block; + } + + h2 { + font-size: 1.6em; + font-weight: 500; + margin-top: 40px; + } + + h3 { + font-size: 1.2em; + font-weight: 500; + margin-top: 20px; + } + + code { + padding-left: 10px; + -webkit-box-decoration-break: clone; + box-decoration-break: clone; + } + + b { + font-weight: 500; + } } .loading-icon { @@ -176,39 +214,5 @@ export default defineComponent({ height: 100%; } } - - form { - margin-top: 1em; - } - - .checkbox-radio-switch { - margin: 2px 8px; - } - - .m-radio { - display: inline-block; - } - - :deep h2 { - font-size: 1.6em; - font-weight: 500; - margin-top: 40px; - } - - :deep h3 { - font-size: 1.2em; - font-weight: 500; - margin-top: 20px; - } - - :deep a { - color: var(--color-primary-element); - } - - :deep code { - padding-left: 10px; - -webkit-box-decoration-break: clone; - box-decoration-break: clone; - } } diff --git a/src/components/admin/AdminTypes.ts b/src/components/admin/AdminTypes.ts index 12c73042..43ae58ad 100644 --- a/src/components/admin/AdminTypes.ts +++ b/src/components/admin/AdminTypes.ts @@ -23,6 +23,8 @@ export type ISystemConfig = { 'memories.vod.nvenc.temporal_aq': boolean; 'memories.vod.nvenc.scale': string; + 'memories.vod.use_transpose': boolean; + enabledPreviewProviders: string[]; preview_max_x: number; preview_max_y: number; diff --git a/src/components/admin/sections/VideoAccel.vue b/src/components/admin/sections/VideoAccel.vue index 6aba3820..a4c982f6 100644 --- a/src/components/admin/sections/VideoAccel.vue +++ b/src/components/admin/sections/VideoAccel.vue @@ -42,9 +42,11 @@ @update:checked="update('memories.vod.vaapi.low_power')" type="switch" > - {{ t('memories', 'Enable low-power mode (QSV)') }} + {{ t('memories', 'Enable low-power mode (QSV only)') }} +
+ {{ t('memories', 'NVIDIA GPUs can be used for transcoding using the NVENC encoder with the proper drivers.') }}
{{ @@ -95,6 +97,27 @@ @update:checked="update('memories.vod.nvenc.scale')" >{{ t('memories', 'CUDA scaler') }} ({{ t('memories', 'not recommended') }}) + +
+ {{ + t( + 'memories', + 'Due to a bug in certain hardware drivers, videos may appear in incorrect orientations when streaming. This can be resolved in some cases by rotating the video on the accelerator.' + ) + }} +
+ {{ + t('memories', 'Enable the following option only if you have incorrectly oriented videos during playback.') + }} + + + {{ t('memories', 'Enable streaming transpose workaround') }} +