-
-
Notifications
You must be signed in to change notification settings - Fork 22.9k
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
base: master
Are you sure you want to change the base?
Conversation
|
||
uint8_t *dst = frame->data.ptrw(); | ||
|
||
// WMF Video Processor outputs ARGB32, but Godot expects RGBA8 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
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"); | ||
} |
There was a problem hiding this comment.
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.
6926839
to
2256703
Compare
fa03b14
to
bb607cb
Compare
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>
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
Fixes: godotengine/godot-proposals#12864