Raspberry Pi_Kor_22.0 Chapter 22 멀티미디어 활용

Chapter 22 멀티미디어 활용

Chapter 주요 내용

여기서는 Raspberry Pi camera를 사용하기 위한 기초적인 지식을 먼저 설명하고 있다. 그 다음에는 Raspberry Pi camera를 이용하여 사진과 동영상을 촬영하는 방법을 설명하고 있으며, 촬영된 사진과 동영상의 내용을 확인하는 방법도 제시하고 있다.

아울러 이러한 동영상을 외부 컴퓨터에서 확인하거나 인터넷으로 방송하는 방법을 설명하고 있으며, 촬영한 동영상에서 실시간으로 움직임을 감지하여 기록하고 통지하는 방법에 대해서도 제시하고 있다.

다음과 같은 항목에 대한 내용을 포함하고 있다.
■ Raspberry Pi camera 기본

■ Raspberry Pi camera 처리 API

■ Raspberry Pi camera를 이용한 사진 및 동영상 촬영

■ 동영상 내용 확인하기

■ 동영상을 외부 컴퓨터에서 보기

■ 동영상을 인터넷으로 방송하기

■ motion 감지 web camera 구축

■ E-Mail 사용하기

Raspberry Pi_Eng_22.2.2 MUTT Program – Mail Transmitting Auxiliary Tool

22.2.2 Program – Mail Transmitting Auxiliary Tool

As described in the previous section, ff you have only mail transport agent, you can send mail, but there are many inconveniences. When sending mail from the Shell, we have to enter a sender, a recipient, a body of the mail, etc. in the mail contents at once, and we can not transmit an attachment file.

Raspberry Pi_Eng_22.2.1 SSMTP Program – Mail Transfer Agent

22.2 Using E-mail

22.2.1 Program – Mail Transfer Agent

We can send E-mails to others via our own E-mail server, such as gmail.com or hanmail.net usually with outlook or other tools.

We can send E-mail via E-mail server that we use through Raspberry Pi also. To do this, we need a MTA(Mail Transfer Agent) program that sends E-mail by connecting to E-mail server.

Raspberry Pi_Eng_22.1.8 Motion Detecting Web Camera – Motion Program

22.1.8 Motion Detecting Web Camera – Program

22.1.8.1 Framework to Access Camera via Web

program is a program that monitors video signals coming from a camera. It has the ability to detect if there is a significant change in the image, that is, motion. This program not only has a function to view the contents on the web in real time by transmitting a video taken by a camera to the Internet, but also has a function of storing the motion as an image or video when a motion is detected on the screen.

Raspberry Pi_Eng_22.1.6 Viewing Video on an External Computer

22.1.6 Viewing Video on an External Computer

Here we talk about how to view video taken in Raspberry Pi on an external computer through a network.

There are a number of ways to view video over the network, but here we explain the way to use program.

22.1.6.1 Basic framework to Transmit/Receive Video Data

Here, we want to use the following framework for video transmission and reception.

Raspberry Pi_Eng_22.1.5 Converting Video Format Using FFMPEG Program

22.1.5 Converting Video Format Using Program

Video taken by Raspberry Pi camera use “H.264” format, which is a format that is not widely used by ordinary users. You can use program to convert it to a popular video format.

● Installing program

To use program, you need to install it as follows:

Raspberry Pi_Eng_22.1.4 Playing Video Contents

22.1.4 Playing Video Contents

Here, we’ll look at the tools that can be used to play videos on the Raspberry Pi system.

22.1.4.1 Playing Video Using Program

OMXPlayer is a program installed in Raspberry Pi system by default. It can play not only video files recorded with Raspberry Pi camera but also general videos in Raspberry Pi system.

Raspberry Pi_Eng_22.1.3 Taking Picture and Video Using Pi Camera

22.1.3 Taking Picture and Video Using Pi Camera

22.1.3.1 Overview of Shooting Command for Pi Camera

With Raspberry Pi’s dedicated camera, you can run the following commands. They have functions that can shoot a still image or take a movie according to a command.

■ “raspistill” command

. This command captures still images. The captured image is saved as “jpg” file.

Raspberry Pi_Eng_22.1.2 Processing API for Raspberry Pi Camera

22.1.2 Processing API for Raspberry Pi Camera

In the Raspberry Pi system, MMAL method and V4L2 method can be used as processing API for the Raspberry Pi camera function.

22.1.2.1 MMAL (Multi-Media Abstraction Layer)

The Raspberry Pi A+/B+ system uses a BCM2835 system board made by the Broadcom, where the graphics processing GPU is VideoCore Ⅳ.