From c792f724699caa9ba3609d86b82f648471b08e34 Mon Sep 17 00:00:00 2001
From: pyorot
Date: Thu, 2 Jan 2025 16:38:33 +0000
Subject: [PATCH] chore(web): transcoding settings cleanup (#14765)
* rearrangement only
* add accordions (requiring new localisation keys)
* localisation string adjustments
* capitalisation fix in existing code
* suggestions from @mertalev + revert accidental EOF \n deletion
* linting
---------
Co-authored-by: Alex
---
i18n/en.json | 8 +-
.../settings/ffmpeg/ffmpeg-settings.svelte | 413 ++++++++++--------
2 files changed, 225 insertions(+), 196 deletions(-)
diff --git a/i18n/en.json b/i18n/en.json
index b5f8f3ca9a4d5..e2957372a1b04 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -289,6 +289,8 @@
"transcoding_constant_rate_factor": "Constant rate factor (-crf)",
"transcoding_constant_rate_factor_description": "Video quality level. Typical values are 23 for H.264, 28 for HEVC, 31 for VP9, and 35 for AV1. Lower is better, but produces larger files.",
"transcoding_disabled_description": "Don't transcode any videos, may break playback on some clients",
+ "transcoding_encoding_options": "Encoding Options",
+ "transcoding_encoding_options_description": "Set codecs, resolution, quality and other options for the encoded videos",
"transcoding_hardware_acceleration": "Hardware Acceleration",
"transcoding_hardware_acceleration_description": "Experimental; much faster, but will have lower quality at the same bitrate",
"transcoding_hardware_decoding": "Hardware decoding",
@@ -301,6 +303,8 @@
"transcoding_max_keyframe_interval": "Maximum keyframe interval",
"transcoding_max_keyframe_interval_description": "Sets the maximum frame distance between keyframes. Lower values worsen compression efficiency, but improve seek times and may improve quality in scenes with fast movement. 0 sets this value automatically.",
"transcoding_optimal_description": "Videos higher than target resolution or not in an accepted format",
+ "transcoding_policy": "Transcode Policy",
+ "transcoding_policy_description": "Set when a video will be transcoded",
"transcoding_preferred_hardware_device": "Preferred hardware device",
"transcoding_preferred_hardware_device_description": "Applies only to VAAPI and QSV. Sets the dri node used for hardware transcoding.",
"transcoding_preset_preset": "Preset (-preset)",
@@ -309,7 +313,7 @@
"transcoding_reference_frames_description": "The number of frames to reference when compressing a given frame. Higher values improve compression efficiency, but slow down encoding. 0 sets this value automatically.",
"transcoding_required_description": "Only videos not in an accepted format",
"transcoding_settings": "Video Transcoding Settings",
- "transcoding_settings_description": "Manage the resolution and encoding information of the video files",
+ "transcoding_settings_description": "Manage which videos to transcode and how to process them",
"transcoding_target_resolution": "Target resolution",
"transcoding_target_resolution_description": "Higher resolutions can preserve more detail but take longer to encode, have larger file sizes, and can reduce app responsiveness.",
"transcoding_temporal_aq": "Temporal AQ",
@@ -322,7 +326,7 @@
"transcoding_transcode_policy_description": "Policy for when a video should be transcoded. HDR videos will always be transcoded (except if transcoding is disabled).",
"transcoding_two_pass_encoding": "Two-pass encoding",
"transcoding_two_pass_encoding_setting_description": "Transcode in two passes to produce better encoded videos. When max bitrate is enabled (required for it to work with H.264 and HEVC), this mode uses a bitrate range based on the max bitrate and ignores CRF. For VP9, CRF can be used if max bitrate is disabled.",
- "transcoding_video_codec": "Video Codec",
+ "transcoding_video_codec": "Video codec",
"transcoding_video_codec_description": "VP9 has high efficiency and web compatibility, but takes longer to transcode. HEVC performs similarly, but has lower web compatibility. H.264 is widely compatible and quick to transcode, but produces much larger files. AV1 is the most efficient codec but lacks support on older devices.",
"trash_enabled_description": "Enable Trash features",
"trash_number_of_days": "Number of days",
diff --git a/web/src/lib/components/admin-page/settings/ffmpeg/ffmpeg-settings.svelte b/web/src/lib/components/admin-page/settings/ffmpeg/ffmpeg-settings.svelte
index 702ec1c1710b9..58c4be0ca0d9e 100644
--- a/web/src/lib/components/admin-page/settings/ffmpeg/ffmpeg-settings.svelte
+++ b/web/src/lib/components/admin-page/settings/ffmpeg/ffmpeg-settings.svelte
@@ -65,212 +65,237 @@
-
+
+
+
-
+
- (config.ffmpeg.acceptedVideoCodecs = [config.ffmpeg.targetVideoCodec])}
- />
+
-
-
- config.ffmpeg.acceptedAudioCodecs.includes(config.ffmpeg.targetAudioCodec)
- ? null
- : config.ffmpeg.acceptedAudioCodecs.push(config.ffmpeg.targetAudioCodec)}
- />
+
+
+
-
+
+
+ (config.ffmpeg.acceptedVideoCodecs = [config.ffmpeg.targetVideoCodec])}
+ />
-
+
+
+ config.ffmpeg.acceptedAudioCodecs.includes(config.ffmpeg.targetAudioCodec)
+ ? null
+ : config.ffmpeg.acceptedAudioCodecs.push(config.ffmpeg.targetAudioCodec)}
+ />
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+