Unity-Technologies / com.unity.webrtc

WebRTC package for Unity
Other
757 stars 197 forks source link

[REQUEST] Use Media Foundation SDK for hardware accelerated video encode and decode on Windows #558

Open tim-depthkit opened 2 years ago

tim-depthkit commented 2 years ago

Is your feature request related to a problem? Please describe. Hardware accelerated decoding on windows is currently unavailable, and based on how it is being implemented, will likely be limited to NVIDIA GPUs only.

Describe the solution you'd like Rather than directly integrate with vendor SDKs to support hardware accelerated encode/decode, use the Media Foundation SDK from Microsoft, which provides an abstract interface to hardware encoders and decoders, and relies on GPU vendors to enable hardware encode and decode support via their graphics drivers. This will ultimately reduce the development and maintenance burden on Unity by obviating the need to develop specific integrations for each GPU vendor, and will unlock cross-vendor hardware encoding and decoding support all at once.

Describe alternatives you've considered On Windows, Media Foundation this is the standard way to support hardware acceleration in video applications at the OS level.

Additional context

karasusan commented 2 years ago

@tim-depthkit Thanks for your feedback.

note: Implementation by chromium team https://source.chromium.org/chromium/chromium/src/+/main:media/gpu/windows/

karasusan commented 2 years ago

memo: WRS-170

tim-depthkit commented 2 years ago

@karasusan Does this mean that this enhancement is on your roadmap? Any rough estimate on what the timeframe would be to get this implemented?

karasusan commented 2 years ago

@tim-depthkit It is difficult to say when support the encoder but we want to support other codecs for developers.

karasusan commented 2 years ago

@tim-depthkit I posted the thread in Unity forum for sharing our plan. https://forum.unity.com/threads/unity-render-streaming-status-update-q4-2021.1215801/