From 4cad43abe14924c7d433c07b2b479103f66c5f11 Mon Sep 17 00:00:00 2001 From: Satakun Utama Date: Tue, 19 Aug 2025 13:02:39 +0700 Subject: [PATCH] DNxHD support, Better screen reader support --- README.md | 2 +- solid-src/src/App.tsx | 32 ++++++++++-- solid-src/src/components/DNxHDOptions.tsx | 55 ++++++++++++++++++++ solid-src/src/components/H264Options.tsx | 2 +- solid-src/src/components/encoders/libaom.tsx | 11 ++-- solid-src/src/util/ffmpeg.ts | 11 ++++ 6 files changed, 102 insertions(+), 11 deletions(-) create mode 100644 solid-src/src/components/DNxHDOptions.tsx diff --git a/README.md b/README.md index 1fcf6c6..947ffbe 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ encoders supported by your FFmpeg install will show up. - [ ] av1_nvenc - [ ] av1_qsv - [ ] av1_vaapi -- [ ] DNxHD +- [x] DNxHD (Does not provide options to deal with its pickiness yet) - [ ] H.264 - [x] libx264 - [x] libx264rgb (Untested, but _should_ work) diff --git a/solid-src/src/App.tsx b/solid-src/src/App.tsx index 9fab9e5..a78912a 100644 --- a/solid-src/src/App.tsx +++ b/solid-src/src/App.tsx @@ -27,6 +27,7 @@ import { generateRandomString } from "./util/string"; import "./css/icons.css"; import BreezeIcon from "./components/BreezeIcon"; import AV1Options from "./components/AV1Options"; +import DNxHDOptions from "./components/DNxHDOptions"; const commonCodecs = new Set(["h264", "hevc", "vp8", "vp9", "av1", "dnxhd"]); @@ -540,7 +541,9 @@ function App() { 0 } > - + - + - + void; +}) { + return ( +
+
+

Encoder Options

+
+
+ +
+ +
+ + +
+
+ ); +} + +export default DNxHDOptions; diff --git a/solid-src/src/components/H264Options.tsx b/solid-src/src/components/H264Options.tsx index c481260..ed37466 100644 --- a/solid-src/src/components/H264Options.tsx +++ b/solid-src/src/components/H264Options.tsx @@ -63,7 +63,7 @@ function H264Options(props: { - + setRateControlMode(e.target.value)} + name="rateControlMode" + id="rateControlMode" > @@ -80,7 +82,7 @@ function LibaomOptions(props: { rateControlMode() === "Constrained" } > - + - -
+ +
{ props.onParamChanged( diff --git a/solid-src/src/util/ffmpeg.ts b/solid-src/src/util/ffmpeg.ts index 2cc6d00..4b86545 100644 --- a/solid-src/src/util/ffmpeg.ts +++ b/solid-src/src/util/ffmpeg.ts @@ -103,6 +103,10 @@ export interface FFmpegParams { * Extra parameters defined by users */ useropts: ExtraFFmpegArguments; + /** + * Extra output parameters defined by Vencoder + */ + outputopts?: { [key: string]: string }; } const NULL_LOCATION = window.NL_OS === "Windows" ? "NUL" : "/dev/null"; @@ -129,6 +133,13 @@ export function generateOutputCommand(params: FFmpegParams) { globalopts += " " + params.useropts.global; } + if (params.outputopts !== undefined) { + console.log(params.outputopts); + for (const key of Object.keys(params.outputopts)) { + outputopts += ` -${key} ${params.outputopts[key]}`.trimEnd(); + } + } + if (params.twopass) { const commonOpts = `${globalopts}${inputopts} -i "${params.inputFile ?? "{fileName}"}" -c:v ${params.encoder ?? params.vcodec} -b:v ${ params.vbitrate ?? DEFAULT_BITRATE