API to retrieve thumbnail once per second (low bandwidth)

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

Keith Knauber

  • Posts: 14
  • Joined: Wed Apr 22, 2015 3:41 pm

API to retrieve thumbnail once per second (low bandwidth)

PostTue Dec 04, 2018 9:06 pm

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)
Offline

Ian Morrish

  • Posts: 580
  • Joined: Sun Jan 18, 2015 9:24 pm
  • Location: New Zealand

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

PostThu Dec 06, 2018 7:15 am

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.
Regards,
Ian Morrish
Video Integrated Scripting Environment
(Windows PowerShell with ATEM driver + more)
https://ianmorrish.wordpress.com
Offline

Cameron Nichols

Blackmagic Design

  • Posts: 442
  • Joined: Mon Sep 04, 2017 4:05 am

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

PostFri Dec 07, 2018 5:39 am

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

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 18 guests