Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Video broadcast using NDI SDK 4.5 in iOS 13 not working. Receiver in LAN does not receive any video packets

Tags:

ios13

xcode11

I have been trying to use NDI SDK 4.5, in a Objective-C iOS-13 app, to broadcast camera capture from iPhone device.

My sample code is in public Github repo: https://github.com/bharatbiswal/CameraExampleObjectiveC

Following is how I send CMSampleBufferRef sampleBuffer:

CVPixelBufferRef pixelBuffer = CMSampleBufferGetImageBuffer(sampleBuffer);

NDIlib_video_frame_v2_t video_frame;
video_frame.xres = VIDEO_CAPTURE_WIDTH;
video_frame.yres = VIDEO_CAPTURE_HEIGHT;
video_frame.FourCC = NDIlib_FourCC_type_UYVY; // kCVPixelFormatType_420YpCbCr8BiPlanarFullRange
video_frame.line_stride_in_bytes = VIDEO_CAPTURE_WIDTH * VIDEO_CAPTURE_PIXEL_SIZE;
video_frame.p_data = CVPixelBufferGetBaseAddress(pixelBuffer);
NDIlib_send_send_video_v2(self.my_ndi_send, &video_frame);

I have been using "NewTek NDI Video Monitor" to receive the video from network. However, even though it shows as source, the video does not play.

Has anyone used NDI SDK in iOS to build broadcast sender or receiver functionalities? Please help.

like image 442
Bharat Biswal Avatar asked May 08 '20 14:05

Bharat Biswal


People also ask

How do I watch NDI stream?

To view an NDI stream, you need the NDI Studio Monitor (Windows) or NDI Video Monitor (macOS) application installed on your machine. The monitor searches your network for NDI signals from Nuke or Nuke Studio and allows you to select the stream you'd like to view.

What protocol does NDI use?

Use in Wi-Fi and wide area networks Some NDI adopters have run the protocol across fibre connections up to 15 km, although NDI's use of the TCP protocol makes it less suitable for long-distance, high-latency connections due to factors such as bandwidth-delay product and TCP packet loss recovery.

What is NDI SDK?

Developer Kit. The NDI SDK allows you to develop applications with native IP video and audio support for free and commercial NDI use - across almost all platforms (Windows, macOS, Linux, iOS, tvOS and ipadOS, with Intel and ARM architecture CPUs.)

Is NDI compressed?

NDI uses compression to enable transmission of a large number of video streams across existing infrastructure, specifically discrete cosine transform (DCT), which converts video signals into elementary frequency components.


1 Answers

You should use kCVPixelFormatType_32BGRA in video settings. And NDIlib_FourCC_type_BGRA as FourCC in NDIlib_video_frame_v2_t.

like image 147
John Smith Avatar answered Sep 23 '22 01:09

John Smith