Remote Camera Streaming

From MiOS
Jump to: navigation, search


HOWTO Set up (remote) IP camera streaming.

Overview

When you display still frame jpeg images from the camera, those images are going through the MiOS portal server, so there are no firewall issues. If the camera has a URL in the variable urn:micasaverde-com:serviceId:Camera1 / DirectStreamingURL then the camera supports video streaming from that URL, generally MJPEG or MPG or MPEG4. When you want to display live, streaming video, you can request a direct connection to the camera and MiOS will attempt to setup a hole in the homeowner's firewall so you can get the video. The easiest way is for the homeowner to forward port 3482 to his MiOS system. If he does this, MiOS will automatically reroute 3482 to the appropriate camera when it's being requested. If port 3482 is not opened, MiOS will use other protocols like upnp and nat-pmp. You can determine the status of the forward and notify the user to forward port 3482 if he wants to view the video. Note that only one camera can be viewed at a time. So if one cell phone is viewing camera #1 and another tries to view camera #2, the person viewing camera #1 will lose his feed.

Local

Local streaming is simple. Just construct a url with these upnp variables:

username: urn:micasaverde-com:serviceID:Camera1:DirectStreamingURL

password: urn:micasaverde-com:serviceID:Camera1:DirectStreamingURL

DirectStreamingURL: urn:micasaverde-com:serviceID:Camera1:DirectStreamingURL

username: urn:micasaverde-com:serviceID:Camera1:DirectStreamingURL

ip: You can get this by doing a data_request like: data_request?id=lu_deviceip&DeviceNum=45

Then build the URL Like this:

Remote


Obsolete, doesn't work anymore.


When you want your app to display a stream remotely from MiOS you can do a special data request to have MiOS attempt to set up a hole through the user's NAT.

Example:

For user skyvera and password myvera123, if you wanted to get the URL to remotely stream video for device 45 you would do:

https://fwd2.mios.com/skyvera/myvera123/10266/data_request?id=lu_camera_port&DeviceNum=45

and get a response like

{"status":"warning","url":"http://dceadmin:dcepass@76.45.122.30:3482/nphMotionJpeg?Resolution=640x480&Quality=Clarity"}

"status" can be one of warning, upnp, natpmp or forwarded. If status is warning, it means that upnp and nat-pmp both don't work, and that the last time we checked, port 3482 wasn't forwarded to MiOS. In such a case, you should display a message reminding your users to forward port 3482 to MiOS

Personal tools