From d6b6cb1bfd71e95aeda2e784c214ddffcc777fd1 Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Sun, 22 Feb 2026 08:41:04 +0100 Subject: feat: initial release of transcode.sh v1.0.0 Batch transcode helper for media files using ffmpeg. Encoding parameters are supplied by user-defined preset files (shell snippets that set an `ffargs` array) stored under ${XDG_CONFIG_HOME:-$HOME/.config}/transcode.sh/presets/. Key capabilities: - Probes input codec and pixel format via ffprobe; derives an output pixel format that preserves chroma subsampling and bit depth. - Per-user and per-invocation codec skip lists to leave already-encoded files untouched. - Atomic in-place replacement: encodes to a temp file in the same directory, then renames on success. - --only-if-smaller: discard the result if it is larger than the original. - --saving: append filename, original/new sizes and percentage saved to a log file after each successful encode. - --dry-run, --verbose, --quiet, --nice and --continue flags. - Respects the NO_COLOR standard. - Script hardening: strict PATH, safe IFS, errtrace, nounset, pipefail. Also included: - Man page (transcode.sh.1) - Bash completion script (transcode.sh.bash-completion) - README.md - .gitmessage commit message template License: BSD-3-Clause --- .gitmessage | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .gitmessage (limited to '.gitmessage') diff --git a/.gitmessage b/.gitmessage new file mode 100644 index 0000000..571fb50 --- /dev/null +++ b/.gitmessage @@ -0,0 +1,58 @@ +# [optional scope]: (max 72 chars total) ------>| +# +# Types (choose ONE): +# feat New feature (MINOR bump in SemVer) +# fix Bug fix (PATCH bump) +# docs Documentation only (README, man page, comments) +# style Formatting, whitespace — no logic change +# refactor Code restructure — no feature/fix +# perf Performance improvement +# test Tests only +# build Build system / dependency changes +# ci CI/CD configuration +# chore Maintenance (release commits, tooling) +# revert Revert a previous commit +# +# Scopes (optional, in parentheses after type): +# core Main script logic / encode_one() +# preset Preset loading / preset files +# color Terminal color / NO_COLOR handling +# cli Option parsing / help / version output +# skip Codec skip-list handling +# saving File-size savings logging +# docs Documentation (man page, README) +# completion Bash completion script +# +# Breaking changes: append ! before the colon → feat(cli)!: ... +# -------------------------------------------------------------------------- + +# [blank line — required before body] + +# Body (optional): explain WHY, not WHAT. Wrap at 72 chars. ---->| +# +# Motivation for the change, background, trade-offs considered, etc. +# Use multiple paragraphs separated by blank lines if needed. + +# [blank line before footers] + +# Footers (optional): +# BREAKING CHANGE: +# Fixes: # +# Refs: #, +# Reviewed-by: Name +# Co-authored-by: Name +# +# -------------------------------------------------------------------------- +# Examples: +# +# feat(preset): add support for passing raw ffmpeg flags via env var +# +# fix(core): prevent tmp file leak when ffprobe exits non-zero +# +# docs: add man page and bash completion script +# +# feat(cli)!: rename --encodefile to --file-list for clarity +# +# BREAKING CHANGE: --encodefile/-f is now --file-list/-F. Update any +# scripts or aliases that use the old flag. +# -------------------------------------------------------------------------- -- cgit v1.3.1