Repository navigation
Add hardware decoding support for .webm video files (VP9) using DXVA (relies on WebM pull request) - #125908
Open
Joy-less wants to merge 101 commits into
Open
Add hardware decoding support for .webm video files (VP9) using DXVA (relies on WebM pull request)#125908Joy-less wants to merge 101 commits into
.webm video files (VP9) using DXVA (relies on WebM pull request)#125908Joy-less wants to merge 101 commits into
Conversation
Co-Authored-By: Douglas Leão <60024671+DeeJayLSP@users.noreply.github.com>
Co-Authored-By: Douglas Leão <60024671+DeeJayLSP@users.noreply.github.com>
Co-Authored-By: Douglas Leão <60024671+DeeJayLSP@users.noreply.github.com>
Co-authored-by: Kongfa Waroros <gongpha@hotmail.com>
Co-authored-by: Kongfa Waroros <gongpha@hotmail.com>
Co-Authored-By: Kongfa Waroros <13400398+gongpha@users.noreply.github.com>
Co-Authored-By: Kongfa Waroros <13400398+gongpha@users.noreply.github.com>
Co-Authored-By: Kongfa Waroros <13400398+gongpha@users.noreply.github.com>
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-Authored-By: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-Authored-By: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-Authored-By: Ben Lubar <ben.lubar@gmail.com>
Co-Authored-By: D.J.L. Sales <60024671+DeeJayLSP@users.noreply.github.com>
Co-authored-by: D.J.L. Sales <60024671+DeeJayLSP@users.noreply.github.com>
Joy-less
force-pushed
the
add-webm-hardware-acceleration
branch
2 times, most recently
from
November 28, 2026 20:39
472bf08 to
23414e5
Compare
Joy-less
force-pushed
the
add-webm-hardware-acceleration
branch
from
November 28, 2026 20:43
23414e5 to
7c0aa72
Compare
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.
What problem(s) does this PR solve?
.webmvideo files (VP9) godot-proposals#15617Dependencies
This PR is based on #119299 (Add initial experimental support for
.webmvideo files (VP9)).Which is in turn based on #117921 (Add support for
.opusaudio files).Additional information
This pull request adds DXVA (DirectX Video Acceleration) hardware decoding to the WebM pull request. If this pull request is accepted, my suggestion is to add the following:
I added a new property to
VideoStreamPlayer, calledhardware_decoding_mode:Automatic: Chooses either software or hardware decoding based on the video, format, and platform. This is the default value.Software Only: Always uses software decoding. This can be used to check the performance of playing videos on platforms where hardware decoding is not supported. It can also be used if there are issues with hardware decoding.Hardware Only: Always uses hardware decoding. This can be used to check if hardware decoding is available for a given video, and to compare the performance withSoftware Only.This property can be updated while the video is playing, causing the video will restart and seek to the original position.
I implemented most of the changes in https://github.com/The-Simplicity-Group/libsimplewebm, which is a third party dependency, rather than in Godot, which means the Godot code can use it with a very similar API to the libvpx API. However, many of the changes haven't been merged yet, so the copy of libsimplewebm in this pull request is essentially a future version.
Images
Results
The numbers fluctuate a lot so it's difficult to get exact numbers, but here are rough estimates based on the Task Manager.
System info
Godot v4.8.dev (9ef472f) - Windows 11 (build 26300) - Multi-window, 1 monitor (1920x1080 @ 60.00 Hz) - Direct3D 12 (Forward+) - dedicated NVIDIA GeForce GTX 1080 (NVIDIA; 32.0.15.8278) - Intel(R) Core(TM) i7-9700 CPU @ 3.00GHz (8 threads) - 15.93 GiB memory - WASAPI (48000 Hz, Stereo/mono)
1080p sample video (Godot 2025 showreel)
4K sample video (Planet Earth spinning)
AI Disclosure
DXVA is very complicated, so I used AI (ChatGPT and Gemini) to guide me through the APIs, find bugs, explain how DXVA works, and write example code. However, I wrote every line of code by myself, and I also designed the structure of the code to be maintainable. I didn't use AI at all to write this pull request or the documentation.