Automated release: version and notes generated from pull requests merged since 3.2.2.
Added
- An alpha-preserving path for grading and compositing.
color.py --correct/--lut --keep-alphagrades an alpha clip and keeps its alpha (split off before the grade, merged back unchanged, compared with the source's frame by frame);graphics.py --keep-alphaandoverlay.py --keep-alphadraw on the input's alpha and write the element with it;background.py --transparentwrites a fully transparent canvas to draw one element on. The line is ProRes 4444 by default (--alpha-codec qtrle|png|vp9),--alpha-mode straight|premultipliedsays how the colour is stored, and the source's colour tags are kept as--codec proreskeeps them. Every such run reads the alpha back as analphaverification step (alpha_codec,alpha_modein the result). Without the new flags the tools write what they wrote before. check.py --levels bt709|ebu-r103measures the broadcast signal range: alegal levelsrow
with the share of luma and of chroma samples outside the standard's legal range, counted exactly
in every frame (lutyuv mask + signalstats), the worst frame and min/max Y/U/V; FAIL when one frame
has more than--levels-tolerance(1 %) out. The JSONlevelsdocument repeats it per clip and per
--levels-windowseconds (10), with signalstats' BRNG beside it. Limits follow the bit depth
(bt709: 16-235 / 16-240 at 8 bits; ebu-r103: luma -1 %..103 %, 14-241). Without the flag the rows
and the document are unchanged.color.py --legalize bt709|ebu-r103(with--to-sdr,--lutor--correct;--correct
alone clamps only) clamps luma and chroma into the same limits as the last filter, after the 8-bit
4:2:0 conversion, and measures the written file (legalize, verification steplegal_levels,
legalize_residualwarning when the encode left samples out of range). It writes the H.264 line, so
--keep-alphaand a--codecother than h264 are refused with it;--drop-alphacombines.cut.py --smart: a keyframe-aware, frame-exact cut for H.264. Only the frames from each cut
point to the next keyframe (and from the last keyframe to the end point) are re-encoded, with
libx264 matched to the source's profile, level, pixel format, reorder depth, size, SAR and colour
tags. The whole GOPs between are the source's packets, joined through MPEG-TS parts (in-band
parameter sets) and kept on the source's time base.- The result is checked before it is moved into place: the frame count and frame grid, the copied
packets against the source's, framemd5 of the re-encoded parts and of the first 300 frames
of each copied part, and the stream parameters (smart.checks,smart_*steps,mode: smart). - A source it cannot match, or a failed check, falls back to the full re-encode. The result then
says why (smart.reason,reason_code,reencode_reasonsmart_fallback). - Without
--smart, every cut is unchanged.
- The result is checked before it is moved into place: the frame count and frame grid, the copied
probe.py --keyframes-near T[,T...](--keyframe-window, 5 s): the keyframes around each
time, with the nearest before and after (keyframes).
Changed
- An output that loses a used alpha is no longer
verified.color.py(--correct,--lut,--to-sdr),graphics.pyandoverlay.pyon a source whose alpha is used (ProRes 4444, QuickTime Animation, PNG, VP9 with alpha; a frame below opaque) wrote opaque H.264 and reportedverified: true. The run still completes and writes the same file, but a failingalphastep (reason: alpha_dropped),alpha_dropped: trueand analpha_droppedwarning now say the alpha was lost;--drop-alpharecords that an opaque output is wanted. An opaque source runs and reports as before. doctorreadsffmpeg -decoders. The capability names gaindecoder:<name>, and the alpha tools' optional capabilities (decoder:libvpx-vp9,encoder:qtrle,encoder:png,encoder:libopus, ...) are resolved like every other one:available,missing_optionalorunknown, never affectingok.detectiongains adecodersentry.
Fixed
overlay.py --videowith a layer that has alpha covered the picture with an opaque rectangle. A VP9 layer stored with alpha (export.py --preset vp9-alpha) lost it in FFmpeg's own VP9 decoder and is now decoded with libvpx-vp9; an RGB layer (QuickTime Animation, PNG in .mov) lost it in its conversion to BT.709 YUV, which now keeps the alpha plane. Their transparent parts show the picture under them.- Alpha-preserving path, broadcast legal levels, smart cut (#433, carries #432 and #434)
What's Changed
- Add an alpha-preserving path: --keep-alpha, background.py --transparent, alpha verification by @kajisho5 in #433
Full Changelog: v3.2.2...v3.2.3