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).
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.
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.
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.
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 will allow you to, among other things, record the stream.
# vlc http://xxx.xxx.xxx.xxx:yyyy/
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/
-
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 (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/
.
Peepers was developed with reference to (but not derived from) many sources. We've listed as many as we can remember.
-
Early versions of Peepers where based on Simon Guigui's Spydroid under the GNU General Public License v3.0.
-
The code that captures images from a webcam is base on a StackOverflow answer from gt_ebuddy.
-
The code that implements Motion JPEG over HTTP is base on a StackOverflow answer by Managarm.