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. --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 09ee1d3..a3adaf4 100644 --- a/README.md +++ b/README.md @@ -146,6 +146,7 @@ quiet = false | `[encoding]` | `preset` | string | `-p` | | `[encoding]` | `nice` | integer | `-N` | | `[encoding]` | `verify_output` | boolean | `--verify-output` | +| `[encoding]` | `hwaccel` | string or boolean | `--hwaccel` / `--no-hwaccel` | | `[skip]` | `codecs` | array of strings | `-S` (merged with CLI) | | `[saving]` | `enabled` | boolean | `-s` | | `[saving]` | `file` | string | `--saving-file` | @@ -155,6 +156,10 @@ quiet = false > **Note:** `[skip] codecs` from the config file and `--skip-codec` from the > CLI are **merged** — both sources contribute to the skip list. +> **Note:** `[encoding] hwaccel` accepts `false` (disable), `true` (use `auto`), +> or a method string such as `"vaapi"` or `"cuda"`. CLI `--hwaccel`/`--no-hwaccel` +> always takes precedence. + ### Codec skip list (deprecated) The legacy `skip.conf` file is no longer read. If it still exists, a @@ -177,6 +182,8 @@ transcode.sh [OPTION] [--] FILE... | `-f PATH`, `--encode-file PATH`, `--encodefile=PATH` | Read file list from PATH (one per line) | | `-n`, `--dry-run` | Show what would be done; don't run ffmpeg | | `-N VALUE`, `--nice VALUE`, `--nice=VALUE` | Niceness value for ffmpeg (default: 19) | +| `--hwaccel [METHOD]`, `--hwaccel=METHOD` | Enable hardware acceleration; METHOD defaults to `auto` if omitted (e.g. `cuda`, `vaapi`, `videotoolbox`); enabled by default | +| `--no-hwaccel` | Disable hardware acceleration (omit `-hwaccel` from ffmpeg invocation) | | `-s`, `--saving` | Log filesize savings after each encode | | `--saving-file PATH`, `--saving-file=PATH` | Savings log path (default: `transcode_savings`) | | `-S LIST`, `--skip-codec LIST`, `--skip-codec=LIST` | Codecs to skip (comma/space/colon separated) | -- cgit v1.3.1