Python HTTP Streaming in OpenCV via Cloud

In Progress

Comments

3 comments

  • Avatar
    Ichiro

    Hi Eli Katz,

    Likely you like refer to the article of the API document and implement the Cookie-based authentication

     

    Thanks.

     

    0
    Comment actions Permalink
  • Avatar
    Nikita

    Hello! Answering:

    Is there a downside to using the _ticket URL param instead of the Bearer token in the header?

    Tickets were introduced as a solution for scenarios where providing authentication in a header is not an option. If VideoCapture cannot be used with a custom header (which I believe is the case, though I could be mistaken), you can use tickets instead.

    Keep in mind that tickets can only be used once as a security measure. If you need to make another request (e.g., when a session expires or if the connection broke), you will need to generate a new ticket.
    Also, when using a cloud relay in a multi-server system, you may need to specify the exact server you’re making the request to by including the x-server-guid parameter. This is because a ticket is only valid for the server where it was created.

    Aside from the additional steps mentioned above, I’m not aware of any significant downsides to using tickets.

    Let me know if you have further questions or need additional clarification and we would also be happy to hear any feedback from you.

    0
    Comment actions Permalink
  • Avatar
    Eli Katz

    Thanks, Nikita.  So far adding in x-server-guid has not been needed.  Creating a ticket for each camera connection is working and has been stable.  We initially glossed over it as an option since we thought it was under the "Deprecated authentication methods (not recommended to use)" section of authentication protocols.

    We're specifying which server to get the ticket from by seeing where [cloud_system_id].relay.vmsproxy redirects to before each connection attempt to [cloud_system_id].relay.vmsproxy/rest/v3/devices/{camera_uid}/media

    And yes, we've also given up on trying to add a custom header using VideoCapture.  Hopefully OpenCV adds that one day.

     

    0
    Comment actions Permalink

Please sign in to leave a comment.