Copyright © 2016 Lintest Systems, LLC – All rights reserved 11/27/2016
Using PiCapture
Because PiCapture works by emulating the Raspberry Pi Camera, you can use the same software that you would
normally use with a camera. For example, raspivid and the picamera library will both work with PiCapture.
There are some important considerations when using this software:
-
You should use the status LEDs on the PiCapture board to verify that it is operating properly and
receiving video. If the Blue “Video Detected” LED is not lit, you may receive an MMAL error if you
attempt to capture video.
-
The resolution of the “camera mode” selected should correspond to the resolution of the video source.
For PiCapture HD1, the green “Format” LEDs indicate the detected resolution. Please refer to the table
below.
-
The Raspberry Pi camera drivers will attempt to “correct” the video received as if it were the camera. It
will improve the quality of the PiCapture image to disable some of these functions. As an example, the
Automatic White Balance function does not generally help with PiCapture.
The following command will show 1080p video in a preview window, with the AWB and exposure control
functions turned off:
raspivid –md 1 –awbg 1.0,1.0 –awb off –ex off -o
It is recommended that you use these command line switches for the highest quality video captures.
Captured video can be optimized by using other command line switches available in raspivid such as --
sharpness
(-sh),
--contrast (-co)
,
--brightness (-br)
, and
--saturation (-sa)
. Consult the raspivid documentation for more
information.
For some HDMI sources you may consider reducing both the brightness and saturation levels with the PiCapture
HD1.
Because the frame rate is dependent upon the video source, playback of a recorded video may not be at the
same rate and it will likely appear to be “slowed down”. One way to correct this is with the program “MP4box”,
which will package the recorded video with a wrapper that specifies the frame rate.
To install this software, use the command:
sudo apt-get install gpac
Then, run the program using:
MP4Box –fps 60 –add xxx.h264 yyy.mp4
This takes an h.264 format video named “xxx” and create an mp4 file named “yyy” with the frame rate specified.
You may also use the PiVideo Control Software to reduce the captured frame rate by half, with the “—skip”
option. This will, for example, cause source vide at 60fps to be captured at 30fps which will match the default
camera frame rate.
PiCapture has two video inputs, and will attempt to search these inputs for a valid source automatically. As an
alternative, you can specify the desired source using the PiVideo control software or from application software
using the PiVideo class.