Py Live Cam

Setup for a Raspberry Pi live camera with Python.

Based on the Raspbian Jessy image:
https://www.raspberrypi.org/downloads/raspbian/

For the VGA Hat check the modifications here:
http://paperpcb.dernulleffekt.de/doku.php?id=raspberry_boards:raspberry_vga_board


Some Mods

Remove the splash screen:

$ sudo nano /boot/cmdline.txt

delete:

splash

Enable camera:

$ sudo raspi-config

enable camera

Disable camera light:

sudo nano /boot/config.txt

add:

# Disable camera light
disable_camera_led=1

Install some software:

$ sudo apt-get install git htop cmake

Install Python Modules

$ sudo apt-get update

Install Pip:

$ sudo apt-get install python-pip

Install python picamera:
PiCamera

$ sudo apt-get install python-picamera

Install python omxplayer:
Python OMXPlayer


Python Live Cam

$ mkdir picam
$ cd picam

Download the program:

autostart: /etc/rc.local

shutdownbutton (pin 22): /home/pi/pictures_of_an_exhibition/shutdownbutton_02.py

camera: /home/pi/pictures_of_an_exhibition/simple_camera.py


Network configuration

SD card read-only

Set the SD card to a read-only mode.
Read-Only SDcard


HDMI settings

Check the current HDMI state:

$ tvservice -s

List of CEA supported modes:

$ tvservice –m CEA

List of DMT supported modes:

$ tvservice –m DMT

Choose the prefered mode, DMT work best with HDMI beamer and monitors.
CEA is hdmi_group=1
DMT is hdmi_group=2

Open config file:

$ sudo nano /boot/config.txt

change for example CEA 720p:

hdmi_group=1
hdmi_mode=4

Low level changes for DMT 640×480 60 Hz would be:

hdmi_group=2
hdmi_mode=4

All modes are on: http://elinux.org/RPiconfig


Change H264 to mp4

$ sudo apt-get install gpac
$ MP4Box -add filename.h264 filename.mp4

—-