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

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

kamarajpandi.r

  • Posts: 7
  • Joined: Thu Aug 30, 2018 9:27 am
  • Real Name: Kamaraj Pandi

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

PostSat Sep 01, 2018 10:11 am

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.
Offline
User avatar

Xtreemtec

  • Posts: 2682
  • Joined: Wed Jan 02, 2013 11:48 am
  • Location: The Netherlands

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

PostTue Sep 04, 2018 7:45 pm

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:
Daniel Wittenaar .:: Xtreemtec Media Productions ::. -= www.xtreemtec.nl =-
4K OBV, ATEM TVS HD, 1M/E 4K, 2M/E Broadcast Studio 4K, Hyperdeck Studio Mini, SONY FS7 4K, Ursa Broadcast 4K
Offline

kamarajpandi.r

  • Posts: 7
  • Joined: Thu Aug 30, 2018 9:27 am
  • Real Name: Kamaraj Pandi

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

PostFri Sep 28, 2018 8:03 am

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.

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 2 guests