2 webcam in 1 webpage?

Questions? Suggestions? Need help? Talk about anything related to Yawcam...
Post Reply
genro14
Posts: 2
Joined: Sat Jul 08, 2006 4:44 pm

2 webcam in 1 webpage?

Post by genro14 »

Is it possible to use two different webcams in 1 webpage? Or it can be done by opening 2 yawcam? pls reply.. :roll:
malun
Site Admin
Posts: 1593
Joined: Sun Jan 04, 2004 1:29 pm

Post by malun »

Yes, first make a copy of your yawcam directory (e.g. c:\program files\yawcam), so that you have two versions of yawcam on your harddrive.
Let's say you now have two versions located like this:
c:\program files\yawcam
c:\program files\yawcam2

Now start the first version of Yawcam. Open the http settings (Settings -> Edit settings... -> Http) and change the port number from 8888 to e.g. 8889. Then go to the stream settings and change the port number from 8081 to e.g. 8082.
When this is done click OK to apply your changes.

Now start the second version of yawcam (So that two versions is running at the same time.), and enable the Http output in both programs.

Then edit the html file in the built in web server in the first version of yawcam. (e.g. c:\program files\yawcam\www\index.html)

originally the file looks like this:

Code: Select all

<html>
<head>
<title>Yawcam</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<div align="center">
  <p><strong><font size="5" face="Verdana, Arial, Helvetica, sans-serif">My webcam!</font></strong> </p>
  <p><img border="0" src="out.jpg"></p>
  <p><a href="http://www.yawcam.com" target="_blank"> <font face="Verdana, Arial, Helvetica, sans-serif">www.yawcam.com</font></a></p>
</div>
</body>
</html>
Now change the code to also iclude the image from the second software:

Code: Select all

<html>
<head>
<title>Yawcam</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<div align="center">
  <p><strong><font size="5" face="Verdana, Arial, Helvetica, sans-serif">My webcam!</font></strong> </p>
  <p><img border="0" src="out.jpg"></p>
  <p><img border="0" src="http://your-public-address:8889/out.jpg"></p>
  <p><a href="http://www.yawcam.com" target="_blank"> <font face="Verdana, Arial, Helvetica, sans-serif">www.yawcam.com</font></a></p>
</div>
</body>
</html>
Where "http://your-public-address:8889/out.jpg" contains the public address/ip-address to your computer and the port number you used in the settings in the beginning. You can get you public ip from here: http://www.yawcam.com/ipq.php

That's all :wink:
/malun
genro14
Posts: 2
Joined: Sat Jul 08, 2006 4:44 pm

Thanks!!!

Post by genro14 »

Great.. Thanks for the reply. I'm going to try it now. Hope can work it out. :D
malun
Site Admin
Posts: 1593
Joined: Sun Jan 04, 2004 1:29 pm

Post by malun »

Or... if you upload the images via FTP to your server... Then upload the images with two different names and edit your webpage on the ftp to show both images.

/malun
Post Reply