> I am building an application where several clients should be able to watch a
> video stream from a CCTV IP camera.
> I think that the best solution bandwidth-wise is to have a single computer in
> the network connect to the rtsp stream from the camera, and then broadcast
> this stream via UDP (to some address like 255.255.255.255) so all other
> computers in the network only need to "tap" that UDP port to get the video
> stream.
First, you shouldn’t be sending to the ‘broadcast’ address 255.255.255.255,
because that will cause the packets to get received (and then discarded, if
inappropriate) by all computers on your LAN. Instead, you should be using an
IP multicast address - which will cause the packets to get delivered only to
the computer(s) that have subscribed to that address, and also (with
appropriate routing) allows for the possibility of the packets being forwarded
beyond a single LAN.
And, of course, you should be using the standard RTP protocol (over UDP),
rather than raw UDP.
We have several demo applications - in the “testProgs” directory - that will
stream (from a video file) via IP multicast. You didn’t say what video codec
you are using, but if you’re using H.264 (the most commonly-used video codec
these days), then you can use our “testH264VideoStreamer” application.
Then, once you have demonstrated multicast streaming from a file (using an
appropriate “test*Streamer” demo application), then see here
http://live555.com/liveMedia/faq.html#liveInput
<http://live555.com/liveMedia/faq.html#liveInput>
for tips on how to adapt this to stream from a live video source.
> I implemented this with VLC and it works, but... as the network gets more
> load from several devices, the VLC instances start falling behind the real
> time stream from the camera. With one Full HD camera and four standard
> cameras in the network, VLC (the "source" or re-streaming instance mainly)
> falls behind at an astonishing rate and after some 10 minutes the output
> stream is like 5 minutes behind real time!
We can’t help you with VLC problems (because VLC is not our problem), but I
wonder if perhaps you’re running into network capacity problems. Note that if
any of your cameras are streaming over WiFi, then broadcast (or multicast) over
WiFi is notoriously slow.
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
_______________________________________________
live-devel mailing list
[email protected]
http://lists.live555.com/mailman/listinfo/live-devel