Automated release: version and notes generated from pull requests merged since 3.6.7.
Added
audio.py --tempo FACTORand--length-samples N(#486).--tempochanges the tempo of
the main track and keeps its pitch, withatempostages of 0.5–2.0 chained for a factor outside
that range (0.1–10);--length-samplespads with silence or trims the track to N samples per
channel before it is encoded, and alength_samplesverification step decodes the written track
and counts them: the count must be N for a lossless output (PCM, FLAC, ALAC) and within one
codec frame of N for a lossy one, whose encoder pads to whole frames. With
--length-samples, an Opus output counted at a rate other than 48 kHz is refused (an Opus stream
decodes at 48 kHz, so the file would not hold N samples), with--sample-rate 48000as the way
out; without--length-samplesan Opus output of any rate is written as before. The result'stimingreports{tempo, atempo, length_samples, sample_rate}. Both
need an audio output (--tempoalso takes a--replacetrack beside the picture): the input's
own sound beside its stream-copied picture would drift from it, and is refused.audio.py --sample-rate HZand--channel N(#487).--sample-rateresamples the output
(aresample, after the mix);--channel Nkeeps one channel of the track by its 0-based index
as a 1-channel output (two identical sides with--stereo). The output's rate and channel count
are read back by probe, as thesample_rateandchannelsverification steps; theaudio
block reports what was asked (sample_rate,channel), not a measurement.
An index past the track's channels, and--channelwith--downmix, are refused before ffmpeg
runs.
Fixed
- A source tagged colour space
gbrcan be graded with--keep-alpha(#454). FFmpeg's PNG
encoder tags a PNG-in-.mov/.mkvstreamgbr, and the alpha line passed it back as
-colorspace gbr, a name the option refuses, so everycolor.py --lut/--correct --keep-alphaof
such a source failed (graphics.pyandoverlay.pyshare the line).gbris no longer carried
over (the PNG line tags itself; a YUV line would be mislabelled by it). The sweep of every probed
tag passed back as an option found a second name:-color_trcrefuses ffprobe'sbt470mand
bt470bg(PAL/NTSC-tagged sources), which failed the same alpha line and madecut.py --smart
fall back to a full re-encode._common/color.carried_tag()now spells every such tag the way
its destination takes it. - A video-only VP9/AV1
.webmis not refused for an audio encoder it never uses (review of
#492). The new WebM check (#488, below) read-c:a aacincut.py's line for a silent source
as a sound WebM cannot hold; an encoder option is only a reason to refuse when an input has a
stream of that kind. audio.py --limitno longer delays the sound (#476).alimiterran without latency
compensation, so the output was the input delayed by the look-ahead (--limit-attack, 5 ms by
default: 240 samples at 48 kHz) and drifted off a stream-copied picture. It now runs with
latency=1; so does--voice strong's limiter, the one otheralimiterin the skill. The
limited sound starts on the input's own sample (measured, within 3 samples) and keeps its length.audio.pypads and trims to the sample (#478). The sound was conformed to the source with
apad,atrim=0:{seconds:.3f}, rounded to the millisecond, so a--replaceor--musicresult,
or a track beside a stream-copied picture, could be up to 24 samples (48 kHz) longer or shorter
than the source. It is nowapad=whole_len=N,atrim=end_sample=N, N counted at the track's own
rate (pinned withaformat), asjoin.pyhas done since #455.- A
.webmoutput of an H.264/AAC encode is refused before anything runs (#488).
crop.py -o out.webmfailed in the muxer after the encode had started ("Nothing was written into
output file",kind: ffmpeg) while its dry run said completed. The cause is shared: every
re-encoding tool writes H.264 (or HEVC) and AAC, which WebM cannot hold, and the sweep of every
tool intests/sweep.pywith a.webmoutput failed the same way (24 of 25;lookwrites a
PNG). The one check every ffmpeg command passes now refuses it, real run and dry run alike, as
kind: inputwith reasonoutput_container_codecsand the encoders indetails; name a
.mp4/.mov/.mkvoutput instead. VP9/Opus lines (--alpha-codec vp9,export.py --preset vp9-alpha) and stream copies are unchanged. - feat(audio): --tempo, --length-samples, --sample-rate, --channel; fixes for colour tags, limiter delay, sample-exact length and .webm outputs (#492)
Closes: #454, #476, #478, #486, #487, #488
What's Changed
- feat(audio): --tempo, --length-samples, --sample-rate, --channel; fixes for colour tags, limiter delay, sample-exact length and .webm outputs by @kajisho5 in #492
Full Changelog: v3.6.7...v3.7.0