Page 1 of 1

Not able to receive video in intensity shuttle using c# code

PostPosted: Sat Sep 01, 2018 10:11 am
by kamarajpandi.r
Dear All,

We are trying to develop a project to capture and store the endoscopy video using black magic intensity shuttle. So we have downloaded the intensity shuttle SDK and trying to convert the code as C# application from cpp. There has been everything was Okay. Then we had written Class by Implemeting IDeckLinkScreenPreviewCallback Interface to Initialize Preview Window. Here we wrote Method DrawFrame(IDeckLinkVideoFrame frame). GL Context creation was succeeded by using openGl32.dll methods. StartStreams() Method called. DrawFrame(IDeckLinkVideoFrame frame) method is Executed Simultaneously. but we could not view video frames in PreviewWindow but we can get Video Frames. after analyzing with our team members we found Unable to cast com object Error :cry: . How to resolve this error. Please help us, thanks in advance.

Re: Not able to receive video in intensity shuttle using c#

PostPosted: Tue Sep 04, 2018 7:45 pm
by Xtreemtec
Have you tested if you are able to capture the video of that Endoscope with the software that BMD supplies?? Do you get the video signal in Media Express?

The capture hardware of BMD ONLY captures broadcast SMPTE compatible resolutions and framerates.
For the Shuttle the resolutions are:

SD Video Standards
625i50 PAL, 525i59.94 NTSC, 625p50 PAL, 525p59.94 NTSC

HD Video Standards
720p50, 720p59.94, 720p60
1080p23.98, 1080p24, 1080p25, 1080p29.97, 1080p30
1080i50, 1080i59.94, 1080i60

HDMI Video Sampling
4:2:2 YUV.


Be very sure that the camera is sending out 1 of these resolutions and framerates. No 1080P, no RGB layout, No higher framerates or custom resolutions often seen in medical equipment.. ;)

Also the USB 3 version of the Shuttle can have a lot of issues with the computer hardware.. So really make sure you get video up and running in Blackmagic Design Media Express before looking further into your code why it does not pass video frames.. Because if you do not get video in Media Express.. You wont get video in your own code.!! :idea:

Re: Not able to receive video in intensity shuttle using c#

PostPosted: Fri Sep 28, 2018 8:03 am
by kamarajpandi.r
Hi
Thanks for your reply,

We are receiving the video in media express and also receiving the video in our c# application(after done so much of struggling we have received the video using declink API SDK).
Now we can able to preview the video in our application as like media express. But my project scope is save the video for future reference. So we have used the ffmpeg tool (ffmpeg-dshow) to record the video using below command
" -f dshow -pix_fmt uyvy422 -framerate 25 -rtbufsize 2096M -video_size 1920x1080 -i video="Decklink Video Capture" -vcodec libx264 -pix_fmt yuv420p -r 25 -s 1280x720 -y out.mp4 ",
but we got error while Executiong this command that Couldnot enable video stream -Decklink Video Capture.
After that try to receive raw video from streaming device using the following command
" -f rawvideo -pix_fmt uyvy422 -framerate 25 -rtbufsize 2096M -video_size 1920x1080 -i - -vcodec libx264 -pix_fmt yuv420p -r 25 -s 1280x720 -y out.mp4 "
but no success, file is create with 0KB.

Please advice me how to record video using declink api or some other possiblity. Hope my question is understandable.