Skip to content

Add WMF video playing (without audio) #108976

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fire
Copy link
Member

@fire fire commented Jul 25, 2025

The idea is divide and conquer the problem of playing video into only playing video and only playing audio. Then extracting into a container demuxed into video and audio which is then synced.


Thanks to the DisplaySweet team https://github.com/DisplaySweet.

V-Sekai development community focuses on providing social VR functionality for the open source Godot Engine.

Implement WMF video resource loading and playback functionality

  • Audio does not work yet.
  • Video stuttering problems
  • Work around mingw bug > GCC 13 with CLSID_VideoProcessorMFT

Fixes: godotengine/godot-proposals#12864


uint8_t *dst = frame->data.ptrw();

// WMF Video Processor outputs ARGB32, but Godot expects RGBA8
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// WMF Video Processor outputs ARGB32, but Godot expects RGBA8

Look for a more elegant way to swap the pixels.

if (denominator > 0) {
info->fps = (float)numerator / (float)denominator;
} else {
info->fps = 30.0f; // Default fallback
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't know the FPS, maybe we should fail rather than play with the wrong fps.

Comment on lines +703 to +668
void ResourceFormatLoaderWMF::get_recognized_extensions(List<String> *p_extensions) const {
p_extensions->push_back("mp4");
p_extensions->push_back("avi");
p_extensions->push_back("wmv");
p_extensions->push_back("mov");
p_extensions->push_back("mkv");
p_extensions->push_back("webm");
p_extensions->push_back("flv");
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the full list of extensions is too extensive.

@fire fire force-pushed the vsk-wmf-4.5 branch 4 times, most recently from 6926839 to 2256703 Compare July 25, 2025 19:29
@Calinou Calinou added this to the 4.x milestone Jul 25, 2025
@fire fire force-pushed the vsk-wmf-4.5 branch 3 times, most recently from fa03b14 to bb607cb Compare July 26, 2025 02:47
Thanks to the DisplaySweet team https://github.com/DisplaySweet.

Implement WMF video resource loading and playback functionality

Audio does not work yet.

Co-Authored-by: Mark Kuo <starryalley@gmail.com>
@fire fire changed the title Add WMF video playing (audio control isn't implemented) Add WMF video playing (without audio) Jul 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for video playback with system-provided codecs and APIs
3 participants