Reader small image

You're reading from  Raspberry Pi Essentials

Product typeBook
Published inApr 2015
Publisher
ISBN-139781784396398
Edition1st Edition
Right arrow
Author (1)
Jack Creasey
Jack Creasey
author image
Jack Creasey

Jack Creasey has been in the technology industry for more than 30 years, the last 15 years as a Senior Program Manager in hardware and software design. His expertise includes designing, developing, and teaching IT courseware. He is an avid inventor and holds 13 patents in hardware and software design. After retiring early from the computing industry, Jack avidly participates in social network groups that share his passion for next generation technology solutions.
Read more about Jack Creasey

Right arrow

Project 1 – Running raspivid as a background service


Let's set up raspivid so that, as it runs in the background, we can simply send a message to the process to stop or start video acquisition. This setup can also work for taking snapshot still images with raspistill too.

The script we will create allows you to easily control rapsivid from the command line. The command line in the script that instantiates the raspivid process looks like this:

sudo raspivid -w 800 -h 600 -i pause -n -o /media/data/video/test%03d.h264 -sg 10000 -s -t 0 &
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Raspberry Pi Essentials
Published in: Apr 2015Publisher: ISBN-13: 9781784396398

Author (1)

author image
Jack Creasey

Jack Creasey has been in the technology industry for more than 30 years, the last 15 years as a Senior Program Manager in hardware and software design. His expertise includes designing, developing, and teaching IT courseware. He is an avid inventor and holds 13 patents in hardware and software design. After retiring early from the computing industry, Jack avidly participates in social network groups that share his passion for next generation technology solutions.
Read more about Jack Creasey

Code

Description

raspivid

This could also be raspistill or raspiyuv with different options. For more details, visit

http://www.raspberrypi.org/documentation/usage/camera/raspicam/README.md.

-w 800
-h 600

This sets the height and width of the captured image.

-i pause

This starts the playback in a paused state.

-n

This sets the no-preview window. If you want preview, you can remove this flag and add either –f for a fullscreen preview or the ...