Stream frames from Python OpenCV to Resolume?

FFGL, OSC, GLSL. If you like abbreviations, this is the forum for you
Post Reply
8bitoak
Met Resolume in a bar the other day
Posts: 3
Joined: Fri Aug 03, 2018 09:19

Stream frames from Python OpenCV to Resolume?

Post by 8bitoak » Fri Aug 03, 2018 09:28

Dear experts,

I will be happy to get your help,
I want to stream a video from Python code that is doing some OpenCV stuff (Tracking object movement) but I need the video to get into the Resolume as a source.
Is there anyone tried this before?
Maybe there's an other way such some video router to install on my Windows 10 so it, somehow, patch the video coming from my software to the resolume inputs?

Thanks in advance!
cheers

User avatar
drazkers
Wants to marry Resolume, and Resolume said "yes!"
Posts: 952
Joined: Wed May 18, 2011 10:54
Location: Brady V up in Canada

Re: Stream frames from Python OpenCV to Resolume?

Post by drazkers » Fri Aug 03, 2018 09:33

There is a spout library for python. Would that fit the bill?

8bitoak
Met Resolume in a bar the other day
Posts: 3
Joined: Fri Aug 03, 2018 09:19

Re: Stream frames from Python OpenCV to Resolume?

Post by 8bitoak » Sat Aug 04, 2018 00:31

Really??? Thats awesome!
Does this spout requires the 'NDI newTek' module?
Because my processor does not work with the NDI...(old instruction set..no ssse3)

Do you know some example of using the spout lib for python?

Thanks a lot

User avatar
drazkers
Wants to marry Resolume, and Resolume said "yes!"
Posts: 952
Joined: Wed May 18, 2011 10:54
Location: Brady V up in Canada

Re: Stream frames from Python OpenCV to Resolume?

Post by drazkers » Sat Aug 04, 2018 07:22

8bitoak wrote:
Sat Aug 04, 2018 00:31
Really??? Thats awesome!
Does this spout requires the 'NDI newTek' module?
Because my processor does not work with the NDI...(old instruction set..no ssse3)

Do you know some example of using the spout lib for python?

Thanks a lot
Spout is based on your GPU, there is no compression its just a framework to share textures between programs that have been rendered on the GPU. It significantly more efficient because you're taking a rendered texture and sharing it, not compressing it after rendering. Which ndi does because its created for network transmission.

You'll have to check to see if your gpu supports the DirectX/Opengl interop, but it was supported back in 2010 for nvidia.

There are examples on the github page.

8bitoak
Met Resolume in a bar the other day
Posts: 3
Joined: Fri Aug 03, 2018 09:19

Re: Stream frames from Python OpenCV to Resolume?

Post by 8bitoak » Sun Aug 05, 2018 12:02

drazkers wrote:
Sat Aug 04, 2018 07:22
Spout is based on your GPU, there is no compression its just a framework to share textures between programs that have been rendered on the GPU. It significantly more efficient because you're taking a rendered texture and sharing it, not compressing it after rendering. Which ndi does because its created for network transmission.

You'll have to check to see if your gpu supports the DirectX/Opengl interop, but it was supported back in 2010 for nvidia.

There are examples on the github page.
Thank you! Finally I managed to stream the video to Resolume.
Great solution.

TheUnderDog
Met Resolume in a bar the other day
Posts: 2
Joined: Mon Oct 07, 2019 02:43

Re: Stream frames from Python OpenCV to Resolume?

Post by TheUnderDog » Mon Oct 07, 2019 02:46

Hey I am trying to do something similar but opposite. I need to be able to choose between videos within a collection within resolume within a python code.

Can you please share your solution in hopes that I can re-engineer it to fit my problem?

Any help is much appreciated,
DB

User avatar
subpixel
Hasn't felt like this about software in a long time
Posts: 134
Joined: Thu Jun 05, 2014 09:32
Location: Melbourne, AU

Re: Stream frames from Python OpenCV to Resolume?

Post by subpixel » Thu Oct 10, 2019 01:34

Spout used to come with SpoutSender and SpoutReceiver plugins.

Resolume has since integrated Spout support, however to send you need to create a "Screen" in Advanced Output with the device set to Spout. This is not entirely as convenient as the SpoutSender FFGL plugin, but should work for you. You can create a Slice in your Advanced Output screen with the source being set to a particular Layer within your Composition, and (perhaps on the layer above that) use a Spout Source to bring the results back into the Composition.

Post Reply