title: Restream live stream using VLC and display using HTML5 video tag
body: <p>I currently have a server and client connected through a tunnel using OpenVPN. My goal is to use the server to grab and restream the camera feed from the client on the server using a HTML5 video tag. The server has a public IP, so the idea is to allow people to view the client's video stream, through this server.</p>
  
  <p>I'm using VLC, and using the graphical method, I'm able to view the video stream on VLC itself. The steps I used are as follows:</p>
  
  <ol>
  <li>Media -> Stream -> Network Tab -> for network URL field, <code>http://10.8.0.6:8080/path/stream/</code></li>
  <li>Stream -> Next -> for the destination, change from File to HTTP -> check Display Locally -> Add</li>
  <li>for the Path field, I put <code>/stream/live</code> -> unchecked Activate Transcoding (otherwise it doesn't work) [EDIT2: changed port to 8181]</li>
  <li>Stream.</li>
  </ol>
  
  <p>The video shows in VLC, but when I add the following lines to my index.html file on the server, it doesn't work:</p>
  
  <pre><code>&lt;video id="id" width="640" height="480" src="http://203.xxx.yyy.zzz:8080/stream/live" autoplay="autoplay"&gt;
  &lt;/video&gt;
  </code></pre>
  
  <p>where 203.xxx.yyy.zzz is the public ip address of my server.</p>
  
  <p>The video doesn't show; there's only a black screen. Can anyone help me?</p>
  
  <p>EDIT: I don't mind if it's not a graphical solution; a command line solution is fine too.</p>
  
  <p>EDIT2: I realised that both input and output streams were on the same port, so I changed the output to port 8181. On top of this, I'm also trying to use MJPEG as to mux instead, so that I can simply display it on a webpage using an <code>&lt;img&gt;</code> tag (This would be preferred over using <code>&lt;video&gt;</code>). I created a new profile called "Video - MJPEG". Under the "Encapsulation" tab, I chose MJPEG. Under the "Video codec" tab, I checked "Video", chose the M-JPEG codec from the drop-down list, left Bitrate at 800kb/s, upped the frame rate to 30 fps, and put 1 for the resolution scale. Despite using this profile, the stream didn't show when I used <code>&lt;img src="my.ip.address:8181/stream/live /&gt;</code> in my index.html. Please help!</p>