Share an IP camera feed (RTSP?)

10,675

Solution 1

Whats the camera model? If it supports RTSP and JPEG, you only need to forward ports 80 for JPEG and 554 for RTSP from the router to a local IP address of the camera. And also, you should have static IP, or register your dynamic address at dyndns.org and get a DNS name for it.

enter image description here

Then if users want to see RTSP stream from that camera they can open it from a RTSP url referring to the WAN IP address of the router the camera is on.

For the AXIS camera and the setup from above:

rtsp://84.55.1.2/axis-media/media.3gp

That will route to the 10.10.10.1:554 which is the IP camera.

You can do the less work, if the camera supports UPnP. Then just turn it on, and you will get what address users have to put in their URL and the port to add.

Now, if you want to display this in browsers, you probably want to get the MOTION JPEG if it is supported, or get JPEG periodically...

Solution 2

First you need is to receive the RTSP stream from the camera. There are some open source libraries that can be used like Live555. Then you need to convert the stream to a protocol that can be played by the browsers. This can be HTTP Live Streaming (HLS) or Dynamic Adaptive Streaming over HTTP (MPEG-DASH). These streams can be played by using HTML5 video if Media Source Extensions (MSE) is supported. Older browsers does not supports MSE so you need a fallback player (e.g. Adobe Flash based player with HLS or MPEG-DASH support).

There are some cloud based service that provides complete solution for broadcasting your IP camera. I tested IPCamLive.com and it's working fine for me.

The best thing that I liked in IPCamLive is that this service provides a simple HTML snippet for embedding the camera so I only pasted this snippet into my web page. Another good thing is that this service supports ONVIF protocol that can help you to find the proper RTSP URL of your camera stream.

Share:
10,675
Cheeky Cherub
Author by

Cheeky Cherub

Updated on June 04, 2022

Comments

  • Cheeky Cherub
    Cheeky Cherub almost 2 years

    I have an IP camera and I would like to share its feed.

    It can output an RTSP feed as well as simple JPEG images.

    I am looking for a way to take that single feed and serve it to multiple viewers.

    In reality there may only be a few at any given time, so were not looking at 1,000's at once.

    I also want to do this with no hardware on my end, just the camera, outputting its feed.

    Is there a service on the internet that can take that feed and serve it out to multiple people in some way?

    Maybe the way to do it, is to transcode that RTSP to something more palatable to browsers, is that an option?

    Again, no hardware on my end, I don't want racks of computers (even 1) sitting at my end of things.

  • Cheeky Cherub
    Cheeky Cherub over 12 years
    The camera only supports a limited amount of users at one time and I would like to share it with a wider audience, it does support motion jpeg also.
  • Cipi
    Cipi over 12 years
    Well then you want to setup a small RTSP server using VLC, FFSERVER... or something totally custom. That would pull only one RTSP stream from the camera, and stream it to N users... I can't help you with that. :/ Considering MOTION JPEG, if you know how to use C# for example (this is a programming website!), you can write a simple ASPX page that will take one MJPEG stream from IP camera, and make it available to N users...