SpoutVideoPlayer not sending accurately?

I was planning on doing some “live” duets with some of my friends and i wanted to use webm for transparency to place my friends’ recorded videos into my stream.
I can’t sing with the videos being monitored through obs because there is monitoring delay.

So I downloaded spoutvideoplayer in hopes that it would send this webm video to obs spout input and show transparency.

Unfortunately, as you can see in the image, it is not sending correctly.
the video looks correct in the video player, but depending on what options in composite i choose, the result does not behave as intended.

In the picture, the one that has 3 copies of my model, the left one is the webm imported into obs, the middle one is the vtubestudio spout capture, and the right one is the spoutvideoplayer.

The color on the video is correct when i choose opaque, but obviously i’m left with the black background (no transparency)
when i choose the legacy premultiplied alpha no video is shown/it’s blank (this is the same with the default option)
and if i choose the regular premultiplied alpha, i get this very high contrast washed out semi-transparent result seen on the right.

i’d rly love a solution to being able to show transparent videos without green screen and without delay ):

I have not looked at SpoutVideoPlayer for a long time, so I can’t say immediately where the problem is. It plays videos using the Openframeworks “ofVideoPlayer” class and that should pass alpha through assuming the webm video file has alpha. The OBS plugin should also receive that alpha. I have no way of confirming any of this. Can you share an example webm video file that you know has alpha?

Ty for ur reply! I can send u that same video in the op
Sample webm

Since i use premiere as my video editor, i can’t say if it loads transparently in a video editor since it doesn’t support it, but for sure it does load into obs with transparency as a media source :saluting_face:

Not sure if it’s helpful, but here’s my output settings on obs in the case the settings for the output is maybe not something the video player likes/is compatible with

Did a test with an mov png sequence video that also has transparency and I get the same issue.
It looks like the information being sent from spoutvideoplayer to obs is with like, the black “lifted” out of the entire video and not necessary the alpha channel :thinking:

I believe the problem is with the Openframeworks “ofVideoPlayer” class that reads the movie file and plays the frames. My tests show that all pixels have alpha set to 255, completely opaque, including the black pixels. The original video transparency is lost.

The only way to restore transparency would be to key on black and set all black pixels transparent. This would require a new shader dedicated to that and I will look at what is involved.

Meanwhile I have uploaded binary files for the latest version which is still a work in progress. It’s likely to give the same result but it’s worth a try.

1 Like

Oh gosh that sounds complicated. Ty for posting the binaries! I’ll still give it a try just to check. I understand if it may not be worth the time though so I’m just happy to have received a reply.

I do hope there can be a video player solution that can feed transparency into obs for these types of occasions :face_holding_back_tears::face_holding_back_tears:

Tried out the new bin files and now there’s no transparency whatsoever. Every option is just the original video with the black background :woman_bowing:

Yes that confirms a fundamental problem with the Openframeworks video player for transparency. There might be a way around it but I have no idea how at the moment.

As it happens I have another project that was never published because it is a little too complex for an example.

It uses FFmpeg to read the video file, and I found that with a simple modification it can handle transparency. The complete project is now published.

Eventually I will include this in the example binaries for a release, but for now you can download the program from here.

You will have to download FFmpeg separately and how to do that is described in the DATA/FFMPEG folder “readme.md”.

There are no controls but it will play the video and produce a sender named “Spout video sender” with transparency preserved.

1 Like

Dang, this works perfectly! The video is being sent as intended to obs.
Unfortunately, there is no sound. ): I understand spout doesn’t send audio through but I was hoping the video player itself would at least play the sound.
I’m unsure why there’s no sound and I couldn’t really find anything helpful that told me how to get sound to play. :thinking:

That’s a good result. At least the transparency is being passed through.

The project is designed as a demonstration Spout sender and there is no audio. Adding it would take quite a bit of time and I there could be sync problems due to the way it works. I will look at it but can’t promise anything.

I am also looking at other Openframeworks addons for video but have not found one suitable yet.