Repository navigation
feat: assembly receipt of what each extraction actually cut (0.2.0) - #10
Merged
Merged
Conversation
A 110 GB day master on a 9p mount took longer than the flat 600 s keyframe probe, so keyframes came back unknown and every range fell back to a re-encode that decoded from the start of the file under a flat 3600 s timeout. Probe, copy and concat timeouts now scale with the bytes read at a 20 MB/s floor; the re-encode seeks on the input side with an output-side -ss 0 so copied audio carries no pre-cut packets, and its timeout scales with the range length. Releases 0.1.2.
# Conflicts: # CHANGELOG.md # pyproject.toml # src/keycut/__init__.py
Contributor
Author
|
Hard-denied (hard-deny: protected path family) and ready to merge -- all checks green. Offending paths:
Human merge: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds an assembly receipt: a record of what each extraction actually cut.
extract_and_concat_ranges_with_receiptandextract_and_concat_segments_with_receiptreturn(path, AssemblyReceipt), or(None, None)on failure.extract_and_concat_rangesandextract_and_concat_segmentskeep their signatures and behaviour; they are thin wrappers.keycut-assembly-receipt/1(documented in the README): per merged span, which requested ranges it absorbed, the keyframe-snapped source start, copy or re-encode and why, and where it landed in the output.duration_source: "planned").Why
Callers could not learn what was really cut. The forward keyframe snap was only debug-logged, the sub-GOP merge was invisible, and so was the copy or re-encode choice. Downstream time mapping (chapters, captions, overlays) had to guess the edited timeline instead of reading it.
Stacked on #9 (
fix/large-master-timeouts); it reuses that PR's size-scaled timeouts. Retarget tomainafter #9 merges.Tests
tests/test_receipt.py: merge membership, snapped copy start, both re-encode reasons, contiguous output spans, probe failure falling back to planned durations, JSON round trip.tests/test_integration_ffmpeg.py::TestAssemblyReceipt: real ffmpeg; a cut that forces a snap; the receipt's lastoutput_endmatches the probed output duration within one frame.ruff check .clean;pytest -q168 passed, no skips (ffmpeg present).