feat: improve Instant and Chrome audio using existing local outputs - #2242
Open
richiemcilroy wants to merge 15 commits into
Open
feat: improve Instant and Chrome audio using existing local outputs#2242richiemcilroy wants to merge 15 commits into
richiemcilroy wants to merge 15 commits into
Conversation
Member
Author
|
hey @greptileai, please re-review the PR |
Member
Author
|
hey @greptileai, please re-review the PR |
Member
Author
|
hey @greptileai, please re-review the PR |
Member
Author
|
hey @greptileai, please re-review the PR |
Member
Author
|
hey @greptileai, please re-review the PR |
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.
Quiet desktop Instant and Chrome recordings can receive bounded level correction after their original MP4 is published. The existing segment mux or WebM conversion supplies its local output, avoiding another source download or media job. Video packets are copied and verified; only audio is re-encoded.
A newly reported recording exposed limits that would have left very quiet audio unchanged. The worker now accepts valid level measurements down to -55 LUFS and progressively raises quieter recordings toward -22 LUFS, capped at 28 dB and available peak headroom. Recordings at or above -34 LUFS retain the previous planned gain. Encoded output must remain below -1 dBTP. Web publication enforces the updated range and gain bound too.
Audio and video may end independently. Correction preserves each original timeline and checks source/output audio start, duration, sample count, video packets and terminal packet timing. Both track durations remain subject to the processing limit. EQ and denoising remain disabled.
Validation on the updated implementation:
Constant gain also raises existing background noise. These results establish bounded technical compatibility and level improvement, not universal perceptual improvement or a zero-regression guarantee. Legacy/direct MP4 finalization paths, recordings outside the limits and unsupported storage keep their originals. Clearing audio selection fields restores original playback. No database DDL migration is required.
Detailed methodology and limits: audio-quality-benchmarks.md.
Storage verification responsibility: the authenticated worker SHA-256 hashes a full conditional GET of the stored derivative, compares it to the locally validated output, and rechecks strong ETag/size before and after that read. The publication payload now uses the verifier's computed remoteSha256 directly. The web transaction pins that already-verified identity; it does not treat ETag as a cryptographic digest or repeat the full download. Tests assert If-Match on storage reads, the computed digest in publication, rejection of corrupted bytes with unchanged ETag/size, and no extra source read. The focused Linux worker and web publication tests passed again after this clarification.
Greptile Summary
This PR publishes bounded audio-level derivatives for eligible Instant and Chrome recordings while retaining the original media and reusing already-local outputs.
Confidence Score: 5/5
The PR appears safe to merge, with no outstanding correctness, security, or repository-rule issue identified.
The latest stored-digest change remains bound to the locally validated candidate through a complete conditional read and rejects mismatched bytes before publication. The earlier duration-test finding was manually resolved, and the current tests cover eligible 900-second inputs as well as values above the limit.
Important Files Changed
Reviews (5): Last reviewed commit: "fix: publish the digest verified from st..." | Re-trigger Greptile