~krystianch/raspiwhip

Like raspivid but with WHIP support

10a669f Fix uninitialized use of hdr variable

2 months ago

2c75a7a Fix infinite loop on error while shutting down

2 months ago

#raspiwhip

Like raspivid but with WHIP support.

Send low-latency video streams using WebRTC-HTTP ingestion protocol.

This project uses the legacy Raspberry Pi camera stack.

#Dependencies

On Alpine Linux:

apk add meson gcc musl-dev pkgconf raspberrypi-userland-dev cmake \
    libdatachannel-dev curl-dev libscfg-dev

#GPU Firmware

To run this program you need to load GPU firmware that supports the legacy camera stack. It's distributed in the form of files with names start_x.elf and fixup_x.dat. Make sure they are present in the /boot directory. If they're not, you may download them from raspberrypi/firmware on GitHub or, on Alpine Linux, from the repositories apk add raspberrypi-bootloader-experimental.

To load the firmware add the following directives to /boot/config.txt and reboot.

start_file=start_x.elf
fixup_file=fixup_x.dat
gpu_mem=80

In order for the legacy camera stack to work this file must not include directives like camera_auto_detect or dtoverlay=vc4-kms-v3d,cma-256. These directives enable the libcamera-based stack.

#Building

# Prepare
meson setup build

# You may need to help pkg-config find libmmal
PKG_CONFIG_PATH=/opt/vc/lib/pkgconfig/ meson setup build

# Build
meson compile -C build

# Recommended on Raspberry Pi 1
meson compile -C build -j 1

Binary will be built at build/raspiwhip.

#Usage

raspiwhip -c config.scfg -o 'http://example.com/whip'

Works well with whipd.

#Community

Join #krystianch on Libera.Chat or send an email to the mailing list for support or discussions.

#Contributing

Send patches to the mailing list or Codeberg pull requests, report bugs on the issue tracker.

#License

GPLv3, see COPYING.

Copyright (C) 2024 Krystian ChachuĊ‚a