Skip to content

foxdog-studios/peepers

Repository files navigation

Peepers

Peepers is a simple IP camera application for Android 2.3.3. Images from the device's camera are streamed to a client using Motion JPEG over HTTP. Peepers is designed to be educational and, as such, does not have many features (feel free to add some). Peepers is licensed under the Apache License, Version 2.0. See $REPO/LICENSE.txt for more information.

Checkout this Android Studio port (thanks afathman).

Setup

You'll need to setup the Android SDK and configure your system for Android development. If you're using Arch Linux, you can run

# $REPO/scripts/setup-arch.sh -a

to install the required packages and configure your system. Read and understand this script before running it: it's quite invasive.

Build and install

To build and install Peepers, run

# $REPO/scripts/build.sh -bi

Run build.sh with -h for more information. Alternatively, you can convert Peepers into an Android Eclipse project.

Usage

Start Peepers on an Android device that is connected to a network. Peepers will show the device's URL in the top-left of the screen. Then view the stream using one of the methods below.

Client test page

Open the client test page with a web browser.

# $BROWSER $REPO/client/minimal.html

and enter the device's URL into the text box.

So far, this has proven to be the most reliable way to view the stream. To include the stream in your own page, just add

<img src="http://xxx.xxx.xxx.xxx:yyyy/"/>

VLC

VLC will allow you to, among other things, record the stream.

# vlc http://xxx.xxx.xxx.xxx:yyyy/

Direct to browser

This is the dirtiest method. This has been tested on Chromium Version 24.0.1312.70, but it's a bit laggy.

Open a web browser and navigate to

http://xxx.xxx.xxx.xxx:yyyy/

Notes

  • You can change the port and JPEG quality from the settings screen.

  • The port must be between 1024 and 65535.

  • The JPEG quality must be between 0 and 100.

  • While streaming, Peepers logs the average frames per second over the last fifty frames.

Webcam streamer

Webcam streamer (in $REPO/tools/webcam-streamer) is a pure Java (i.e., it doesn't depend on the Android SDK) implementation of Motion JPEG of HTTP. It uses a webcam as it's source. Both the Android application and this tool share the same MJpegHttpStreamer.java file. So, you can change and test the underlying streaming code without having to worry about Android.

To run the tool, cd into the webcam-streamer directory and run

# ant run

While the tool is running, the stream should be available at http://localhost:8080/.

Acknowledgements

Peepers was developed with reference to (but not derived from) many sources. We've listed as many as we can remember.