How to transform recorded live stream video with Cloudinary

olanetsoft
olanetsoft Member Posts: 9
edited September 27 in Developer APIs

Hello, everyone. I am working on a demo that helps set up OBS with a Nextjs application. The demo will transform the stream using the video transformation functionality and other AI effects.

I know this is in "BETA," but I want to ask a few questions.

1. Anyone have experience working with this recently?

2. I noticed i can't transform streams directly even though it returns hls output with url. Or is this possible? Can I get a pointer? Or a reference to the docs somewhere? I couldn't find it.

3. The stream seems to be unstable. Sometimes, I hit the rate limit, which returns the correct error message saying the stream is limited to 5 for each customer, but when I attempt to delete it fails each time with the error message that the stream is active, which is not true (I already shut down OBS and deleted stream connection link). Afterward (Say about 30 minutes later), it allows me to delete it. Is there a delay mechanism I am not aware of? Or not added to the docs?

4. When I create a stream, manually activate it, and try to load it in my demo, it returns a resource not found error, which I can see I have the resource on my dashboard looking at my media library on Cloudinary. This is a blocking step for me because while I was testing all through, I used the same stream. Upon deleting it and then trying to create a new one, it kept returning a resource not found error. Is there an endpoint I need to send a request at an interval to know the status? or a webhook?

I would appreciate any help here. @Cloudinary Team

Answers

  • Wissam
    Wissam Member, Cloudinary Staff Posts: 103

    Hi @olanetsoft ,

    1. I can share that Cloudinary’s video transformation capabilities are robust and continuously improving. 

    2. Currently, Cloudinary does not support direct transformation of live streams. However, you can transform recorded videos after the live stream has ended. For more details, refer to the Video Transformations documentation

    3. Are you referring to the following message? "Rate Limit Exceeded. Limit of 500 API operations reached."
    Can you share more details on what you are trying to do and the complete response and the time?

    4. Resource Not Found error can occur if the stream has not been fully processed. It is recommended to use webhook notifications to know the status of the streaming file. You can learn more from the following article:

    https://cloudinary.com/documentation/adaptive_bitrate_streaming#:~:text=asynchronously.%20Notification%20(-,webhook,-)%20of%20completion%20is
    Cloudinary Webhooks and Notifications | Cloudinary

    I hope you find it useful.

    Please let me know if you have additional questions.

    Best Regards,

    Wissam

  • olanetsoft
    olanetsoft Member Posts: 9

    Hello @Wissam thank you for your feedback.

    Not this error: Rate Limit Exceeded. A limit of 500 API operations was reached. I got the stream is limited to 5 for each customer at some point.

    So, I think it's not even a webhook issue. I can't find any recorded/archive on my dashboard. Am I blocked or something? This is my cloud name: olanetsoft.

    Thank you

  • SreeCloudinary
    SreeCloudinary Member, Cloudinary Staff Posts: 44

    Hi @olanetsoft ,


    Can you please provide more context as to when you received the error: "The stream is limited to 5 for each customer". ?

    Thanks,
    Sree

  • Wissam
    Wissam Member, Cloudinary Staff Posts: 103

    Hi @olanetsoft ,

    Please note that Cloudinary enforces a limit of 5 live stream entities per customer. This limitation refers to the number of reusable live streams a customer can create, rather than the number of times they can stream. Each of these live streams serves as a placeholder with stable output URIs and stream keys, which can be activated and set to idle as needed. The limit helps prevent the unnecessary creation of multiple live stream entities, ensuring fair usage across all accounts.

    I hope it makes sense.

    Thanks,
    Wissam

  • olanetsoft
    olanetsoft Member Posts: 9
    edited October 6

    Got it @Wissam Thank you.

    There is this issue i mentioned earlier "I can't find any recorded/archive on my dashboard". Am I blocked or something? This is my cloud name: olanetsoft.

    I would appreciate any help.

  • Cloudinary_John_H
    Cloudinary_John_H Cloudinary Staff Posts: 50

    Hi @olanetsoft ,

    For the "recorded/archive", do you see this mentioned in our documentation?

    I haven't seen this so far, so I'm curious if you see some record of this. I'm not sure that we have a GUI version of this.

    Looking forward to your response.

    Thanks,
    John

  • olanetsoft
    olanetsoft Member Posts: 9
    edited October 7

    Oh yes. When a stream is created, it returns 2 outputs []:

    1. The stream link

    2. The archive public ID of a video that can be accessible on the Cloudinary dashboard.

    When I started playing around with it, I would usually find the archive in my Cloudinary dashboard via the media library, but all of a sudden, it doesn't appear there anymore. That's why I am curious to know if something has happened to my account.

    Check this API reference: https://cloudinary.com/documentation/video_live_streaming_reference

    Thank you.

  • Wissam
    Wissam Member, Cloudinary Staff Posts: 103

    Hi @olanetsoft ,

    I have checked your account and I have found that there were some DELETE requests for live stream, as described in the following document:
    https://cloudinary.com/documentation/video_live_streaming_reference#tag/live-stream/DELETE/live_streams/{liveStreamId}:

    This is the reason why some live streams don't exist anymore.
    If you have any further questions, feel free to reach out.

    Best Regards,

    Wissam

  • olanetsoft
    olanetsoft Member Posts: 9

    Hello @Wissam thats true; I deleted old streams. However, I created a new stream connected to obs to stream, but videos no longer appear on my dashboard.

  • Wissam
    Wissam Member, Cloudinary Staff Posts: 103

    Hi @olanetsoft ,

    Since your use case appears to be quite specific, could you please submit a support ticket directly and provide examples from your own Cloudinary account? You can submit the ticket by filling out the form at the following link:

    https://support.cloudinary.com/hc/en-us/requests/new

    Additionally, please include the request details, the response, and the relevant timestamp within the ticket.

    Best Regards,

    Wissam


  • kjarmicki
    kjarmicki Member Posts: 1

    Hi @olanetsoft,

    I'm a developer at Cloudinary and maybe I'll be able to help with some of the questions you have.

    To give you a bit of context, when a live stream is either activated or idled, we need to provision or destroy a couple of background resources. What that means to you is that once you start streaming or activate a stream manually, there's a warm up time that can take up one minute. During this minute the stream appears to be active and it will accept connections, but the contents won't be streamed or put into the archive. Similarly, when idling a stream there's a period when we're destroying background resources (it takes up to 30 seconds) and we won't allow an action such as deletion then.

    What that means for your case is that if the stream you were doing was shorter than about one minute, it won't get uploaded to your account because recording wasn't ready yet. If you activate but don't connect, similarly the stream recording will be discarded.
    For your cloud, I see there were a couple of occurrences where streaming didn't start while stream was active because connection was either lost before stream was ready, or it didn't happen at all. Was there a time when you streamed for a while and the archive wasn't uploaded? Do you have some reference point to that? Like live stream id, time at which it occurred?

    You've mentioned that once it seemed like you've been blocked from performing actions on a stream for 30 minutes. Again, do you have some reference point to that?

  • olanetsoft
    olanetsoft Member Posts: 9

    Oh, that makes sense. Thank you @kjarmicki for the clarification.

    Unfortunately, I deleted all the videos that were added as archives on my dashboard, as I wanted to test them cleanly. Since then, all streams created didn't appear, but from what you explained, i can tell the test streams i have been doing, is less than 1 min because i expect it to be saved as an archive on my dashboard but since you said if its less than, it won't be uploaded. I will retry and leave the stream connected and active for over a min or 5 minute and see if i can get the video uploaded automatically and respond here.

    Thank you for the feedback. I will pick this up again and let you know

  • Cloudinary Team
    Cloudinary Team Administrator, Cloudinary Staff Posts: 170 admin

    Hi there,

    Thanks for replying.

    Please let us know how you get on.

    Kind Regards,
    Thomas
    Developer Support Engineer
    Cloudinary

    --
    💡 Improve your site's performance by applying optimization features when delivering assets


    💬 Community Forums | 🧑‍💻 Discord Server
    🧑‍🎓 Academy Training | 📖 Documentation | 📰 Blog