Update video->updatedAt when a livestream has finished encoding


So after using record:true to create a livestream and finishing up, the recorded video can be found in GET /videos?livestreamId=… , great

However the video is unplayable for quite a while as an api.video branded splash screen is shown saying “please wait for video to be encoded[sic]”. It can take a long time to re-encode, especially for long videos (eg 100mins)

We can’t show this splash screen so we currently have to run a rough estimate before showing the video player again - which isn’t ideal

Can I propose the video’s updatedAt property is updated when the video is re-encoded, or could a new property be added (such as readyToPlay or something) instead?

Also as a side note it would be incredible to have an estimate of how long re-encoding will take so we can say to our users ‘revisit in 5 minutes’ for example.

P.S. Thanks for the great & simple API

Hi @colin,
Thank you for the great feedback we’re glad you’re enjoying our API.

In general, transcoding from live to video on demand should be very quick, since the video has already been created. There are occasional periods of latency, which are becoming less and less frequent as we work on our infrastructure.

We do have a solution to your question:

To get a list of videos created from a livestream, you can use the /videos endpoint and appending the livestreamId parameter. Sorting this query by publishedAt, will put the most recent liveStream at index 0. Use this to grab the videoId of this “just finished” stream.

Now you can use the videos/{videoId}/status endpoint, and watch the encoding.playable parameter in the response to see when the video is ready to play.

Thanks again, and let us know how it goes!

That is great, exactly what we were after - thank you.