diff --git a/CHANGELOG.md b/CHANGELOG.md index 3facd4cd1..d687c2307 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ All notable changes to this project will be documented in this file. - **Feature**: External transcoders are much easier to set up now. See [docs](https://memories.gallery/hw-transcoding) for details. - **Feature**: Folders view in shares ([#880](https://github.com/pulsejet/memories/pull/880)) - **Feature**: Improved back button navigation on mobile ([#861](https://github.com/pulsejet/memories/issues/861)). +- **Feature**: The transcoding quality factor can now be configured from the admin panel. ## [v5.5.0] - 2023-10-06 diff --git a/lib/Service/BinExt.php b/lib/Service/BinExt.php index 82dd0f4fe..82faa28c9 100644 --- a/lib/Service/BinExt.php +++ b/lib/Service/BinExt.php @@ -9,7 +9,7 @@ class BinExt { public const EXIFTOOL_VER = '12.60'; - public const GOVOD_VER = '0.1.20'; + public const GOVOD_VER = '0.1.21'; public const NX_VER_MIN = '1.1'; /** Get the path to the temp directory */ @@ -176,6 +176,8 @@ public static function getGoVodConfig(bool $local = false): array { // Get config from system values $env = [ + 'qf' => SystemConfig::get('memories.vod.qf'), + 'vaapi' => SystemConfig::get('memories.vod.vaapi'), 'vaapiLowPower' => SystemConfig::get('memories.vod.vaapi.low_power'), diff --git a/lib/Settings/SystemConfig.php b/lib/Settings/SystemConfig.php index 28c8fb4ec..4073f0dee 100644 --- a/lib/Settings/SystemConfig.php +++ b/lib/Settings/SystemConfig.php @@ -83,6 +83,10 @@ class SystemConfig // start go-vod if it is not running already. 'memories.vod.external' => false, + // Quality Factor used for transcoding + // This correspondes to CRF for x264 and global_quality for VA-API + 'memories.vod.qf' => 24, + // Set the default video quality for a first time user // 0 => Auto (default) // -1 => Original (max quality with transcoding) diff --git a/src/components/admin/AdminTypes.ts b/src/components/admin/AdminTypes.ts index 6ad6a7f9f..2a38f447e 100644 --- a/src/components/admin/AdminTypes.ts +++ b/src/components/admin/AdminTypes.ts @@ -18,6 +18,7 @@ export type ISystemConfig = { 'memories.vod.bind': string; 'memories.vod.connect': string; 'memories.vod.external': boolean; + 'memories.vod.qf': number; 'memories.video_default_quality': string; 'memories.vod.vaapi': boolean; diff --git a/src/components/admin/sections/VideoTranscoder.vue b/src/components/admin/sections/VideoTranscoder.vue index b3fb74607..f065cbf0d 100644 --- a/src/components/admin/sections/VideoTranscoder.vue +++ b/src/components/admin/sections/VideoTranscoder.vue @@ -50,6 +50,17 @@ :value="config['memories.vod.connect']" @change="update('memories.vod.connect', $event.target.value)" /> + +