Add NVENC AV1 hardware video encoding for WebRTC#2240
Open
larsers wants to merge 1 commit intogoogle:mainfrom
Open
Add NVENC AV1 hardware video encoding for WebRTC#2240larsers wants to merge 1 commit intogoogle:mainfrom
larsers wants to merge 1 commit intogoogle:mainfrom
Conversation
Add GPU-accelerated video encoding via NVIDIA NVENC to the WebRTC streamer, with a plugin/provider architecture that supports multiple codecs and falls back gracefully to software VP8 when no NVIDIA GPU is available. Key changes: Provider/registry framework: - Add EncoderProvider/DecoderProvider abstract interfaces with singleton registries and priority-based selection - Add CompositeEncoderFactory/CompositeDecoderFactory that query all registered providers at runtime - Replace hardcoded VP8-only encoder factory with composite factory NVENC encoding: - Add codec-agnostic NvencVideoEncoder driven by NvencEncoderConfig (codec GUIDs, bitrate limits, per-codec callback hooks) - Add AV1 NVENC provider with runtime GPU capability detection - Add CudaContext singleton for CUDA device management Native ARGB/ABGR frame path: - Add AbgrBuffer and CvdAbgrVideoFrameBuffer for packed frame formats, eliminating CPU-side I420 conversion when NVENC is used - Modify DisplayHandler to pass native ARGB/ABGR frames directly - Modify VideoTrackSourceImpl for ABGR routing and monotonic timestamp enforcement Build system: - Add rules_cuda, nv_codec_headers to MODULE.bazel - Add override_dh_shlibdeps for CUDA/NVENC shared libs - Use alwayslink = True for static initializer registration
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.
Add GPU-accelerated video encoding via NVIDIA NVENC to the WebRTC streamer, with a plugin/provider architecture that supports multiple codecs and falls back gracefully to software VP8 when no NVIDIA GPU is available.
Key changes:
Provider/registry framework:
NVENC encoding:
Native ARGB/ABGR frame path:
Build system: