CHIP computer: USB webcam – take a photo and make a video

We know the CHIP computer, we connected to WiFi, we used UART, we tried WiFi speed connection and USB flashdisc, we measured power consumption during the boot and after boot and we blinked with LED.
Today, we use USB webcam. At first I wrote that’s very easy and you can you use it for a Raspberry Pi Zero, a Raspberry Pi, a BeagleBone, an Odroid and another SBC’s, where you use a debian or fork of the debian (an ubuntu, a minibian etc.). It’s very simple.

Articles about the CHIP computer:
CHIP computer: first sight and comparison with Raspberry Pi Zero – pizero
CHIP computer: connection to WiFi, SSH, UART
CHIP computer: speed of USB, WiFi, current consumption and pictures from thermal image
CHIP computer: flashing OS, python, LED and blinking of LED after boot
CHIP computer: USB webcam
CHIP computer: I2C bus – AD7415 temperature sensor

How I wrote, I use debian without graphical environments. I use only a SSH connection for communication with the CHIP computer.

Hence, I was looking for program for controlling of USB webcam in a terminal.

You execute:
sudo apt-get update

sudo apt-get upgrade

And then install this program fswebcam:
sudo apt-get install fswebcam

Take a picture:
fswebcam -r 640×480 –jpeg 85 -D 1 web-cam-shot.jpg
fswebcam program name
-r resolution
640×480 resolution of webcam
–jpeg format of picture
85 quality (in percent)
D delay
1 1s delay
web-cam-shot.jpg name of picture

Another helpful tips:
–flip (direction)
–rotate (angle)
–no-banner no labels and banner in picture

Everything you find in help of program:
fswebcam –help

What next? You can connect a PIR sensor and if the PIR sensor is active, the CHIP computer takes a photo. For example.

Make a video
sudo apt-get update

sudo apt-get upgrade

Install libav-tools:
sudo apt-get install libav-tools

This command checks resolutions:
avconv -f video4linux2 -list_formats all -i /dev/video0

Make a video:
avconv -f video4linux2 -r 30 -i /dev/video0 test.avi
ctrl+c causes stoping of rendering.
30 framerate

Source of information:
http://askubuntu.com/questions/106770/take-a-picture-from-terminal
https://libav.org/avconv.html


Share the article:
Show your
Maker soul!
Buy a T-Shirt
Coffee for Chiptron
Give a boost to the next article

Related Articles

Hooray. Another article is on the world. How to connect to WiFi, using SSH, using UART and how to connect CHIP computer to display/TV. Articles about CHIP computer: CHIP computer: first sight and comparison with Raspberry Pi Zero – pizero…

Another article about CHIP computer. In this article find speed of USB, WiFi, current consumption (during boot and after boot), log from boot pictures from thermal imager. Articles about CHIP computer: CHIP computer: first sight and comparison with Raspberry Pi…

How you could see on social networks, I recieved CHIP computer. Very popular kistarter project. But I would like to show comparison between CHIP computer and Raspberry Pi Zero – pizero. You find some important articles and pictures in this…

Until recently, Ethernet networks have been classified as networks for office applications. They are now becoming more common in industrial process control applications and even in safety systems applications. Ethernet networks have numerous advantages. What are those advantages? Let’s find…

CHIP computer contains I2C bus. You can connect a lot of sensors like temperature sensors, magnetometer, accelerometer. The sensors have to contain I2C bus of course. In this article, I show you how to do it. Articles about CHIP computer:…