FrankDelporte
Published © GPL3+

Using a Raspberry Pi as HDMI camera

Yes, you can build your own Raspberry Pi HQ camera to use as an HDMI source for the ATEM Mini

BeginnerProtip1 hour3,944
Using a Raspberry Pi as HDMI camera

Things used in this project

Story

Read more

Code

Code snippet: check version of Debian and board

Plain text
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Raspbian
Description:	Raspbian GNU/Linux 11 (bullseye)
Release:	11
Codename:	bullseye

$ cat /proc/device-tree/model
Raspberry Pi Zero 2 Rev 1.0

Code snippet: setup to start the camera fullscreen on boot

Plain text
$ sudo apt update
$ sudo apt upgrade
$ sudo nano /etc/systemd/system/camera.start.service

[Unit]
Description=Start the camera fullscreen

[Service]
Type=simple
ExecStart=libcamera-hello --viewfinder-width 1920 --viewfinder-height 1080 -f -t 0 &

[Install]
WantedBy=multi-user.target

$ sudo chmod 644 /etc/systemd/system/camera.start.service
$ sudo systemctl enable camera.start.service
$ sudo systemctl start camera.start.service
$ sync
$ sudo reboot

Code snippet: check the camera service

Plain text
$ sudo systemctl status camera.start.service
● camera.start.service - Start the camera fullscreen
     Loaded: loaded (/etc/systemd/system/camera.start.service; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2021-12-12 19:17:07 CET; 9s ago
   Main PID: 891 (libcamera-hello)
      Tasks: 7 (limit: 409)
        CPU: 2.275s
     CGroup: /system.slice/camera.start.service
             └─891 libcamera-hello --viewfinder-width 1920 --viewfinder-height 1080 -f -t 0 &

Dec 12 19:17:08 raspberrypi libcamera-hello[891]: [0:05:40.618657773] [893]  INFO RPISTREAM rpi_stream.cpp:122 No buffers available for ISP Output0
Dec 12 19:17:08 raspberrypi libcamera-hello[891]: [0:05:41.156818620] [893]  INFO RPI raspberrypi.cpp:1636 Dropping frame at the request of the IPA (6 left)

Github: libcamera-apps

https://github.com/raspberrypi/libcamera-apps/issues/187

Credits

FrankDelporte

FrankDelporte

5 projects • 0 followers
Author of 'Getting started with Java on Raspberry Pi' - Java Champion - Team member Pi4J - Lead coach CoderDojo Belgium Ieper
Thanks to Adafruit and Lilifee.

Comments