Skip to content

Feat: Video Playback Support via Media Sources (Experimental Test Build)#18

Open
Harshcombo50548 wants to merge 1 commit intoscaledteam:mainfrom
Harshcombo50548:main
Open

Feat: Video Playback Support via Media Sources (Experimental Test Build)#18
Harshcombo50548 wants to merge 1 commit intoscaledteam:mainfrom
Harshcombo50548:main

Conversation

@Harshcombo50548
Copy link

This pull request introduces support for video files as reaction sources.
This is a significant change to the plugin's core and should be considered a temporary, unstable test build.

Here is a summary of my Changes:
The original plugin was limited to static images and GIFs using OBS's graphics library (gs_image_file3) this implementation has been completely replaced to use OBS's internal media source framework (ffmpeg_source).
This allows the plugin to function like a "Media Source" capable of playing video files like .mov, .mp4, and any other format supported by the user's OBS installation.

Technical Details:
Video Playback: Users can now select video files in the source properties
Complete Core Refactor ; Removed all logic related to gs_image_file3_t for loading textures the plugin now creates and manages two internal ffmpeg_source instances, one for each reaction state the rendering logic was updated from drawing sprites (gs_draw_sprite) to rendering the active media source (obs_source_video_render) the animation reset logic was updated to use obs_source_update which correctly triggers a restart of the media file from the beginning.

Testing & Stability:
Tested on Windows these changes have been compiled and tested on a Windows machine where the functionality works as expected videos load, play, and restart correctly based on the audio source.
I worked a couple of hours and did not want to create a new linux VM thus its not Tested on Linux/macOS there may be platform-specific issues that need to be addressed

Potential for Instability:
There is a possibility of undiscovered bugs (Checkboxes for resetting image after reaction does not work I think) or performance issues this build is intended for testing and feedback (Even though I Might not change things) this new functionality provides a much more flexible and powerful tool for creators but it requires further testing across all platforms before it can be considered stable. Thank you for your consideration and now I can use my gif without limiting frames =D

obs64_sxYZ6IQFhh.mp4

@scaledteam
Copy link
Owner

Very interesting, but i'm not sure, should it be an option to use ffmpeg instead of OBS graphics library, or should it be a separate plugin. Anyway, thank you for contributing, i need some time to make a decision. Maybe i'll ask about this on forum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants