Check RTSP Service at URL

I am trying to verify that a video service is being provided from a url in python. I ask that anyone know about any good libraries to use or how to do this. I did not find much information for this on the Internet.

thanks

+4
source share
4 answers

Delving into StackOverflow, I came across a previous question with the request of the RTSP library in Python or C / C ++ .

Associated is the RTSP library provided by Twisted , and the other is called Live555 . Have you tried this?

I just rewrite the links for convenience.

+4
source

If you do not want to use the library, as suggested by Sinak, you can open the socket connection to this URL and send an RTSP DESCRIEBE request. This is actually quite simple, as RTSP is HTTP text-like. You will need to analyze the answer for a meaningful result, for example, look for the presence of media streams.

+3
source

If you try to check the URL as a valid RTSP URL, I think this is only a protocol token that changes from http:// to rtsp:// or rtspu:// , and implicitly, the default port is no longer 80, but 554.

For more information on the URL format, see RTSP RFC , Section 3.2 ("RTSP URLs").

However, if you want to know if a RTSP server is "behind" a given RTSP URL, you should actually open a connection to this server, usually using TCP sockets. You can make a β€œconversation” simply using code, but I suggest you use some kind of product / library that provides an RTSP stack for Python; I don't know if such a product really exists for Python, but for C / C ++ there are a few things.

+1
source

I do not believe Live555 provides a python library. However, they do provide source code that can be compiled to create openRTSP. This is a simple command line utility that will do all the RTSP handshakes to connect to the server and start streaming to the client. It can also provide statistical measurements (such as jitter, packet loss, etc.) that can be used to measure the quality of a streaming connection.

0
source

Source: https://habr.com/ru/post/1300413/


All Articles