From 46e56972f2b4d16ca6b3fd04611f86cf8580ea10 Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Sat, 9 May 2026 21:30:38 +0200 Subject: feat(core,cli): add hardware acceleration support via --hwaccel Add --hwaccel [METHOD] / --no-hwaccel flags to control whether -hwaccel is passed to ffmpeg before the input file. The METHOD argument is optional and defaults to "auto", letting ffmpeg select the best available hardware decoder with automatic software fallback. Hardware acceleration is enabled by default (method: auto). Users on hosts where hwaccel causes compatibility or stability issues can opt out with --no-hwaccel or config.toml [encoding] hwaccel = false. The config key accepts false (disable), true (auto), or a method string such as "vaapi" or "cuda". CLI flags take precedence as usual. Bash completion is extended with a hwaccel_methods word list (auto, cuda, vaapi, dxva2, d3d11va, videotoolbox, qsv) for both the space form (--hwaccel ) and the equals form (--hwaccel=). The completion script is also reformatted from 4-space to 2-space indentation for consistency with transcode.sh itself. --- transcode.sh.1 | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) (limited to 'transcode.sh.1') diff --git a/transcode.sh.1 b/transcode.sh.1 index edeaae8..46b7526 100644 --- a/transcode.sh.1 +++ b/transcode.sh.1 @@ -86,6 +86,37 @@ Combine with .B \-v to see the detected codec and pixel format information. .TP +.BR \-\-hwaccel " [\fIMETHOD\fR], " \-\-hwaccel= \fIMETHOD\fR +Pass +.BI \-hwaccel " METHOD" +to +.BR ffmpeg (1) +before the input file, enabling hardware-accelerated decoding. +\fIMETHOD\fR is optional; when omitted it defaults to +.BR auto , +which lets +.BR ffmpeg (1) +select the best available hardware decoder and fall back to software +automatically. +Common values include +.BR cuda , +.BR vaapi , +.BR dxva2 , +and +.BR videotoolbox . +Hardware acceleration is +.B enabled by default +(method +.BR auto ). +.TP +.B \-\-no\-hwaccel +Do not pass +.B \-hwaccel +to +.BR ffmpeg (1). +Use this on hosts where hardware acceleration causes compatibility or +stability issues. +.TP .BR \-N " \fIVALUE\fR, " \-\-nice " \fIVALUE\fR, " \-\-nice= \fIVALUE\fR Run .BR ffmpeg (1) @@ -287,6 +318,20 @@ String. Default preset name. Equivalent to Integer. Default niceness value. Equivalent to .BR \-N . .TP +.B [encoding] hwaccel +String or boolean. +.B false +disables hardware acceleration. +.B true +enables it with method +.BR auto . +Any other string (e.g.\& +.IR vaapi , +.IR cuda ) +enables it with that specific method. +Equivalent to +.BR \-\-hwaccel " / " \-\-no\-hwaccel . +.TP .B [encoding] verify_output Boolean. Equivalent to .BR \-\-verify\-output / \-\-no\-verify\-output . -- cgit v1.3.1