Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Verify RTSP service via URL

I am trying to verify that a video service is provided from an URL in python. I am asking does anyone know of any good libraries to use or a way to do this. I have not found much info for this on the web.

Thanks

like image 318
chrisg Avatar asked Feb 27 '23 15:02

chrisg


2 Answers

Digging around on StackOverflow I came across a previous question asking for an RTSP library in Python or C/C++ .

Linked there is an RTSP library provided by Twisted, and another one called Live555. Have you tried either of these?

I am just reposting the links for convenience.

like image 113
jathanism Avatar answered Mar 13 '23 01:03

jathanism


If you do not want to use a library, as suggested by synack, you can open a socket connection to the given URL and send an RTSP DESCRIEBE request. That is actually quite simple since RTSP is text-based HTTP-like. You would need to parse the response for a meaningful result, e.g look for the presence of media streams.

like image 41
Bernd Avatar answered Mar 13 '23 01:03

Bernd