0

I have a problem with motion. I created a web page where I put my motion video, like this:

<html>
<title>
Camara 
</title>
<head>
<h1 style="font-family:calibri;">Camara de Raspberry Pi</h1>
</head>
<body>
<br /><img src="http://192.168.1.x:8087"/>
</body>

And it works well if I'm on my network, but if I try to access it from outside my network it shows the web page, but where the video should be it there is the typical broken image icon, but no video at all.

I'm not an English speaker, in case you don't understand something please ask me

0

The problem is that you are using a local ip for the image src the src should not have a 192.168.1.x but instead be the same ip that you are accessing the pi from. because 192.168.1.x ip's are inky made available to your local network, please change that ip to the one that you are accessing the webpage with such as 93.184.216.34 so that your code will look like the following:

<br /><img src="http://93.184.216.34:8087"/>

Be sure to also forward port 8087 on your router as you have done with port 80

Note: 93.184.216.34 is the IP address of example.com and is here solely for example purposes.

  • Oh! Okay, I'll try that... so... there should be a port forwarding for 8087 also, and not just the 80? – gloaiza May 17 '16 at 15:17
  • yes you will need port forwarding on port 8087 aswell – Mohammad Ali May 17 '16 at 15:18
  • Thank you, but the thing is... I want it to be in the web page so I can make a login page to make it more secure, but if I do the port forwarding in the 8087, anyone could see it... ¿Am I right? – gloaiza May 17 '16 at 15:27
  • Yes anyone could, but this is what you were asking for, if you need security help your going to need write up a new question, please mark this one as correct if it solves the problem at hand. or at least talk about what your using to run the video, maybe your server on port 8087 could be able to check for an authentication token before starting the feed? – Mohammad Ali May 17 '16 at 15:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.