Copyright Michael Karbo, Denmark, Europe.
Chapter 20. Start with a webcam
In this section, I am going to look at cheap webcams, which give the fastest and easiest start to working with digital video.
New webcams are frequently introduced onto the market and there is, at the same time, a tendency to supply digital cameras and mobile phones, etc. with webcam-like functions. There is, altogether, a tremendous development in everything that has to do with digital photography. But we, however, are going to look at the small video formats, which, for example, come from webcams.
A webcam is an enjoyable toy, which can give you an excellent introduction to working with digital video. Image size is rather limited with a webcam, so you don’t have to have an enormously powerful computer. I would recommend that everyone start with a webcam!
What is a webcam?
A webcam is a little and cheap camera (usually between 500 and 100 kroner). It is also very easy to install which means that we have here a technology which, in principle, is available for most people who have a computer.
The camera itself is a little box, into which both an objective and a microphone are built into. The software in the computer operates the camera. The camera is (in the vast majority of cases) connected to the computer via a USB cable, which is convenient for everyday use. Only a little thin cable is needed.
The USB cable transmits data (audio and image) from camera to computer. It also sends instructions from the camera’s software to the camera:
Figure 122. A webcam records digital video directly onto the hard disk.
What can a webcam do?
Don’t expect high quality recordings from a webcam, this hasn’t been intended. But you can produce small video sequences, which are both quick to produce and easy to distribute. And on top of this, mini videos from both webcam and digital cameras can be burnt onto a video CD in a surprising good quality so that they can be watched on the television screen. More about this later.
Webcams are often supplied with software, which gives the camera a number of additional functions:
Finally, all webcams can take single images (stills), but the quality isn’t very convincing. The word webcam refers to the fact than the camera is designed for use in connection with the Internet. This means that the camera has to be permanently connected to the net and that you have to have the right software.
You can take stills with a certain interval between them (e.g. every 10 minutes), after which they are sent out automatically to a wondering audience all over the world. Or you can keep pace with what is happening in your driveway or whatever else you have chosen for us all to participate in.
You can also make a live broadcast, which means that you, in principle, create your own television station on the net.
All of these things are, in fact, possible with Logitechs webcams, which are supplied with programs for one thing and another. And, in my experience the programs usually work very well indeed – I haven’t, however, been on the net with my home recordings …
Figure 123. The camera is used here for video surveillance. The camera’s software makes sure that the camera only records when there is a movement in the image.
An example of a webcam
Let us now quickly look at a couple of webcams. Logitech is the absolute leading company in these sorts of products. I have found two of their top webcam models (see Figure 124). On the left, you can see a traditional webcam (model QuickCam Pro 4000), a camera that should be near a computer. This camera costs about 750 kr.
On the right, in Figure 124, the model ClickSmart 420 is shown, which costs a couple of hundred kroner extra. This is a webcam, which also works like a “proper” camera. The camera can take photographs independent of a computer, which means that you can operate anywhere you want to. The images are stored in 8 MB internal memory and transferred to a computer when the camera is connected to the mounting bracket.
Wireless cameras are also to be found (Figure 132 on page 3), so that a continuous video recording can be made up to 20 meters’ away from the computer.
Both cameras in Figure 124 are rather highly developed products, which work really well compared to their prices. They have CMOS sensors with a physical resolution of 640 x 480 pixels. With the help of software interpolation (artificially improved resolution) a still can be shot up to a resolution of 1280 x 960 pixels. This is, in fact, a very fine size, which with a little luck can be printed out in an acceptable quality.
Used as video camera, the two Logitech models can record with a maximal resolution of 640 x 480 and with up to 30 images per second. A fast computer is, however, required for its success. For ordinary webcam users, a resolution of 320 x 240 pixels is completely sufficient.
Figure 124. Modern webcams from Logitech. The buttom modelalso functions as a primitive digital camera.
The portable version (ClickSmart 420) can also record video and stills, when you are on the move - maximal 70 seconds video with 10 images per second, however, because only 8 MB RAM are built in. There is a built-in flash, which improves the camera’s still recording ability. In a larger version, the storage can be enlarged with a memory card (in the rather old-fashioned SmartMedia format.
Figure 125.A video resolution of 640 x 480 pixels is the highest a camera can manage.
Common for Logitech’s cameras is that they are easy to install. As soon as you connect the camera to the computer’s USB port, then Windows registers the existence of the camera. The software is just as fast to install and easy to operate. It is recommended for all!
Figure 126. Windows recognises the camera immediately.
Example of a recording
Let us now see an example of how audio and image is formatted in a small video film. Right click on a video file in the Windows explorer, and then select Properties. This gives a dialog box where you can on the second tab (called Document info) often find information about the audio and image formats. It is, unfortunately, unusual to find such extensive information as shown in Figure 128. Some video programs are obviously better than others when it comes to storing the necessary metadata (data, which is stored in a file, and which describes the file’s contents). Later in the booklet (page 3) I will tell you about the free program VirtualDub, which is really good at “looking” into video files.
Try and look at the information in Figure 128. It is the file properties from a small video film I have recorded with an old webcam (Figure 119). The video file itself fills about 4.586 KB, i.e. just about 4½ megabytes. It contains 17 seconds of recording. The audio is miserable because the camera’s built-in microphone makes an awful lot of noise. You can read in the file information that the audio is sampled with 11 kHz and with a resolution of 8 bits. Which isn’t very good; remember that CD quality is 44,1 kHz/16 bits.
Figure 127. Sound track data.
The bad sampling keeps the amount of data down but the audio isn’t particularly good. We don’t know how the audio has been compressed; there is nothing about this in the information.
Figure 128. Properties (metadata) for a video file show both an audio and an image format.
10 images in a second
The video recording was taken with 10 images in a second. Which gives 165 images altogether, as the whole recording lasted just under 17 seconds.
If I look at the image quality, then it is ”acceptable”. The camera doesn’t actually reproduce the most wonderful colours, but you can see the subject. With a frequency of 10 images per second, you get a rather hacked video image. But as long as the subject doesn’t move too much, then the recordings are to live with. You could, of course, increase the image frequency, but this will only result in bigger files. The file information informs us that the image size is 640 x 480 pixels. This is the largest that I can get out of this webcam.
Figure 129. Image from a webcam video.
Large amounts of data
If we try to calculate the amount of data in the video images, we will probably be rather surprised. Images take a lot of room. The file contains 165 frames, which each take up 640 x 480 pixels. The colour depth is 24 bits and this means that every bit takes up 3 bytes.
So a single image takes up 640 x 480 x 3 bytes = 921.600 bytes, almost a whole megabyte ”raw” bit map data per frame.
With 165 frames, we have a total amount of data altogether of 145 MB, as seen in Figure 130.
Figure 130. An image track contains a lot of data.
So the basis material for a digital video takes up an enormous amount of space, if we are looking at ”raw” uncompressed audio and image data. Just a few minutes’ recording can produce enormously large files. This is why data is nearly always compressed.
The little webcam in the example encodes all the audio and image data together into a file of about 4,5 MB, which isn’t so much compared with the amount of data we have just worked out.
You can read in Figure 128 that video compression is carried out with Indeo Video 5. This is a video codec from the company Intel, which the camera’s software uses. And the compression is effective, as shown here:
Figure 131. A compressed file takes up a lot less space than the data it, in fact, contains.
Obviously, the proportions of the compression ought to be looked at. The uncompressed amount of data of 152.254.226 bytes can be divided by the file size of 4.695.552 bytes. This gives the number 32,4. So the video has been compressed in the ratio of 32: 1. This is a very heavy compression but necessary.
But the game doesn’t stop here because a video file can be compressed further yet. In fact, I got the program Windows Media Encoder (described later in the booklet) to convert it to a file with only 529 KB without the quality getting much worse.
It increases the compression proportion further with factor eight, so that the overall compression ends at 280: 1! This is really possible today – with the help of modern codecs. The work of compressing video data is extremely demanding for a computer but with today’s powerful CPUs (e.g. a Pentium 4 with 2,5 GHz) it can be done relatively quickly.
Figure 132. A webcam, which can record with a wireless connection to the computer (Logitech).
Video from a digital camera
Just like a webcam can record stills, most digital cameras can take small video films. We are talking about a good functionality, which many can have the pleasure of and, which we can see is being further developed in the new models of digital cameras.
Figure 133. Menu from a digital camera, which can take films in MPEG-format.
Purely technically a digital camera is very suitable for taking videos; the biggest restriction is its RAM storage. You can only make videos in rather small formats and can only take maybe 30 seconds of recording at a time. This can, however, be enough on a lot of occasions.
It has, in any case, been proved that users are enthusiastic about digital cameras, which also work as video cameras, and there is great development in this field. The company Fuji film probably have the best digital cameras for recording videos at the moment.
Figure 134. Typical video sizes for webcam and videos taken with a digital camera.
In any case, families can easily use small video films both from a digital camera and a webcam. It is easy to record with these devices and the video files don’t take too much space.
Video files can with advantage be stored on a Video CD, where they can also be mixed with other video recordings and photographs. This requires a video-editing program such as, for example, Pinnacle Studio 8 (see a description later in the booklet). The recordings can be gathered here and finally burnt onto the VCD. You will be surprised how good such a mini video from a digital camera can, in fact, be on a Video CD.
Figure 135. Little video film taken with the digital camera Canon G2. Can be shown as a VCD on a television screen.