refactor: eliminate container demuxing in conversion pipeline#18
Merged
Conversation
- Replace temp-file + @napi-rs/webcodecs demuxing with in-memory Packet[] collection - Extract full VideoDecoderConfig (codec, description, codedWidth/Height, colorSpace, optimizeForLatency) from encoder's CodecParameters - Rewrite Muxer to accept Packet[] directly with private annexBToAVCC for H.264/H.265 - Simplify TrackDecoder config resolution to single candidate with immediate throw - Remove @napi-rs/webcodecs dependency - Update AGENTS.md and README.md to reflect new architecture
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
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.
Summary
@napi-rs/webcodecsdemuxing: the Converter now collects rawPacket[]directly from the encoder in memory, and the Muxer packs them into FSV binary without container demuxingVideoDecoderConfigextraction: readscodec,description(avcC/hvcC),codedWidth/codedHeight, andcolorSpace(primaries, transfer, matrix, fullRange) from the encoder'sCodecParametersafter encoding, withoptimizeForLatency: truebaked inTrackDecoder.config(): removed hardcoded bt709 fallback and 4-candidate loop — single config from manifest with immediate throw on unsupported@napi-rs/webcodecsdependency: no longer used anywhere in the codebaseChanges
src/core/Converter.tsAV_CODEC_FLAG_GLOBAL_HEADER+CodecParametersconfig extraction, color space mapping from ffmpeg constantssrc/core/Muxer.tsPacket[]instead of container buffers, privateannexBToAVCC()for H.264/H.265src/core/Packet.tssrc/core/TrackDecoder.tspackage.json@napi-rs/webcodecs, added./core/PacketexportAGENTS.md,readme.mdNotes
@napi-rs/webcodecswas only used by the old Muxer to demux temp mp4/webm files — entirely eliminated