Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Raspberry Pi] amendments to camera section #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions Raspberry_Pi.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,22 @@ which contains options for non-NTSC outputs.

## Camera
The commands for the camera module are included as part of the raspberrypi-firmware package:

```
$ /opt/vc/bin/raspistill
$ /opt/vc/bin/raspivid
```

Append to `/boot/config.txt`:
According to the [boot options documentation](https://www.raspberrypi.org/documentation/configuration/config-txt/boot.md) `start_x=1` loads the relevant Videocore firmware for camera operation. Additionally more GPU memory is required for compressing the camera data according to [Raspberry Pi forum](https://www.raspberrypi.org/forums/viewtopic.php?t=234778#p1436166). Append to `/boot/config.txt`:

```
gpu_mem=128
start_file=start_x.elf
fixup_file=fixup_x.dat
start_x=1
```
Optionally

disable_camera_led=1
Optionally append the line `disable_camera_led=1` if you have RPi camera v1.

After boot you should see `/dev/video0`, which will be used by camera applications and additional `/dev/video1*` devices, [which are memory to memory (M2M) devices for the video decoder, encoder, and ISP](https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=62364&p=1527503#p1527508).

The following is a common error:

Expand All @@ -112,13 +114,15 @@ mmal: Failed to run camera app. Please check for firmware updates
```

which can be corrected by setting these values in `/boot/config.txt`:

```
cma_lwm=
cma_hwm=
cma_offline_start=
```

Another common error:

```
mmal: mmal_vc_component_create: failed to create component 'vc.ril.camera' (1:ENOMEM)
mmal: mmal_component_create_core: could not create component 'vc.ril.camera' (1)
Expand All @@ -131,12 +135,6 @@ can be corrected by adding the following line to `/etc/modprobe.d/blacklist.conf

blacklist i2c_bcm2708

In order to use standard applications (those that look for `/dev/video0`) the
V4L2 driver must be loaded. This can be done automatically at boot by creating
an autoload file, `/etc/modules-load.d/rpi-camera.conf`:

bcm2835-v4l2

The V4L2 driver by default only allows video recording up to 1280x720, else it
glues together consecutive still screens resulting in videos of 4 fps or lower.
Adding the following options removes this limitation, `/etc/modprobe.d/rpi-camera.conf`:
Expand Down