NetworkCam Manual  NetworkCam Manual

go to home page Applets full screen, hide local find menu Google search web for more information on this topic jump to foot of page translate this page with Babelfish by Roedy Green ©1996-2008 Canadian Mind Products

Introduction

This manual is best viewed online.

NetworkCam lets either you view other people’s webcams where you are in control of the size, refresh rate etc., or you can put it up on your website server so that people can view your webcam. It is an Applet, and requires no server side software, i.e. permission from your ISP to use.

NetworkCam is a Java Applet that lets you view webcam snapshot video from web cameras that servers present as a series of still jpg images. Click here to see it in action. It is different from the competition in that:

It would be easiest to get your webcam broadcast working with the server and client software that came with your webcam, then only once it is working, flip over to NetworkCam client so you can enjoy its special rate control features. It least get it working to the point where you can view the images in your browser by clicking reload manually to refresh before you start fooling around with NetworkCam.

What Do You Need?

You need some basic familiarity with HTML, webservers, URLs, zip files, jpgs, Applet tags and uploading to websites. You don’t need any knowledge of Java. If you don’t have that, find a friend who does and bribe him with a nice dinner to get this set up for you. It is not at all hard for someone who knows these basics.

You need some sort of webcam and software to serve (broadcast) jpeg, gif or png pictures over the Internet using HTTP: protocol. NetworkCam presumes some other software is already handling that.

To use it, you must compose an HTML page with some embedded commands in it that control how fast you want the pictures to refresh.

Your webserver automatically sends a copy of the NetworkCam Applet jar to anyone wanting to view your stream. All they need do is browse your webpage to trigger this. The Applet runs in the viewer’s browser, and automatically fetches pictures at the rate you specify.

You need to upload a piece of html similar to the following example and also the networkcam.jar file to your website using at FTP uploader (unless, of course, it your webserver is running on your local machine.)

HTML

Typical HTML looks like this to access your camera stream and display it in a browser.

What is all this gobbledegook?

Most of this, you don’t need to understand, just copy exactly as is.
HTML Tag Meaning
archive="networkcam.jar" This tells the browser where to look for the Java Applet program. The browser will look for the usual signed version in networkcam.jar or if you want to use the special signed version for experimenting you would specify unsignednetworkcam.jar.
width="320" Means you want an image 320 pixels wide. Use the same magnification factor you used on height or the aspect ratio will be distorted and the image will look stretched. Note, you have to specify the height in two places, once for Java and once for people who don’t have Java.
height="240" Means you want an image 240 pixels (dots) tall. It works best if you pick a number the same size as your original stream. If you want to magnify, it works best to pick a height twice or 1.5 times as big as the original. If you want to shrink, it works best to pick a size half as big. Magnifying gives fuzzy images. Shrinking transmits much more slowly than sending a small original would. Your camera software may give you the option of simultaneously broadcasting several sizes. You can flip back and forth by changing web pages. Note, you have to specify the height in two places, once for Java and once for people who don’t have Java.
<param name="CameraName" value="Times Square"> Optional name for the webcam.
<param name="frogs" value="yes"> Turn on frog sounds to let you know when a reload is happening. Each camera on the page uses a different frog sound so you can tell them apart. Set frogs="no" to turn off the sound. By default frogs="yes"
<param name="RefreshFast" value="5"> This says you want the pictures to refresh every 5 seconds at first. If you leave this parameter out entirely, 10 is the default.
<param name="RefreshTimeout" value="30"> This says you want to pictures to refresh at the fast rate for 30 seconds before reverting to the slow rate. If you leave this parameter out entirely, 30 is the default.
<param name="RefreshSlow" value="60"> This says you want to pictures to slow down and refresh every 60 seconds after a while. If you leave this parameter out entirely, 120 is the default.
<param name="Image" value="http://images.earthcam.com/ec_metros/newyork/newyork/fridays.jpg?nocache=1119726325281"> This is the URL of the camera stream. Normally, it will be your website where the stream originates and the directory where the networkcam.jar also lives. Technical note: you cannot access a stream on a server other than where the jar originated from unless you use the signed version of the jar. Note that you have to specify the URL twice, once for Java users and once for non-Java users.
<param name="Flip" value="no"> Do you want the image inverted top to bottom? Normally omitted.

Normal Flipped
Normal image Flipped image
<param name="Mirror" value="no"> Do you want the image reversed left to right? Normally omitted.

Normal Mirrored
Normal image Mirrored image
<param name="Rotate" value="0"> How much do you want the image rotated, in degrees. +ve is counter clockwise, -ve is clockwise (the mathematical convention). Normally omitted. For example:

Normal rotated 90 rotated -90
Normal image rotated +90 image rotated -90 image
normal rotated 180 rotated -180
Normal image rotated +180 image rotated -180 image

Use Without The Internet

You can also use this program without the Internet on a single machine or on a LAN. Your URL will look a little different:
file://localhost/E:/jpg/image.jpg
where E: might be a local or remote mapped drive. Or perhaps using the physical IP address:
http://192.168.2.100/jpg/image.jpg
If the Applet jar is not in on the same machine as where the stream is coming from, you must use the signed version of the Applet.

Multiple Streams Per Page

Just repeat the whole section from <applet to </applet> with different sizes, and streams. You might arrange them in a grid using the HTML table command. See The HTML cheat sheet for basics on how to decorate and arrange your web page.

If you have many streams visible on many pages, only the streams currently visible on screen are actually pumping any data. All the others scrolled offscreen or on other pages are automatically suspended. They automatically restart when you bring them back into view.

Signed Or Unsigned?

There are two versions of the Applets included networkcam.jar and unsignednetworkcam.jar. One is the usual unsigned Applet. It has the restriction it can only view streams originating on the same machine the jar was loaded from. The signed version bypasses that restriction. However, you must click GRANT to give the Applet the privilege to do this unusual thing that ordinary Applets are not permitted to do. The signed version is slower to start up since Java goes through extra security checks when it loads it.

Testing

You can test using the signed version of the jar with other people’s streams. You can check if these links are working by just viewing them manually and clicking reload manually to see if the images change from time to time. Only bother testing with known good links:
Sample JPG Streams
URL Size Notes
http://images.earthcam.com/ec_metros/newyork/newyork/fridays.jpg?nocache=1119726325281 352x240 Times Square in New York. Updates about every 2 seconds. Crowds moving.
http://www.heroncam.com/images/beacon-hill-treetops.jpg 640x342 Heron Cam
http://www.mathew.st/static/mathewst/webcam1_static.jpg?1119711123 640x480 Matthew Street Liverpool, pedestrian area.
http://www.fs.fed.us/gpnf/volcanocams/msh/image/mshvolcanocam.jpg 640x480 Mount Saint Helens, refreshes every 5 minutes
http://www.katkam.ca/p.asp?what=currentjpg 1024x768 Burrard Street Bridge, Vancouver. Shows traffic.
you can find thousands of others just by searching for webcam and some city name.
Google
The provider of the image just keeps posting a slightly different version of the *.jpg file from time to time. There is no stream protocol. The Applet just samples the source on a regular basis. Ideally, you don’t sample it faster than the source changes it. There is no special notification when the source changes the image. There is no RTP or MP3 stream support.

If you are curious to see what is doing, watch the debugging output on the Java console.

Hooking Up to Other People’s WebCams

Other people won’t necessarily tell you the magic parameters you need to make their camera work with NetworkCam. They may even go to considerable effort to stop you from finding out how out using unmaintainable coding techniques.

Using the Opera browser you can right click the image then click image properties. That will tell you the URL of the image and also its size and whether it is a JPEG. If you right click the image then click copy image address it will copy the URL to the clipboard. You can then paste it onto the browser command line for a test. If all goes well, repeatedly reloading that URL manually will eventually change the image. The owner of the camera may foil you by requiring that you use a different URL every time to get the picture using some secret formula based on the date and time. In that case, you are S.O.L. Sometimes, the same URL will work for a while then stop working. These are all ways they are using to try to stop you from using their webcam. Take a hint.

Other times right clicking the image does nothing. This is usually because they are already using a Java Applet of their own similar to NetworkCam. In that case you will either have to use a packet sniffer such as WireShark to find out the URL by looking for HTTP GET packets going from your browser to the server, or dig around in the HTML source with View Source looking for likely URLs or URL fragments.

If you are viewing other people’s webcams with your NetworkCam software, it is impolite to refresh faster than they would with their software. It is also foolish to ask NetworkCam to refresh faster than the image actually changes. It just wastes bandwidth. The owner of the webcam has to effectively pay their ISP for every refresh sent out, and likewise you pay your ISP. If you waste too much bandwidth, your ISP may kick you up into the next more expensive category.

If you are viewing your own webcam, or letting others view it with NetworkCam, it is much simpler. You know the magic parameters, and you have complete control. You further don’t need to use the signed version, since the Applet typically gets its feed from the same server it was loaded from.

Warnings and Troubleshooting

  1. This program is for non-military use only.
  2. If it does not work, check the Java console for error messages. You can turn on the Java console either in browser preferences or in the Windows Control Panel under Java plug-in.
  3. This program does not work in Opera 7.51 due to a bug in Opera’s URLConnection implementation. It has been tested to work in Netscape 7 and IE 6 with Java 1.5. For it to work in with Microsoft’s JVM, you will have to recompile it with an old Java compiler.
  4. If you have a slow connection, you may notice the refresh appears to be somewhat slower than you requested. This is because it waits 10 (or whatever you configured) seconds after finishing loading one image before starting the next. If it took 5 seconds to load on average, it would take then 15 seconds before you saw the next image. This way it never tries to refresh faster than the communication line can keep up.
  5. If you refresh too fast, or click too fast, you may not see images changing as fast as you would like because the server may only be able to produce images at some given rate. There is no point it trying to refresh the images faster than they are produced. Every time you click, NetworkCam obediently abandons the current background refresh download and immediately starts a fresh one. If you were to click frantically and continuously, it would never get a chance to finish a download, and you would never see any changed images until you stopped clicking.

Costs

buy NetworkCam registration $10.00 USD includes the Applet with source code registration. You can use it free as long as you want. Nobody is going to come after you if you don’t register. Registering help support development of software like this.

download NetworkCam source and compiled class files to run on your own machine as an Applet.

PackageVersionReleasedLicenceLanguageNotes 
networkcam
NetworkCam
1.6 2007-04-19 free Java
summary / PAD description / manual / screenshot for the current version of NetworkCam. Applet to display a webcam or security camera image stream.
download NetworkCam source and compiled class files to run on your own machine as an Applet. First install the most recent Java. To install, extract the zip download with WinZip, (or similar unzip utility) into any directory you please, often J:\ — ticking off the “user folder names” option.
download ASP PAD XML program description for the current version of NetworkCam.
NetworkCam is free. Full source included. You may even include the source code, modified or unmodified in commercial programs that you write and distribute. Non-military use only.
   
 

CMP homejump to top
CMP logo
feedback Please email your feedback for publication, errors, omissions, broken/redirected link reports
and suggestions to improve this page to Roedy Green : feedback email
made with CSS
HTML Checked!
ICRA ratings logo
mindprod.com IP:[65.110.21.43]
Your face IP:[38.103.63.61] The information on this page is for non-military use only.
You are visitor number 9,769. Military use includes use by defence contractors.
You can get a fresh copy of this page from: or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror)
http://mindprod.com/applet/networkcammanual.html J:\mindprod\applet\networkcammanual.html