From 0b49582a07eccfd63896dd18f7d944f7e96ed47d Mon Sep 17 00:00:00 2001 From: Aaron Liu Date: Tue, 15 Jul 2025 14:11:40 +0800 Subject: [PATCH] feat(thumb): adding option to define custom input argument for FFmpeg (#2657) --- public/locales/en-US/dashboard.json | 2 ++ public/locales/ja-JP/dashboard.json | 2 ++ public/locales/zh-CN/dashboard.json | 6 ++++-- public/locales/zh-TW/dashboard.json | 2 ++ src/component/Admin/Settings/Media/Generators.tsx | 5 +++++ 5 files changed, 15 insertions(+), 2 deletions(-) diff --git a/public/locales/en-US/dashboard.json b/public/locales/en-US/dashboard.json index c874a6b..a055423 100644 --- a/public/locales/en-US/dashboard.json +++ b/public/locales/en-US/dashboard.json @@ -431,6 +431,8 @@ "generatorExtsDes": "List of available file extensions for this generator, please use comma , to separate multiple ones.", "ffmpegSeek": "Thumbnail capture location", "ffmpegSeekDes": "Define the thumbnail interception time, it is recommended to choose a smaller value to speed up the generation process. If the actual length of the video is exceeded, the thumbnail generation will fail.", + "ffmpegExtraArgs": "Extra input arguments", + "ffmpegExtraArgsDes": "Extra input arguments for calling FFmpeg.", "generatorProxy": "Generator proxy", "enableThumbProxy": "Use generator proxy", "proxyPolicyList": "Enabled storage policy", diff --git a/public/locales/ja-JP/dashboard.json b/public/locales/ja-JP/dashboard.json index bd18c0f..118fa70 100644 --- a/public/locales/ja-JP/dashboard.json +++ b/public/locales/ja-JP/dashboard.json @@ -429,6 +429,8 @@ "generatorExtsDes": "このジェネレーターで使用可能なファイル拡張子のリストです。複数指定する場合は半角カンマ(,)で区切ってください。", "ffmpegSeek": "サムネイルキャプチャ位置", "ffmpegSeekDes": "サムネイルのキャプチャ時間を定義します。生成処理を高速化するために、小さい値を選択することをお勧めします。ビデオの実際の長さを超えると、サムネイルのキャプチャに失敗する可能性があります。", + "ffmpegExtraArgs": "追加入力引数", + "ffmpegExtraArgsDes": "FFmpeg 呼び出し時に追加入力する引数。", "generatorProxy": "ジェネレーター代理", "enableThumbProxy": "ジェネレーター代理の使用", "proxyPolicyList": "代理のストレージポリシーの起動", diff --git a/public/locales/zh-CN/dashboard.json b/public/locales/zh-CN/dashboard.json index 1463854..4e3499f 100644 --- a/public/locales/zh-CN/dashboard.json +++ b/public/locales/zh-CN/dashboard.json @@ -427,11 +427,13 @@ "generatorExts": "可用扩展名", "generatorExtsDes": "此生成器可用的文件扩展名列表,多个请使用半角逗号 , 隔开。", "ffmpegSeek": "缩略图截取位置", - "ffmpegSeekDes": "定义缩略图截取的时间,推荐选择较小值以加速生成过程。如果超出视频实际长度,会导致缩略图截取失败", + "ffmpegSeekDes": "定义缩略图截取的时间,推荐选择较小值以加速生成过程。如果超出视频实际长度,会导致缩略图截取失败。", + "ffmpegExtraArgs": "额外输入参数", + "ffmpegExtraArgsDes": "调用 FFmpeg 时额外输入的参数。", "generatorProxy": "生成器代理", "enableThumbProxy": "使用生成器代理", "proxyPolicyList": "启动代理的存储策略", - "proxyPolicyListDes": "可多选。选中后,存储策略不支持原生生成缩略图的类型会由 Cloudreve 代理生成", + "proxyPolicyListDes": "可多选。选中后,存储策略不支持原生生成缩略图的类型会由 Cloudreve 代理生成。", "thumbWidth": "最大宽度", "thumbHeight": "最大高度", "thumbSuffix": "Blob 文件后缀", diff --git a/public/locales/zh-TW/dashboard.json b/public/locales/zh-TW/dashboard.json index c34a849..3c9bad2 100644 --- a/public/locales/zh-TW/dashboard.json +++ b/public/locales/zh-TW/dashboard.json @@ -425,6 +425,8 @@ "generatorExtsDes": "此生成器可用的副檔名列表,多個請使用半形逗號 , 隔開。", "ffmpegSeek": "縮圖擷取位置", "ffmpegSeekDes": "定義縮圖擷取的時間,推薦選擇較小值以加速生成過程。如果超出視訊實際長度,會導致縮圖擷取失敗", + "ffmpegExtraArgs": "額外輸入參數", + "ffmpegExtraArgsDes": "呼叫 FFmpeg 時額外輸入的參數。", "generatorProxy": "生成器代理", "enableThumbProxy": "使用生成器代理", "proxyPolicyList": "啟動代理的儲存策略", diff --git a/src/component/Admin/Settings/Media/Generators.tsx b/src/component/Admin/Settings/Media/Generators.tsx index a054b63..908520d 100644 --- a/src/component/Admin/Settings/Media/Generators.tsx +++ b/src/component/Admin/Settings/Media/Generators.tsx @@ -116,6 +116,11 @@ const generators: GeneratorRenderProps[] = [ des: "ffmpegSeekDes", required: true, }, + { + name: "thumb_ffmpeg_extra_args", + label: "ffmpegExtraArgs", + des: "ffmpegExtraArgsDes", + }, ], }, {