Page 1 of 1

【DeckLink Mini Recorder】Image capture (TIFF) by using SDK

PostPosted: Mon Feb 10, 2020 3:53 am
by soichiro
【DeckLink Mini Recorder】Image capture (TIFF) by using SDK

I want to save a video signal frames(HD-SDI 1080/60i) as image data (TIFF) in HDD using a decklink mini recorder and PC. I also want to develop this program as server program, develop by simple program. I checked blackmagic SDK, but it is difficult to understand details. (ex. Which funtion i have to use)

I read code SDK (Blackmagic Video Capture and Playback), "DeckLinkCapture/DeckLinkInputDevice.cs" and I focused in the code
"[public class DeckLinkInputDevice : IDeckLinkInputCallback]" , function name "void IDeckLinkInputCallback.VideoInputFrameArrived(IDeckLinkVideoInputFrame videoFrame, IDeckLinkAudioInputPacket audioPacket)".

The effect of this function is issued when a frame arrives and displays the timecode of that frame.We thought that the frame data could be saved in the local environment using the variables "videoFrame" in this function.

I would like to hear the opinions of other people.

Re: 【DeckLink Mini Recorder】Image capture (TIFF) by using SD

PostPosted: Thu Feb 13, 2020 4:51 am
by Brendan Dower
Hi Soichiro,

We have a sample application called "CaptureStills" which may be useful for what you are trying to do. In this sample application, incoming video frames are stored as .png images.
These files are encoded and saved to disck in the ImageWriter::WriteBgra32VideoFrameToPNG() method, located in ImageWriterWin.cpp

The CreateEncoder function is responsible for converting this image file. To save the image file as a .tiff file instead of a .png file, change the following code:
Code: Select all
CreateEncoder(GUID_ContainerFormatPng, NULL, &bitmapEncoder)
to
Code: Select all
CreateEncoder(GUID_ContainerFormatTiff, NULL, &bitmapEncoder)


Here is Microsoft's documentation of this container format for reference.
https://docs.microsoft.com/en-us/window ... ateencoder

Let me know how you go.