Spout Recorder Record - Format & Alpha layer

123 views
Skip to first unread message

Sempereadem Sempereadem

unread,
Nov 7, 2019, 4:41:13 PM11/7/19
to Lightjams
Hello,

I am trying to use Spout Recorder Record.

On this web page : https://www.lightjams.com/spout-recorder.html one can see that it's possible to change the output format.

When I open the software, I don't have the format selection.

I can only select FPS & Quality.

Does anybody know why?

I'm trying to record the alpha layer so I need to select .mov

Thanks in advance

Mathieu

unread,
Nov 7, 2019, 6:14:32 PM11/7/19
to Lightjams
Hi,

Alpha layer isn't supported. Fully transparent pixels are black and translucent pixels are multiplied by the alpha to give the recorded color.

You select the format after the recording, when saving.

Sempereadem Sempereadem

unread,
Nov 8, 2019, 2:11:32 AM11/8/19
to Lightjams
Is the code open sourced? I would like to adapt it so the alpha layer is conserved when saving to .mov file.

Mathieu

unread,
Nov 8, 2019, 8:15:02 AM11/8/19
to Lightjams
Unfortunately, it's not open source.

Sempereadem Sempereadem

unread,
Nov 8, 2019, 8:23:15 AM11/8/19
to Lightjams
Would you share a few pointers of how one can consume the spout texture?

Do you use opengl or are you 100% doing directx calls to forward the textures to ffmpeg?

Do you perform any synchronisation like double buffering in order to be sure to read the full image?

Thanks for your help!

Mathieu

unread,
Nov 8, 2019, 2:55:52 PM11/8/19
to Lightjams
You may want to start by looking at the Spout source code: https://github.com/leadedge/Spout2

Sempereadem Sempereadem

unread,
Nov 10, 2019, 8:11:28 AM11/10/19
to Lightjams
Thanks for the help.

I have been reading the source code of Spout.

I think there are different ways I can proceed.

Would you give a few details of how you implemented it so that I don’t have to go through all the bumps?

Could you tell if you used openframework or any framework to develop the recorder?
Would you also tell how you ended-up storing the frames on disk? Or do you actually keep them in memory?

Thanks in advance

Mathieu

unread,
Nov 10, 2019, 8:20:31 AM11/10/19
to Lightjams
I may open source it at some point. Until then, all I can say to help you is that I use ffmpeg to do the video encoding.

Sempereadem Sempereadem

unread,
Nov 10, 2019, 8:25:17 AM11/10/19
to Lightjams
Converting raw images to an actual movie using ffmpeg is something of a defacto standard. And it happens after the "live" recording process.

The interesting bits are what happens while recording, ie. what you do with the texture that Spout gives you.

Is there absolutely no way you would share how you managed it?

Sempereadem Sempereadem

unread,
Nov 10, 2019, 8:26:19 AM11/10/19
to Lightjams
I’m not asking for actual code.

Sempereadem Sempereadem

unread,
Nov 11, 2019, 4:09:30 PM11/11/19
to Lightjams
I've been trying to use `glGetTexImage()` to retrieve the texture from the GPU to the main memory.

It takes 50ms per frame, so it's too slow for 60rps.

Would you please tell me how you transfer Spout textures to main memory? Do you know of a better approach than `glGetTexImage()` ?

Thanks in advance
Reply all
Reply to author
Forward
0 new messages