feat: FFmpeg hardware-accelerated export pipeline (NVENC/AMF/QuickSync)#141
Open
lsj5031 wants to merge 1 commit intowebadderall:mainfrom
Open
feat: FFmpeg hardware-accelerated export pipeline (NVENC/AMF/QuickSync)#141lsj5031 wants to merge 1 commit intowebadderall:mainfrom
lsj5031 wants to merge 1 commit intowebadderall:mainfrom
Conversation
Add FFmpegExporter as an alternative to WebCodecs-based VideoExporter, enabling GPU-accelerated encoding via NVENC (NVIDIA), AMF (AMD), QuickSync (Intel), with automatic CPU fallback (libx265/libx264). Key changes: - New FFmpegExporter streams RGBA frames to FFmpeg stdin via IPC, avoiding multi-GB temp files - Encoder probe system: checks availability and usability of each hardware encoder before use, falling back gracefully - ExportEncodingInfo type reports encoder, codec family, and acceleration mode back to the renderer - readCompositeRgbaFrame() added to FrameRenderer for raw pixel access - Clean WGC shutdown: replace detached thread + ExitProcess(0) with joinable thread and normal return - Add missing electron-updater dependency for TypeScript compilation
b415c24 to
42dd585
Compare
Owner
|
will take a look at this soon |
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
This PR adds a new FFmpeg-based export path that can use hardware video encoders when available, while still falling back safely to CPU encoding.
It does not replace the existing WebCodecs/WebMuxer export flow. Instead, it introduces an additional pipeline that can be used for MP4 export in environments where FFmpeg-backed encoding is preferable.
What’s included
FFmpeg export pipeline
Encoder selection and safety
Export metadata
Supporting changes
eadCompositeRgbaFrame() to FrameRenderer so the composite canvas can be streamed into FFmpeg
Why this helps
The current export pipeline already works well, but FFmpeg gives us another option that can be useful for:
Notes on compatibility
This change is designed to degrade gracefully:
So this should still be safe on systems without NVIDIA GPUs.
Files changed
Validation
Tested locally on Windows:
Follow-up ideas
If this direction looks good, a follow-up could wire this exporter more explicitly into the editor UI so users can choose or inspect the export path more directly.