summaryrefslogtreecommitdiff
path: root/README.md (unfollow)
Commit message (Collapse)Author
2026-05-23chore(release): prepare 2.1.0v2.1.0Dennis Fink
2026-05-22docs(readme): fix completion install filenameDennis Fink
Update the README installation commands to reference the renamed bash completion script with its .sh extension. This keeps the documented install path in sync with the repository filename so copy-paste installation commands work again.
2026-05-22feat(streams): allow selecting video probe streamDennis Fink
Add --video-stream and [encoding].video_stream so users can choose which input video stream is probed for preset helper variables. Use the selected stream for codec, pixel format, frame rate, output pixel format, and GOP size metadata while leaving preset stream mapping unchanged. Validate CLI stream selectors strictly and ignore invalid config values with a warning so bad configuration falls back to the default v:0 stream. Document the new option in the README and man page, add verbose dry-run output, and provide bash completion for common video stream selectors. Closes #6.
2026-05-19feat(output): make ffmpeg loglevel configurableDennis Fink
Add --ffmpeg-loglevel so users can choose which ffmpeg messages are shown during encoding instead of always using the built-in default. Load the same setting from [output].ffmpeg_loglevel when it is configured and no CLI value was provided. Document the new option in the README and man page, and add shell completion for supported ffmpeg log levels.
2026-05-17chore(release): prepare 2.0.0v2.0.0Dennis Fink
2026-05-17docs(readme): add release metadata markersDennis Fink
Add release version and revision date markers to the README so release tooling can update visible project metadata automatically. Expose the current packaged version near the top of the README without changing the rest of the documentation structure.
2026-05-16docs(licensing): add SPDX headersDennis Fink
Add SPDX copyright and license markers to repository metadata and documentation files. Use comment styles appropriate for git attributes, gitignore, the commit message template, README, and justfile so license metadata is visible without changing runtime behavior.
2026-05-16feat(skip): allow overriding config skip codecsDennis Fink
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.
2026-05-16feat(backup): add original file backupsDennis Fink
Add --backup-dir support so successful encodes can copy the original file to an existing backup directory before replacing it. Preserve each source file's absolute path below the backup directory and avoid overwriting existing backups by appending numeric suffixes when needed. Document the new CLI and config option, and add directory completion for the backup path.
2026-05-16fix: allow out-of-range nice adjustmentsDennis Fink
Keep nice validation focused on accepting integer values instead of rejecting values outside the standard -20 to 19 range. Avoid failing early for values that nice itself accepts and clamps internally. This gives users behavior that matches the underlying tool instead of turning a non-error into a transcode.sh usage error. Update help text and README wording to describe the option as a nice adjustment, matching the command behavior.
2026-05-15docs: polish README formattingDennis Fink
Move the preset security note before the preset path so readers see the warning before creating or sourcing preset files. Align the size report schema header with spaces for cleaner rendered documentation.
2026-05-14docs: fix option and help text typosDennis Fink
Correct the README entry for the long --encode-file=PATH form, which was documented as --encodefile=PATH. Also fix spacing in the generated help text for output_gop_size so the preset variable descriptions remain aligned.
2026-05-14feat(size-report): replace savings log with status reportsDennis Fink
Rename the old savings log feature to size report across the CLI, configuration, documentation, man page, and bash completion. The new `--size-report` option keeps the existing `-s` shorthand, while `--saving`, `--saving-file`, and the `[saving]` config section are replaced by `--size-report`, `--size-report-file`, and `[size_report]`. Extend reporting beyond successful encodes. The TSV log now gains a leading `status` column and records encoded files, codec skips, only-if-larger skips, and failed inputs. Size-report output also prints per-file feedback for encoded and skipped-larger files, including human-readable original/new sizes, bytes saved, and saved percentage. Track batch-level report counters and print an end-of-run summary for multi-file runs with encoded/skipped/failed counts, total bytes saved, and the overall weighted saving percentage across successful encodes. Document the new TSV schema in the README and man page, update examples and config snippets, and adjust bash completion for the renamed options. BREAKING CHANGE: `--saving` is now `--size-report`. `--saving-file` is now `--size-report-file`. `[saving]` in config.toml is now `[size_report]`. The TSV log gains a leading `status` column and may contain skipped and failed rows in addition to successful encodes.
2026-05-10refactor(core): remove awk and bc dependenciesDennis Fink
Both tools were used for simple arithmetic that bash handles natively. awk: fps rounding (num/den) replaced with round-half-up integer arithmetic: (num + den/2) / den. bc: savings percentage replaced with bash $(( )) arithmetic. bc was a conditional dependency (only required with --saving), which made the dependency story inconsistent. Removing it means the full feature set is available with only ffmpeg, ffprobe, nice, and optionally tomlq. Updated README requirements table, man page --saving description, SEE ALSO section, and exit-code 127 entry accordingly.
2026-05-10feat(preset): add --list-presets to enumerate available presetsDennis Fink
Print all *.sh files found in $PRESET_DIR, one per line, with a one-line description extracted from the first line of each file if it matches a `# description: …` comment. Presets without such a comment are listed without a description. Symlinks pointing to another preset inside $PRESET_DIR are shown as "<name> - Symlinked to <target>" rather than duplicating the description. Symlinks pointing outside $PRESET_DIR are followed and treated as regular preset files. Column width for preset names is calculated from the longest name in the directory so descriptions align with minimal padding. Also extracts the repeated readlink/realpath idiom into a dedicated resolve_path() helper and adds a doc comment to filesize(). Exits immediately after printing (same pattern as --version/--help). Honours --quiet/NO_COLOR via the existing msg() and color infrastructure.
2026-05-09feat(core,cli): add hardware acceleration support via --hwaccelDennis Fink
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 <TAB>) and the equals form (--hwaccel=<TAB>). The completion script is also reformatted from 4-space to 2-space indentation for consistency with transcode.sh itself.
2026-05-09refactor(core): remove hardcoded PATH resetDennis Fink
PATH='/bin:/usr/bin:/usr/local/bin' was intended as a security measure against PATH injection. For a script invoked manually in the user's own shell the benefit is marginal: if an attacker controls the user's PATH they already have larger problems. The cost is real — tools installed outside these three directories (Homebrew, Nix, ~/.local/bin) silently fail, and the documented workaround of prepending a path at invocation time does not work because the script overwrites PATH immediately on startup. Remove the PATH reset and all associated documentation. The remaining hardening measures (unalias -a, hash -r, strict set -o flags, umask) are retained.
2026-05-09feat(core): verify output integrity before replacing originalDennis Fink
After ffmpeg exits successfully, run ffprobe against the temporary output file to confirm it is a valid, playable media file before replacing the original. If the probe fails the temporary file is removed and the encode is treated as a runtime failure, leaving the original untouched. This guards against cases where ffmpeg exits 0 but has written a truncated or corrupt container (e.g. due to a disk-full condition mid-write, a codec bug, or a preset producing an unreadable stream). The check is enabled by default and can be disabled via --no-verify-output or [encoding] verify_output = false in config.toml for large batch jobs on trusted encoders where the extra ffprobe round-trip is undesirable. The --continue flag is honoured: a failed integrity check counts as a runtime failure for the purposes of deciding whether to proceed to the next file. Docs, man page, bash completion, and README updated accordingly.
2026-05-08feat(core): expose frame-rate variables to presetsDennis Fink
Add input_frame_rate, input_fps, and output_gop_size to the set of variables available to preset files at source time. input_frame_rate is the raw ffprobe fraction (e.g. 30000/1001). input_fps rounds that fraction to the nearest integer via awk. output_gop_size is derived as roughly five seconds of video (input_fps * 5), capped at 300 frames. The ffprobe invocation is extended to request r_frame_rate alongside the existing codec_name and pix_fmt entries; a missing frame rate is now treated as a hard error. Dry-run and verbose output are updated to display the new values. Documentation (header comment, --help text, man page, README) is updated accordingly.
2026-05-08chore(docs): update author email and add SPDX headersDennis Fink
The contact address dennis.fink@c3l.lu has been replaced with me+coding@dennisfink.me across all files where it appeared: SPDX-FileCopyrightText, AUTHOR constant, --version output, README footer, LICENSE file, and the man page AUTHOR section. SPDX licence headers were also added to transcode.sh.1 and transcode.sh.bash-completion to bring all files into full REUSE compliance.
2026-05-08feat(cli)!: add TOML config file supportDennis Fink
Add a structured config file so common defaults can live in one place instead of being repeated in aliases or shell wrappers. CLI flags keep precedence, which keeps one-off overrides predictable. Use tomlq only when a config file is present, and fail early on missing dependencies or invalid TOML so configuration mistakes do not silently change encode behavior. Move the persistent skip-codec list from the legacy skip.conf file to [skip] codecs in config.toml. Config codecs are merged with --skip-codec so global defaults and per-run skips can be combined. Document the new format in the README and man page, update dependency notes, and extend bash completion for config-file paths and the new negative boolean flags. BREAKING CHANGE: skip.conf is no longer read for codec skips. Migrate its entries to [skip] codecs in config.toml and remove the old file. BREAKING CHANGE: --encodefile and --encodefile= are replaced by --encode-file and --encode-file=. Update scripts, aliases, and completion usage to use the hyphenated option name.
2026-02-24docs: document all variables available to presetsDennis Fink
Previously only output_pixel_format was mentioned. All three variables (input_codec, input_pixel_format, output_pixel_format) are now listed with descriptions in the script header comment, the README, and the man page.
2026-02-22docs: document base ffmpeg arguments passed before preset ffargsDennis Fink
Both the README and the man page now explain that the script always passes -map 0, -map_metadata 0, -map_chapters 0, and -c copy to ffmpeg before appending the preset's ffargs array. This context is important for preset authors, who only need to override the streams they intend to re-encode. Also fix a minor blockquote rendering issue in the README (missing blank line before the fenced code block in the PATH note).