| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
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
|