Digital video production and editing

Hack a camera - web interface enhancements (Foscam) en

By Johnny on Sunday 27 November 2011 23:00 - Comments (17)
Categories: software, usability, video, Views: 25.774

Foscam FI8918W
I recently purchased a IP-camera, a webcam in truest sense in that it is a camera that is directly connected to the web. Inside of it runs a web server which allow a stream video and audio to be directly accessed all over the world from any web browser!

But that's not all; the camera can also be configured and controlled over the web. Inside are two motors that enable you to pan and tilt the camera, so that it can look around.

The control interface uses ActiveX, a propriety technology that only works on Internet Explorer on Windows (not on mobile devices) and because it is a big security risk is often disabled.

Alternatively the webcam also provides a more "standard" based interface that works in almost any browser. However, the quality of this interface is somewhat disappointing, and could greatly be improved.

After doing some research I am convinced that it is possible to make an improved version of the web interface, and install it on the webcam as a firmware upgrade.

My camera is a Foscam FI8918W for which the firmware can be updated. There is already some code on SourgeForge that can decompile the firmware and repackage it. However, nobody seems to have released firmware with an improved web interface.

But even without modifying the firmware the web interface can be modified. Any application or web page that can decode a MJEG stream can display the video, and commands are sent to the camera as simple HTTP GET requests.
Some problems with the current web interface
1. No direct visual feedback
When clicking on a control there is no confirmation. You have to wait for the command to be sent, received by the camera, the motors to move, a new image to be captured and sent back to you. This might take a few seconds, especially when uploading the video stream over a home connection. For a video stream the lag is usually not a problem however when there is 2 way communication it is.

My solution: highlight control buttons when activated.

2. Click, reposition, click
The only way to control the camera is to click on the buttons. This requires you to move the mouse cursor between every click. This is cumbersome with a mouse, but outright annoying with a trackpad.

My solution: allow the mouse to move over the controls while being pressed. And also allow the keyboard to be used.

3. Continuous streaming
When accessing the web controls a video stream is shown next to it, taking up bandwidth and even slowing down the browser/computer. This may be undesirable when the stream is viewed through an external application (like VLC).

My solution: added option to disable and enable video stream.
Here is a video which shows some of the changes I have made to the web interface for controlling the movements of the camera. Both by moving the mouse while holding the button down and using the keyboard to move the camera.

Next steps
While controlling the camera is much more fun now I want to see if I can make some some more enhancements. Here is some of the ideas I am thinking about:
  • Create a widget for Mac OS X Dashboard that can control the camera and view the video stream and cuts off the stream when the dashboard is not displayed.
  • Make it possible to save snapshots in the web interface using LocalStorage in the browser.
  • Allow the camera to send images directly to other web services.
  • Package these changes and release it as a Firmware update.
The number of features possible is limited by the camera's control capabilities and that of the web browser, but if anybody has some ideas for other features please let me know!
Online resources

Edit HD video on a slow computer with an intermediate codec en

By Johnny on Tuesday 4 May 2010 22:45 - Comments (9)
Category: video, Views: 13.263

This article intended for those interested in editing High Definition video and setting up a workflow for that. the article assumes the reader has a technical background. It covers the various aspects involved in choosing an intermediate codec and how to transcode video files. All examples here are done on Mac OS X but the principles can be applied on any operating system with similar applications and codecs.


We have reached a point in time that consumer cameras can capture HD video. However, editing HD video it is still a source of much confusion and frustration for many people who want to ejoy the benefits of HD but run into problems with large files that their computer can't seem to play or edit.

My new camera shoots video at full HD, which means an image resolution of 1920 by 1080 pixels at 60 frames per second. Using uncompressed video would cause the memory card to fill very fast, so fast in fact that even the fastest memory cards would not be able to keep up.

To compensate for the limited amount of storage speed and space the video (and audio) is compressed. There are many different video compression algorithms in existence, they all have different properties.

Read more »