Spout out snapshot / screenshot

I need just a snapshot (jpg), from a spout out of mad mapper application, is that possible?
Actually, I need something similar to syphon recorder but for windows, I found lightjams spout recorder, but that app can’t capture screenshots/snapshots but only videos (mp4). I can capture a frame from the saved videos, but I need so many static jpg, and it is big loose of time…any idea?

Thank you

Hi @christos

Sorry for the delay in reply to your message.

You are right that you need an application that will create snapshots. The only one I can think of is VLC media player.

You can use SpoutCam - “Media > Capture Device”, then “Video > Take Snapshot”.

In SpoutCamSettings you might need to check “Swap” on to get correct colours.

Thank you very much, a little one problem that I can;t understand
Somewhere in the way, I am loosing the resolution/dimensions
Actually I publish a 1024X1024 frame, but finally in vlc I receive something like 4x3
Any Idea?
Thank you so much…and I am sorry for my limited Knowledge

Yes I see that. I assume it’s an Aspect Ratio setting. But I can’t work out what it should be. If I change to “Video > Aspect Ratio > 1:1”, VLC window changes to square OK, but the snapshot is still 1920x1440, compressed in height. If I change to 4:3 I get 1440x1400 but it seems to have cropped the image horizontally. Maybe there’s a setting I have missed. I can say that the webcam image received by other applications is indeed square as expected. I am not sure what to suggest.

I found that the aspect ratio problem is due to the settings for the capture device when it is opened. This can be solved , but then the snapshot is upside down.

This is really not a good solution and it’s quicker for me to modify an existing Openframeworks application which can be found here.

Press F12 and you will get an image in bin>data. The readme explains a little more.

Hi,
I wonder if you would consider to add the snapshot function in a compiled version as well?
Does this save 16-bit images?

I am using spout for kind of a ridiculous workaround for a software that occasionally works: RECentral which I use to save 16-bit images from a microscope.
Since the microscope only shows up now and then I have started to use a workaround with OBS studio spoutsender to max spoutreceiver and then save the image in max, which works great (I love spout!)
So far I have only been able to save 8 bit images, so I don´t know if this is a limitation of spout/windows/OBS studio/max.
A dedicated snapshot spout receiver would make my workflow smoother and a bonus would be if could save to 16-bits :slight_smile:
HC

Hi HC,

that sounds interesting since I worked with microscope images quite some time back.

By default, Spout uses 8-bit shared DirectX textures of format DXGI_FORMAT_B8G8R8A8_UNORM. However, the interop between OpenGL and DirectX allows for other formats including 32 and 16 bit floating point, and an application can set the DirectX texture format. But plugins like OBS and Max/Msp don’t allow for that.

Does REcentral send via Spout to OBS? If so, you should be able to inspect the texture format with the Spout demo receiver. RH click and then click on the texture details button. If it’s sending 16 bit textures we might be able to do something with a receiver. I hesitate to include that function in the library.

With more time tomorrow I will look further into it.

The project can be modified to receive and save 16 bit images with attention to the received texture format and saved image type. That is if a 16 bit texture is received from the sender in the first place. You can test that from the output of OBS and Max with the demo receiver. If the sender texture shows up as 16 bits, it will work. Could you let me know what you find.

Edit -
What image type are you saving (tiff, png etc.).

Hi,
How can I see if it is 16-bits in the receiver-demo?
RH click and then click on the texture details button. If it’s sending 16 bit textures we might be able to do something with a receiver.
[/quote]

I don´t get this to work.
But I guess anyway that since the OBS and max plugin doesn´t support 16-bit I am out of luck anyway.
I use tiffs mainly.
I might have to use max anyway, because I need to save the images with a certain filename structure.
HC
btw, it seems the message notification didn´t work?

Hi, cool that you also have worked with microscope images!
I have worked with microscopes on and off the last 15 years, but now I have a very ambitious project with a motorized stage, focus stacking and stitching :slight_smile:

RECentral does not send anything out at the moment unfortunately, that´s why I am using OBS Studio. When RECentral works, it captures 16 bit images.
16 bit is useful for the stacking and stitching process.

It seems that your message did not get through. I will try to send an email via the contact on your web page. My work involved video microscopy image analysis back in the dark ages, including motorized stages. Maybe something could be useful.

Anyway, to see the sender format, RH click in the Spout demo receiver will bring up a sender selection dialog. At the bottom you will see the texture details depending on the source, usually “8bit BGRA” but 16 bit will show up as “16bit RGBA” or “16 bit float RGBA” or similar. That display is actually a large button. Click on it will show the sender details and a number which will identify the exact DirectX format. I had to create a 16 bit sender for testing. Easy to do. Details later if you want them.

I can save as any type that Openframeworks supports. The snapshot name has a timestamp such as “Spout Sender_2022-07-18-16-45-46-161.jpg”. “File > Save image” allows you to put in any name and file type extension.

It doesn’t seem possible to receive 16 bit images if OBS or Max don’t support it and REcentral does not produce Spout output. But I can allow for it anyway.

The project repository is updated for Version 1.009 with 16 bit support for snapshots, including compiled executables. Note that these are 64 bit and the runtime dlls are changed. Respond here if you find any problems.

1 Like