Live Streaming - where to initialize

We’re setting up the Live streaming of the session to our server. It is a server setup with ngnix rtmp module. We are using Video SDK and using the ZoomInstantSample. If I use OBS or any other broadcast / live software and send it to our server the stream is visible however our zoom app is not sending the stream. Any suggestions based on below what might be wrong:

In the CanvasViewController.m we have the ZoomVideoSDKLiveStreamHelper. We initialize it based on a username (because we want that user’s stream recorded (it’s the host).

Here is the code:

NSString *username = [[NSUserDefaults standardUserDefaults]
stringForKey:@“Username”];

if([username  isEqual: @"hoststreamuser"])
{
    NSTimeInterval delayInSeconds = 3.0;
    dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC));
    dispatch_after(popTime, dispatch_get_main_queue(), ^(void)
    {
        // Get the ZoomVideoSDKLiveStreamHelper to perform livestream actions.
        ZoomInstantSDKLiveStreamHelper *liveStreamHelper = [[ZoomInstantSDK shareInstance] getLiveStreamHelper];

        // Check if live stream can start.
        if ([liveStreamHelper canStartLiveStream] == Errors_Success) {

            // Call startLiveStreamWithStreamingURL to begin live stream.
            ZoomInstantSDKERROR liveStreamStartReturnValue = [liveStreamHelper startLiveStreamWithStreamingURL:@"rtmp://ouripaddress/live" StreamingKey:@"ourstreamkey" BroadcastURL:@"rtmp://ouripaddress/live"];

            switch (liveStreamStartReturnValue)
            {
                case Errors_Success:
                    NSLog(@"Live stream successfully began.");
                    break;
                case Errors_Session_Live_Stream_Error:
                    NSLog(@"Live stream could not start.");
                    break;
                default:
                    break;
            }
        }
        
    });
}

Are we initializing it in the wrong place or are we not able to grab a specific user stream?

Hey @CodyDigital,

Thanks for using the dev forum!

What exactly do you mean by the the stream is visible? Does this mean you are seeing the stream start but the SDK isnt actually sending any frames to your server?

Thanks!
Michael

Thanks for your help. I mean our streaming server is working if I stream from another software (OBS) so I know it is not our streaming server with the issue.

Hey @CodyDigital,

What version of the SDK are you using?

Thanks!
Michael

We’re using the latest video ios sample app.

Hey @CodyDigital,

What error is returned from startLiveStreamWithStreamingURL?

Thanks!
Michael