From 7a33be9034e7d950459c7a30a49d544cf36e5270 Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Sat, 16 May 2026 15:08:15 +0200 Subject: feat(skip): allow overriding config skip codecs Add --skip-codec-override so users can ignore configured skip codecs for a single run and use only codecs provided through --skip-codec. Defer CLI skip-codec parsing until after config loading so the final skip list can be resolved independently of option order. Document the new override behavior in the README and man page, and add shell completion for the new flag. --- transcode.sh.1 | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) (limited to 'transcode.sh.1') diff --git a/transcode.sh.1 b/transcode.sh.1 index c827336..2dd725a 100644 --- a/transcode.sh.1 +++ b/transcode.sh.1 @@ -151,12 +151,22 @@ in the current working directory. .BR \-S " \fILIST\fR, " \-\-skip\-codec " \fILIST\fR, " \-\-skip\-codec= \fILIST\fR Comma-, space- or colon-separated list of video codec names to skip. Files whose detected input codec appears in this list are left untouched. -Codecs specified here are merged with any codecs listed under +By default, codecs specified here are merged with any codecs listed under .B [skip] codecs in .B config.toml \(em both sources contribute to the skip list. .TP +.BR \-\-skip\-codec\-override +Ignore codecs listed under +.B [skip] codecs +in +.B config.toml +and use only codecs provided through +.BR \-S / \-\-skip\-codec +for this run. The position of this flag on the command line does not matter; +it changes how the final skip list is resolved after all options are parsed. +.TP .BR \-l ", " \-\-only\-if\-smaller After encoding, replace the original only when the new file is strictly smaller. If the transcoded file is larger the temporary file is removed @@ -358,8 +368,10 @@ sources. .TP .IR "${XDG_CONFIG_HOME:-$HOME/.config}/transcode.sh/config.toml" Optional TOML configuration file. Provides defaults for all options. -CLI flags always take precedence. The file must be valid TOML; an -unparseable file is a hard error. Requires +CLI flags generally take precedence. Skip codecs are additive by default: +configured codecs and CLI codecs are merged unless +.BR \-\-skip\-codec\-override +is used. The file must be valid TOML; an unparseable file is a hard error. Requires .BR tomlq (1). Supported sections and keys: .RS @@ -400,7 +412,11 @@ CLI \fB--backup-dir\fR takes precedence. .TP .B [skip] codecs Array of strings. Merged with any codecs from -.BR \-S . +.BR \-S +by default. Use +.BR \-\-skip\-codec\-override +to ignore this configured list and use only codecs provided through +.BR \-S / \-\-skip\-codec . .TP .B [size_report] enabled Boolean. Equivalent to @@ -492,6 +508,14 @@ transcode.sh \-N 10 \-S av1 input.mkv .fi .RE .PP +Temporarily replace configured skip codecs with only HEVC: +.PP +.RS +.nf +transcode.sh \-\-skip\-codec\-override \-S hevc input.mkv +.fi +.RE +.PP Load an alternative configuration file: .PP .RS -- cgit v1.3.1