RTSP or RTSP over HTTP lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- vexal · 2011-04-05 11:46 Hi all ! I have to get a video stream from an IP camera. I can get it by RTSP or RTSP-over-HTTP. Is there a library available for RTSP ? Or do you have a link to a documentation or a tutorial on how to implement RTSP or RTSP over HTTP ? I'm looking over the internet for days  and i can't find something that helps me. I tried to do RTSP over HTTP. I know how to send http request with lnet but i do not know how to encapsulate RTSP in these requests. ---------------------------------------------------------------------- ik · 2011-04-05 14:17 RTSP is a binary protocol that passes mostly audio and video over the net afaik. I never saw an HTTP based RTSP, but it would be cool to see it work. I know about this protocol due to my usage of VoIP, and mostly with RTP over UDP and not with a higher level of protocol such as HTTP. If you will write pure Pascal support for RTSP I hope you'll release it as LGPL or something like that, because I do not know of any Pascal implementation for it at all. ---------------------------------------------------------------------- Almindor · 2011-04-05 14:53 Streaming over HTTP is very impractical. Standard HTTP data is sent via messages/requests one at a time, chopped up with a lot of potential lag. Streaming is exactly the opposite of that. You could try to use POST but then your "clients" would have to be the HTTP servers Getting a stream as HTTP request result is IMHO suicidal If you still wish to go the route, make sure to send big chunks in one go so you minimize the HTTP overhead. Send a few MB worth of HTTP data each time, best in same-sized chunks. You could try this with the HTTP server in lNet and some small video and see what you get. ---------------------------------------------------------------------- vexal · 2011-04-05 15:11 Thank you both for your answers. I now have a good reason to die... lol In fact, i'm building a software that can (amongs other things) record h264 video from Axis IP cameras and relay these video to multiple clients. I'm not an expert so i can't build my own RTSP lib. I wanted to do it all in my software but i think i have to plug external software like VLC to mine. ---------------------------------------------------------------------- Almindor · 2011-04-05 20:28 Well VLC does have a streaming input, I don't know anything about it tho, so can't help ---------------------------------------------------------------------- Marc · 2011-04-06 00:28 RTSP is not that difficult to implement. It just some header. In general for streams you don't want TCP overhead. TCP is guaranteed delivery, while on UDP you might lose a packet. For audio/video this doesn't hurt. You won't notice a dropped audio or video fragment, but you will notice that a lost TCP frame is send over (and over) again. ---------------------------------------------------------------------- vexal · 2011-04-13 13:14 Hi all, Just to tell you that i find a lib that can pilot VLC (https://sourceforge.net/projects/paslibvlc/) The lib is currently only for windows but i will try to make it works with linux later. VLC can get a lots of streams, transcode in a lots of formats and stream to a lots of protocol.