Some parts of the videos are lost after the livestream is ended with some interrupts

Hello,

As of now, we’re facing the problem as the steps below (we’re using the mobile application)

  1. Start the Livestream normally ( name it 1st part)
  2. Open the other apps
  3. Come back to the Livestream app and start for some seconds then end the Livestream (name it 2nd part)
  4. Note that the Video after the Livestream ended is missing the 2nd part

Is it a normal behavior with api.video since the 2nd part is not long enough to be saved on api.video ?

Hi Tim,

Thanks for the question. If your livestream is set to record, all recordings are re-encoded as video on demand for later playback (no matter the length)

What you are seeing: When you exit a mobile application that is livestreaming, the livestream broadcast to api.video ends. You’ll want to wait 30-60s before restarting the livestream (to give the backend a chance process video in the buffer and to reset.).

When you come back to stream again - you have started a “new” live stream (using the same livestreamId), and the recording will be saved into a new video file.

As an example, you have a livestream ending in “60d9b1e158ff93d199fd4cbc” I can see in your sandbox account two recordings from that livestream that occurred within the same minute:

video 1 is 17 seconds long, and video 2 is 2 seconds long.

Doug

Hi Doug

Thank you for your email

The main problem is on IOS we don’t have this problem…

Here is the workflow

1/I’m in livestream

2/I share the livestream with external app (on my exemple whats app)

3/It exists the livestream (i think)

4/I go back to the livestream

5/Record myselft for part 2

6/Then i close it.

I don’t have the replay after 5/

Thanks for your help

Tim

~WRD1702.jpg

image002.png

image003.png

image004.png

image005.png

image006.png

image007.png

image008.png

Tim,

Is the issue Android only then? I’d guess whatever livestream plugin you’re using on that platform is ending the stream when you exit the app. I’d see if it can run in the background.

Doug

BTW please keep this behavior because it has been so much better than other solutions when it comes to making starting and stopping streams easy and the auto segmenting of the feeds apart from each other.

1 Like

Hi Doug,

Thanks for your answers, I have a question related to this point

What you are seeing: When you exit a mobile application that is livestreaming, the livestream broadcast to api.video ends. You’ll want to wait 30-60s before restarting the livestream (to give the backend a chance process video in the buffer and to reset.).

So what if we leave the Livestream in 5-10s then come back and restarting the Livestream ?, in this case, your backend is still not updated the broadcast status right? and we may lose the video ?

Tim,

We’ve discussed this with your dev team in the past. But yes, we recommend that if you stop a livestream - wait 30-60s before restarting it. If you restart the stream within 10 seconds, our servers are still transcoding video from “session 1” and cannot begin working with “session 2.” The result is that live stream “session 2” will never start.

We are working to improve this by connecting Livestream sessions that stop/reconnect in under a minute into one livestream, and will begin work on this feature later this year.

Doug

1 Like

Hi Doug how are you today?

Ok well received.
Can you tell me why don’t we have the trouble on ios but only Android?

Thanks a lot
Tim

Télécharger Outlook pour Android

Hi Doug,

I hope you’re well

How can we know the “session 1” has finished already to start “session 2” ? Do you have any API support for this?

When you say we need to wait for the 30s-60s to resuming a Livestream, so if we choose to resume the Livestream after 30s then the new session may also be lost right? so at the end, we still need a way to know when will we can start for the next session.

Dai

Hi Tim,

Livestream webhooks will help you determine when the video starts and stops:

If stream 1 has successfully stopped - it will be saved- and you start stream 2 (it will not be lost). The only reason you “lost:” stream 2 was because stream 1 was still broadcasting. Technically - stream 2 never started on the backend (only one stream can run per livestreamId), so it could never have been recorded.

Did you ever find a way to keep the livestream going in the background on android?

Hi Doug,

Thanks for your quick reply, we’ll try with these webhooks and contact you later if we need further help.

For your question, as you have already known we tried to use the floating window to make the livestream alive all the time, but unforturnately there’s a sort transform from the foreground to floating windows, it’s just some seconds but enough to make the camera stop for some seconds also and make the streaming is stopped also :frowning: , so it can’t fix the problem.

Dai