Remote Camera Streaming

From MiOS
(Difference between revisions)
Jump to: navigation, search
(Local)
m
Line 1: Line 1:
 +
[[Category:User Instructions]]
 +
[[Category:How To]]
 +
 +
'''HOWTO Set up (remote) IP camera streaming.'''
 +
 
== Overview ==
 
== 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, can 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 other techniques like upnp and natpmp.  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 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.
 
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, can 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 other techniques like upnp and natpmp.  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 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.

Revision as of 15:45, 21 May 2011


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, can 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 other techniques like upnp and natpmp. 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 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: if there's a username/password: http://username:password@ip/url

if there isn't a username/password: http://ip/url

Remote

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 natpmp 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