Working with mutiple cameras (web cam and ip cameras)

Questions? Suggestions? Need help? Talk about anything related to Yawcam...
kaneco
Posts: 39
Joined: Sun Feb 26, 2012 4:19 pm

Working with mutiple cameras (web cam and ip cameras)

Post by kaneco »

Hello,

I have the yawcam installed on the whs2011 (windows home server 2011) and is running the stream and the motion detect to email without any problem. But I want to put a webcam (that is working well now) and a ip camera axis. I have followed this tutorial http://tellmewhy.xooit.eu/t432-Yawcam-U ... Yawcam.htm
and I have installed the second yamcam software in other director like the tutorial suggest, but I chose a different ports on the configuration for the web cam I chose the 8081 and for the ip camera I chose a 8082. Now I have some problems and questions:

1- Is this possible: use a ip camera and a webcam connect to the some pc on a different ports?

2- When I try to reach the port 8082, appears the image from the web cam and if I try to reach the 8081 appears the image from the webcam, this only happens when I access from outside of my network, when I try to reach the pages from the local network during some seconds the images are different . This is a problem of the ports I'm using? Or the problem is related to this error when I try to use a ip camera Image

what I have to do in order to solve this problem?

3- In order to view the booth images "stream" from the different cameras in a some internet page protected with a password, what I have to do?

Than you for your support

Best regards
memoric
Posts: 184
Joined: Wed Feb 23, 2011 1:37 pm

Post by memoric »

1-Haven't you done that? Didn't you mention in 2- that you visit both cameras
at 8081 & 8082?
2-To view the cameras locally try http://localhost:8081 & http://localhost:8082.
As to the "Filtergraph" error, maybe this thread can help?
3-To protect your streams with password, open yawcam's settings & click on
"Password". If you want the whole page to be password-protected, say so here.
kaneco
Posts: 39
Joined: Sun Feb 26, 2012 4:19 pm

Post by kaneco »

Hello memoric

And once again, thank you for your support

The problem with "Filtergraph" message is now solved by follow the thread you mentioned.

But regarding the other questions:

Accessing the booth cameras installed in a different ports 8081 and 8082 protected by a user and a password (some user and password for booth) from a internal network I'm able to view different images like was supposed. But when I try to reach the some web pages for the different cameras, I as redirect to the some image, from the web cam installed on the 8081 from the web cam and I can't view the image generated from the ipcamera.

Can you please help me with this issue?

And now replying to your question:

"3-To protect your streams with password, open yawcam's settings & click on
"Password". If you want the whole page to be password-protected, say so here."

yes the objective is in the some page, if possible? Access to the booth image's generated from a different cameras protected by a password.

Best regards
memoric
Posts: 184
Joined: Wed Feb 23, 2011 1:37 pm

Post by memoric »

So, if I got it right, when you visit http://external-ip:8081 & http://external-ip:8082
they both get you to http://internal-ip:8081? That sounds like you have redirected
the external port 8082 to the internal 8081 (instead of internal 8082). Check again
your router's settings.
As to password-protect the page, do you run a server? If so, does it support PHP?
kaneco
Posts: 39
Joined: Sun Feb 26, 2012 4:19 pm

Post by kaneco »

Hello Hello memoric

Regarding the problem with the ports, you can check in the image bellow:

Image

But I think the configuration is correct. Can you please confirm?

replying to your question "As to password-protect the page, do you run a server? If so, does it support PHP?"

Yes the server support a PHP pages

Best regards
memoric
Posts: 184
Joined: Wed Feb 23, 2011 1:37 pm

Post by memoric »

It looks like in the first rule you redirect all traffic to 8081 & then in the second
rule you redirect all traffic to 8082. So, when you visit [url]http://external-ip:xxxx[/url]
(xxxx can be any port) your router reads the first rule & redirects you to 8081.
It never gets to read the second rule. So you should change your rules from
"Qualquer" to 8081 & 8082 respectively.
To add password to the page that you have embedded your streams (which is
called, let's say, index.php) you can add something like that in its source, right
after the <body> tag:

Code: Select all

<?php
$password = $_POST['password'];
if (!isset($password)) {
  echo ("
  <form action=\"index.php\" method=\"post\">
  <input type=\"password\"  size=\"20\" maxlength=\"16\" value=\"--------\" name=\"password\" id=\"password\" onfocus=\"if(this.value=='--------'){this.value=''};\" onblur=\"if(this.value==''){this.value='--------'};\" style=\"height:30; background-color:#111111; font:bold; color:#ff0000; text-align:center; border:inset; border-color:#00ffff\" />
  <br />
  <input type=\"submit\" value=\"Login\" style=\"height:30; background-color:#111111; font:bold; color:#00ff00; border:outset; border-color:#990000 #009900 #000099 #666600\" />
  </form>
  ");
  exit;
} else {
  if ($password != "ENTER-DESIRED-PASSWORD-HERE") {
    echo ("
    <font color=\"#ff0000\">Wrong Password!</font>
    <br />
    <input type=\"button\" value=\"Go Back\" name=\"back\" id=\"back\" onclick=\"window.location.href='index.php';\" style=\"height:30; background-color:#111111; font:bold; color:#00ff00; border:outset; border-color:#990000 #009900 #000099 #666600\" />
    ");
    exit;
  }
}
?>
I added some style to it, but you can change/delete it. You should change the
two "index.php" (lines 5 & 17) to whatever your page's name is & you can set
your desired password in the place of "ENTER-DESIRED-PASSWORD-HERE"
(line 13). If/when you implement this, let us know how it went. :)
kaneco
Posts: 39
Joined: Sun Feb 26, 2012 4:19 pm

Post by kaneco »

Hello memoric

Thank you again for your support

Yes you were right the problem is related to the redirect to the respective port,
Regarding the php code that you have sent me, I not had opportunity to test, but can you please let me know if this code is to add to the specific file or is to add as a index file from a generic web page


Other question is related to start the two yawcam programs as a service is this possible to do if yes can you please let me know how?


Best regards
memoric
Posts: 184
Joined: Wed Feb 23, 2011 1:37 pm

Post by memoric »

Hello kaneco.
How do you "show" your streams? If the user has to go directly to your stream's
address (http://yourip:8081) then you should use yawcam's stream password
(from the settings). But if you have your streams as (for example) iframes in
your own page (let's say http://mycams.com), then this code goes in that page
(http://mycams.com/index.php) right after the <body> tag & before the iframes.
So if the password is wrong, your server will not show the iframes to the user.
As to your other question, I've never run it as a service so I can't tell for sure,
but if you have two different yawcam folders (therefore two different programs),
I don't see the reason why you can't do it. Maybe somebody who has done it
can give us more details.
kaneco
Posts: 39
Joined: Sun Feb 26, 2012 4:19 pm

Post by kaneco »

Hello memoric,

Sorry for the delay, but now I have more available time.
In order to put the streams from the webcam and from network camera on a single protected by password page you have told me, to add a php code "right after the <body> tag:" can you please let me know if you are talking about to edit a specific file or is to create a php file from the scratch. Because my idea is to put all streams in one single page protected my a password.

Thank you in advance for your support
memoric
Posts: 184
Joined: Wed Feb 23, 2011 1:37 pm

Post by memoric »

Hi again.
You must have missed my previous question. How do you "show" your streams?
Does the user have to go directly to your stream's address (http://yourip:8081)
or do you have your streams as (for example) iframes in your own page (let's say
http://mycams.com)?
kaneco
Posts: 39
Joined: Sun Feb 26, 2012 4:19 pm

Post by kaneco »

Hello memoric,

In my case, I show the stream from http://myip:8081

Best regards
memoric
Posts: 184
Joined: Wed Feb 23, 2011 1:37 pm

Post by memoric »

Hm, if you want to you use a fully password protected page, & not just yawcam's
stream password, you have to find a host to register a domain. There are a lot
that are free of course. That host should support PHP. After registration you can
upload the index.php file I mentioned before & you are done.
If you are going to use that solution, I can provide more info on how to do it,
I just haven't already in case you don't want to go that path, so I don't write in
vain! :P
kaneco
Posts: 39
Joined: Sun Feb 26, 2012 4:19 pm

Post by kaneco »

Hello memoric,

Sorry but I did explained well, when I say access to my stream over the myip:8081.

Because I have a domain in this windows home servre is http://mywindowshomeserver.homeserver.com:8081 to access the cameras

Can you please let me know what I have to do in order to get the booth cameras work "stream" on a single page.

And this server already support PHP pages

Best regards
kaneco
Posts: 39
Joined: Sun Feb 26, 2012 4:19 pm

Post by kaneco »

Hello memoric,

Any news regarding this topic can you please help me.

Best regards
memoric
Posts: 184
Joined: Wed Feb 23, 2011 1:37 pm

Post by memoric »

Hi kaneco.
Sorry, I must have missed your previous post. I sent you a PM...
Post Reply