HTML on own server & more questions

Questions? Suggestions? Need help? Talk about anything related to Yawcam...
Post Reply
z3r0c00l12
Moderator
Posts: 1210
Joined: Wed Jan 14, 2009 3:50 am

HTML on own server & more questions

Post by z3r0c00l12 »

Hi Malun,

I'd like to know if you can post an example page for the Run on own webserver solution, but using javascript instead of the java applet.

I'd also like if you could explain to me how I can default the quality to 30%, and the fps to 3 or 5, because my upload bandwidth is very limited and causes my router to crash if I use yawcam at 30 fps.

Is there a way to save file but faster then 1 fps, like 2-3 fps as file to disk?

I use the file and stream options alot, also ftp (not as often), but I don't understand the motion and http settings, what are they for? I mean, I know what motion detection means, but what are the uses of the motion detection, save on detection, start stream? run a program? plat a sound? And for the HTTP? what's the difference between Stream and HTTP?

TL;DR
1) Example HTML page of "Own Web Server" using javascript
2) How to modify javascript to default to 30% quality and 3-5 fps
3) How to save to file at a faster rate than 1 fps
4) What is the purpose of motion detection
5) What's the difference between HTTP mode and Stream

Thanks,
z3r0c00l12
malun
Site Admin
Posts: 1589
Joined: Sun Jan 04, 2004 1:29 pm

Post by malun »

1)
I recommend you to use an iframe to include the javascript stream on your webpage. More info about this (and other ways of displaying your webcam) here:
http://www.yawcam.com/forum/viewtopic.php?p=2350#2350

2)
Edit the file template_js.html. The location depends on windows version.

In windows vista or windows 7 this could typically be:
C:\Users\username\.yawcam\stream\template_js.html
and in windows 2000 or windows xp:
C:\Documents and Settings\username\.yawcam\stream\template_js.html

where username is the name of the account you are using.

Look for the lines:

Code: Select all

var fps = 30;
var quality = 30;
var timeout = 33;
Change the values like this:

Code: Select all

var fps = 5;
var quality = 30;
var timeout = 200;
to get a 30% quality and 5 FPS.
Timeout needs to be set to 1000/fps. So if you want 5 FPS set timeout to 1000/5=200.

3)
Not possible at the moment.

4)
For example you can use motion detection to get a warning if someone breaks in to your home when you are at work. Yawcam can send email to you attached with images of what's happening.

5)
Http and Stream are very similar. There are some differences though. Http is optimized for showing still images with a few updates. Stream is optimized for showing a video stream of images. With Stream you can also add password protection and have more control over the viewers.

/malun
z3r0c00l12
Moderator
Posts: 1210
Joined: Wed Jan 14, 2009 3:50 am

Post by z3r0c00l12 »

Good, I got the Run On Own WebServer streaming, I setup both webcams on 1 page using 2 different iframes each pointing to their respective streams, I've also set the following settings :

fps : 4
quality : 30
timeout : 250

The only problem I am having is that the streams, both of them, timeout or go offline at random intervals between 3 and 20 seconds, after this the stream just shows offline until I refresh the page. I am wondering what could cause this, I have certain explanations, but don't know how to check..

1) Bandwidth is limited to 100kBps (800kbps) for 2 streams?
2) Streams are running on unreliable UDP instead of TCP?
3) Yawcam and streaming browser go out of sync?

I tried different fps values like, 3;30;334 but still the same problem...

Would you have any suggestions?

EDIT : I've seemed to have eliminated the offline problem by switching from Firefox to IE. It seems that Firefox will not handle 2 streams under the same page as it only loads 1 of them at a time and the other goes offline until the first stream drops...

z3r0c00l12
Post Reply