Out-of-the-box SD card image for live streaming with Raspberry Pi. It's easy as pie.
- Connect Raspberry Pi Camera Module (and optionally a USB microphone) to a Raspberry Pi.
- Download the SD card image from http://s.kyu-mu.net/picam-streamer-latest/. This image is based on Raspberry Pi OS (32-bit) Lite version 2020-05-27.
- Write the downloaded image to an SD card. Optionally, mount the image and create /boot/ssh empty file in order to automatically start SSH server on next boot.
- Boot the Raspberry Pi. SSH server will automatically start. If you want to disable SSH server, please do so via
sudo raspi-config. - Find out the Raspberry Pi's IP address. If you don't know how to find out the IP address, login to the Raspberry Pi with username
piand passwordraspberry, then runip acommand. To disable SSH server, runraspi-configand go to "Interfacing Options" > "SSH" menu. - Open http://RASPI_IP/view/ with Flash Player-enabled browser. Replace RASPI_IP with the Raspberry Pi's IP address. Alternatively, you can view the stream with VLC media player via rtsp://RASPI_IP:80/live/picam URL.
- If you use microphone, adjust microphone capture volume with
alsamixercommand. Press F6 to select your sound card, then press F4 to select "Capture" volume control. Use arrow keys to turn up or down the volume.
The expected latency of video is about a second. Also, please change your login password with passwd command.
Audio/video capture configuration is defined in /home/pi/picam-streamer/lib/server.js as follows.
picam = child_process.spawn('nice', ['-n', '-20', 'ionice', '-c1', '-n0', 'sudo', '-u', "#" + PICAM_UID, PICAM_PATH, '--rtspout', '--alsadev', 'hw:1,0'], {The arguments are the same as for picam. You can add arguments to the end like this:
picam = child_process.spawn('nice', ['-n', '-20', 'ionice', '-c1', '-n0', 'sudo', '-u', "#" + PICAM_UID, PICAM_PATH, '--rtspout', '--alsadev', 'hw:1,0', '--rotation', '180'], {After changing the parameters, run sudo service picam-streamer restart and the new configuration will be used.
Add disable_camera_led=1 to /boot/config.txt and reboot the Pi.
The SD card image contains the following components.
