Reader small image

You're reading from  Building a Home Security System with Raspberry Pi

Product typeBook
Published inDec 2015
Publisher
ISBN-139781782175278
Edition1st Edition
Right arrow
Author (1)
Matthew Poole
Matthew Poole
author image
Matthew Poole

Matthew Poole is a systems engineer based near Southampton on the south coast of England, with over 20 years of industry experience. After graduating in electronics and communications engineering, he went on to train as and become an air traffic engineer for Civil Aviation Authority, UK, working on microprocessor-based control and communications systems. Later, he became a software architect and mobile technology specialist, working for several consultancies and global organizations in both hands-on architecture and product-management roles . He is now a partner at Connecting Objects, a boutique systems consultancy focusing on the design of Bluetooth and other wireless-based IoT systems, taking ideas from concept to prototype. He is also the Director of Technology for Mobile Onboard, a leading UK-based transport technology company specializing in bus connectivity and mobile ticketing systems. He is also the author of Building a Home Security System with Raspberry Pi, Packt Publishing. You can find his blog at http://cubiksoundz.com and LinkedIn profile at https://www.linkedin.com/in/cubik, or you can reach him on Twitter at @cubiksoundz.
Read more about Matthew Poole

Right arrow

Be a video star


Now that we know our camera module is working, we can try and capture some video. To do this, we'll use the raspivid utility. The following command will take 5 seconds of high-definition video and save the file to your Raspberry Pi:

$ raspivid –o test.h264 –t 5000

You'll notice that file is called test.h264—this is because the video is captured as a raw H.264 video stream. Unfortunately, not many media players will handle these files (although VLC player will—it rocks and handles practically anything you throw at it—get it on your PC at www.videolan.org).

If you want to play the file on smartphones and conventional media players, then we will need to wrap it in a container format, such as MPEG-4, and give the file a .mp4 extension.

To do this, we'll use the GPAC package, which is an open source multimedia framework. It comes with a utility called MP4Box, which is a tool we'll use to create an MP4 container for our video file:

  1. First, install the GPAC package:

    $ sudo apt-get install...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Building a Home Security System with Raspberry Pi
Published in: Dec 2015Publisher: ISBN-13: 9781782175278

Author (1)

author image
Matthew Poole

Matthew Poole is a systems engineer based near Southampton on the south coast of England, with over 20 years of industry experience. After graduating in electronics and communications engineering, he went on to train as and become an air traffic engineer for Civil Aviation Authority, UK, working on microprocessor-based control and communications systems. Later, he became a software architect and mobile technology specialist, working for several consultancies and global organizations in both hands-on architecture and product-management roles . He is now a partner at Connecting Objects, a boutique systems consultancy focusing on the design of Bluetooth and other wireless-based IoT systems, taking ideas from concept to prototype. He is also the Director of Technology for Mobile Onboard, a leading UK-based transport technology company specializing in bus connectivity and mobile ticketing systems. He is also the author of Building a Home Security System with Raspberry Pi, Packt Publishing. You can find his blog at http://cubiksoundz.com and LinkedIn profile at https://www.linkedin.com/in/cubik, or you can reach him on Twitter at @cubiksoundz.
Read more about Matthew Poole