title: RTSP stream exited with error": Connection timed out
body: <p>I am building an web application on AWS Cloud that requires to stream a recorded/live video over the global network. I purchased an IP camera(GV-AVD4710) and NVR(GV-SNVR0811) for our application. In future I need to stream no. of cameras on my application.</p>
  
  <p>While Camera in use With NVR, I have connected the NVR in our local network and the camera at channel_1 of NVR. Now the lets assume NVR is getting an IP of 192.168.1.203. So for rtsp streaming URL for channel_1 will be <code>"rtsp://id:password@192.168.1.203:554/ch1"</code> as per manufacturer's specification. For camera streaming I am using "ffmpeg" multimedia framework (<a href="https://github.com/xpcrts/Steaming-IP-Camera-Nodejs" rel="nofollow noreferrer">https://github.com/xpcrts/Steaming-IP-Camera-Nodejs</a> ). So it is working fine. I tested it and working well in local network. Code that is running on the server</p>
  
  <pre><code>Stream = require('node-rtsp-stream')
  stream = new Stream({
      name: 'name',
      streamUrl: 'rtsp://ID:PASSWORD@abcxyz.com:554/ch1',
      wsPort:3000,
      ffmpegOptions: {
          '-stats': '',
          '-r': 30
      }
  })
  </code></pre>
  
  <p>and Code running at client side which is independent of any plug-ins</p>
  
  <pre><code>&lt;div&gt;
         &lt;canvas id="chanel1" width="auto" height="auto"&gt;&lt;/canvas&gt;
         &lt;script type="text/javascript" src="jsmpeg.min.js"&gt;&lt;/script&gt;
         &lt;script type="text/javascript"&gt;
              var canvas = document.getElementById('chanel1');
              var websocket = new WebSocket("ws://34.202.222.188:3000");
              var player= new jsmpeg(websocket, {canvas:canvas, autoplay:true, loop:true})
         &lt;/script&gt;
  &lt;/div&gt;  
  </code></pre>
  
  <p>When I made this IP address available for public, and then the problem begins. It is not working and giving an error:</p>
  
  <pre><code> "[tcp @ 0x563911f0a340] Connection to tcp://192.168.1.205:554?timeout=0 failed: Connection timed out
  rtsp://admin:admin@192.168.1.205: Connection timed out RTSP stream exited with error"
  </code></pre>
  
  <p>In Camera Without NVR, I connected camera directly to our local network and so got an rtsp url like rtsp://id:password@192.168.1.205/media/video1. Same happens again. Works well in local, but not working when I am making this available on public network.</p>
  
  <p>How can stream video over global network? Is it possible to implement these logic using ffmpeg multimedia framework? Does VLC can help in these cases?</p>
  
  <p>I would like to reiterate that, In future there are no. of cameras needs to be stream.</p>