Copyright © 2016 Lintest Systems, LLC – All rights reserved 09/17/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 SD1, this is always 640x480.
-
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 640x480 video in a preview window, with the AWB and exposure control
functions turned off:
raspivid –md 6 –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.
The Raspberry Pi camera has a variety of different modes. The PiCapture SD1 will only produce video from
standard definition NTSC and PAL sources, sampled to 640x480 resolution. It is recommended to use “mode 6”
for raspivid, raspistill, or other programs using the mmal drivers.
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 through the use of a 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.
PiCapture has multiple 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. Not all combinations of source inputs are valid.
With the PiCapture SD1 you could have:
-
Three independent composite sources
-
An S-Video source, and one additional composite source
-
A single YPbPr component video source.