summaryrefslogtreecommitdiff
path: root/transcode.sh.1
diff options
context:
space:
mode:
authorDennis Fink2026-05-08 22:16:51 +0200
committerDennis Fink2026-05-08 22:16:51 +0200
commit4b5967b1fde15f0d7d677274f1ae353915e6854b (patch)
tree678962fff66a97789386b298cdb6c8e8cb1c13bf /transcode.sh.1
parentd3ee4e3e82ea5433e467331a2605675be2a60c9f (diff)
downloadtranscode.sh-4b5967b1fde15f0d7d677274f1ae353915e6854b.tar.gz
transcode.sh-4b5967b1fde15f0d7d677274f1ae353915e6854b.zip
feat(core): expose frame-rate variables to presets
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.
Diffstat (limited to '')
-rw-r--r--transcode.sh.126
1 files changed, 26 insertions, 0 deletions
diff --git a/transcode.sh.1 b/transcode.sh.1
index 8fe1e90..9a4c894 100644
--- a/transcode.sh.1
+++ b/transcode.sh.1
@@ -195,6 +195,32 @@ normalisation (e.g.\&
The recommended output pixel format, automatically derived from the
input to preserve chroma subsampling (4:2:0, 4:2:2, 4:4:4) and bit
depth (8, 10, 12, 16\-bit).
+.TP
+.B input_frame_rate
+The raw frame rate of the input video stream as reported by
+.BR ffprobe (1),
+expressed as a fraction (e.g.\&
+.IR 30000/1001 ,
+.IR 25/1 ,
+.IR 60/1 ).
+.TP
+.B input_fps
+The input frame rate rounded to the nearest integer (e.g.\&
+.IR 30 ,
+.IR 25 ,
+.IR 60 ).
+Derived from
+.B input_frame_rate
+and provided as a convenience for encoder heuristics that require a whole
+number.
+.TP
+.B output_gop_size
+The recommended GOP (Group of Pictures) size for the output, derived from
+.B input_fps
+as approximately five seconds of video (capped at 300 frames).
+Use this in presets to set
+.B \-g
+for encoders that accept an explicit GOP size.
.RE
.IP
Before the preset's