# Live Streaming - where to initialize

**URL:** <https://devforum.zoom.us/t/live-streaming-where-to-initialize/57202>\
**Category:** iOS\
**Created:** [September 9, 2021, 10:40pm UTC](https://devforum.zoom.us/t/live-streaming-where-to-initialize/57202 "2021-09-09T22:40:37Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![CodyDigital](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/codydigital/32/17393_2.png) [@CodyDigital](https://devforum.zoom.us/u/CodyDigital)\
**Post date:** [September 9, 2021, 10:40pm UTC](https://devforum.zoom.us/t/live-streaming-where-to-initialize/57202/1 "2021-09-09T22:40:37Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [September 13, 2021, 5:16pm UTC](https://devforum.zoom.us/t/live-streaming-where-to-initialize/57202/2 "2021-09-13T17:16:50Z")

</div>

Hey @CodyDigital,

Thanks for using the dev forum!

> [@CodyDigital](#):
>
> 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.

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

---

<div class="post-metadata">

**Author:** ![CodyDigital](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/codydigital/32/17393_2.png) [@CodyDigital](https://devforum.zoom.us/u/CodyDigital)\
**Post date:** [September 13, 2021, 8:23pm UTC](https://devforum.zoom.us/t/live-streaming-where-to-initialize/57202/3 "2021-09-13T20:23:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [September 14, 2021, 9:59pm UTC](https://devforum.zoom.us/t/live-streaming-where-to-initialize/57202/4 "2021-09-14T21:59:56Z")

</div>

Hey @CodyDigital,

What version of the SDK are you using?

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![CodyDigital](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/codydigital/32/17393_2.png) [@CodyDigital](https://devforum.zoom.us/u/CodyDigital)\
**Post date:** [September 20, 2021, 10:08pm UTC](https://devforum.zoom.us/t/live-streaming-where-to-initialize/57202/5 "2021-09-20T22:08:33Z")

</div>

We’re using the latest video ios sample app.

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [September 21, 2021, 10:30pm UTC](https://devforum.zoom.us/t/live-streaming-where-to-initialize/57202/6 "2021-09-21T22:30:23Z")

</div>

Hey @CodyDigital,

What error is returned from startLiveStreamWithStreamingURL?

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![CodyDigital](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/codydigital/32/17393_2.png) [@CodyDigital](https://devforum.zoom.us/u/CodyDigital)\
**Post date:** [September 28, 2021, 3:51pm UTC](https://devforum.zoom.us/t/live-streaming-where-to-initialize/57202/8 "2021-09-28T15:51:12Z")

</div>

On android we get 0 for canStartLiveStream and in iOS we get 2004.

For the onLiveStreamStatusChanged we get these two logged:  
D/onLiveStreamStatusChanged: ZoomInstantSDKLiveStreamStatus\_Connecting  
D/onLiveStreamStatusChanged: ZoomInstantSDKLiveStreamStatus\_Ended

They happen together.

---

<div class="post-metadata">

**Author:** ![CodyDigital](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/codydigital/32/17393_2.png) [@CodyDigital](https://devforum.zoom.us/u/CodyDigital)\
**Post date:** [September 28, 2021, 6:57pm UTC](https://devforum.zoom.us/t/live-streaming-where-to-initialize/57202/9 "2021-09-28T18:57:30Z")

</div>

> [@CodyDigital](#):
>
> Im getting Live stream successfully began. response Errors\_Success

Im getting Live stream successfully began. response Errors\_Success

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [September 28, 2021, 8:21pm UTC](https://devforum.zoom.us/t/live-streaming-where-to-initialize/57202/10 "2021-09-28T20:21:06Z")

</div>

Hey @CodyDigital,

Can you reproduce the issue one more time and then send me over the SDK logs from that instance? Instructions for obtaining logs can be found here: [https://marketplace.zoom.us/docs/sdk/native-sdks/iOS/mastering-zoom-sdk/sdk-initialization](https://marketplace.zoom.us/docs/sdk/native-sdks/iOS/mastering-zoom-sdk/sdk-initialization). Note, these instructions are technically for the Meeting SDK, but the steps are the same. Please send them via email to [developersupport@zoom.us](mailto:developersupport@zoom.us) and mention my name and a link to this post.

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![CodyDigital](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/codydigital/32/17393_2.png) [@CodyDigital](https://devforum.zoom.us/u/CodyDigital)\
**Post date:** [October 14, 2021, 7:17pm UTC](https://devforum.zoom.us/t/live-streaming-where-to-initialize/57202/11 "2021-10-14T19:17:04Z")

</div>

Michael, we are having some issues where the app is only sometimes broadcasting. Sometime we have to start and stop the zoom a few times. I sent the logs to developersupport. Can you take a look at those? (ticket #12482252)

Thanks.

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [October 15, 2021, 12:36am UTC](https://devforum.zoom.us/t/live-streaming-where-to-initialize/57202/12 "2021-10-15T00:36:58Z")

</div>

Hey @CodyDigital,

Yep, I will follow up with you there.

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![CodyDigital](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/codydigital/32/17393_2.png) [@CodyDigital](https://devforum.zoom.us/u/CodyDigital)\
**Post date:** [October 18, 2021, 4:17pm UTC](https://devforum.zoom.us/t/live-streaming-where-to-initialize/57202/13 "2021-10-18T16:17:09Z")

</div>

Hello @Michael_Condon , I know you’re extremely busy but did you get a chance to look at the logs we sent?

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [October 19, 2021, 5:13pm UTC](https://devforum.zoom.us/t/live-streaming-where-to-initialize/57202/14 "2021-10-19T17:13:24Z")

</div>

Hey @CodyDigital,

I have received them and engineering is still investigating. No updates quite yet.

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![CodyDigital](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/codydigital/32/17393_2.png) [@CodyDigital](https://devforum.zoom.us/u/CodyDigital)\
**Post date:** [November 3, 2021, 6:55pm UTC](https://devforum.zoom.us/t/live-streaming-where-to-initialize/57202/15 "2021-11-03T18:55:51Z")

</div>

Hello @Michael_Condon were you able to see the logs?

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [November 4, 2021, 10:38pm UTC](https://devforum.zoom.us/t/live-streaming-where-to-initialize/57202/16 "2021-11-04T22:38:56Z")

</div>

Hey @CodyDigital,

Yep, the logs are still being investigated by the engineering team.

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [December 5, 2021, 8:39am UTC](https://devforum.zoom.us/t/live-streaming-where-to-initialize/57202/17 "2021-12-05T08:39:29Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
