Page 1 of 1

API to retrieve thumbnail once per second (low bandwidth)

PostPosted: Tue Dec 04, 2018 9:06 pm
by Keith Knauber
Would like a way to receive a thumbnail image once per second, so that we can ship it off to a remote computer (via a slow ethernet socket for example, for example), allowing our users to monitor multiple camera inputs, without the overhead of constantly processing 4 or more camera inputs at full frame rate.

(how's that for a run-on-sentence?)

(our clients DeckLink Quad & Ultrastudio)

Re: API to retrieve thumbnail once per second (low bandwidth

PostPosted: Thu Dec 06, 2018 7:15 am
by Ian Morrish
I had done something similar with FFMPEG to capture still image from SDI feed and upload it to the media pool.
https://gist.github.com/imorrish/07d6b27398addedeff2699f42da5efcf
You could use the same approach to detect files created on the network share and send them somewhere else. Might be able to keep up with 1 image per second. You could also change the capture to continuous with parameter something like -vf fps=1/50 -update 1 img.jpg which will be faster than starting a new copy of ffmpeg for each capture.

Re: API to retrieve thumbnail once per second (low bandwidth

PostPosted: Fri Dec 07, 2018 5:39 am
by Cameron Nichols
Hi Keith,

One possible solution would be to use the IDeckLinkScreenPreviewCallback::DrawFrame callback to implement this feature. Because the DrawFrame callback is designed for on-screen preview rendering, then unlike the IDeckLinkInputCallback::VideoInputFrameArrived, you can sleep the DrawFrame callback before return without the build up of received frames.

If you are using C#/.NET Framework, then please have a look at the StillsCSharp SDK sample, where captured stills are added to a list of scaled 160x90 thumbnails for an on-screen gallery view.

Regards
Cameron

Reference (DeckLink SDK Manual)
[1] 2.5.25.1 IDeckLinkScreenPreviewCallback::DrawFrame method