diff --git a/.dockerignore b/.dockerignore index f327c60aa53..516b04886cd 100644 --- a/.dockerignore +++ b/.dockerignore @@ -4,5 +4,5 @@ /coverage*.txt /apidocs/*.html /internal/servers/hls/hls.min.js -/internal/protocols/rpicamera/exe/text_font.h +/internal/protocols/rpicamera/exe/text_font.* /internal/protocols/rpicamera/exe/exe diff --git a/.gitignore b/.gitignore index 66f361215d0..cb096347a7f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,5 @@ /coverage*.txt /apidocs/*.html /internal/servers/hls/hls.min.js -/internal/protocols/rpicamera/exe/text_font.h +/internal/protocols/rpicamera/exe/text_font.* /internal/protocols/rpicamera/exe/exe diff --git a/README.md b/README.md index a931ce0f334..b62da770556 100644 --- a/README.md +++ b/README.md @@ -472,7 +472,7 @@ The resulting stream will be available in path `/cam`. _MediaMTX_ natively supports the Raspberry Pi Camera, enabling high-quality and low-latency video streaming from the camera to any user, for any purpose. There are a couple of requirements: -1. The server must run on a Raspberry Pi, with Raspberry Pi OS bullseye or newer as operative system. Both 32 bit and 64 bit operative systems are supported. +1. The server must run on a Raspberry Pi, with Raspberry Pi OS Bullseye as operative system. Both 32 bit and 64 bit architectures are supported. 2. Make sure that the legacy camera stack is disabled. Type `sudo raspi-config`, then go to `Interfacing options`, `enable/disable legacy camera support`, choose `no`. Reboot the system. diff --git a/internal/protocols/rpicamera/exe/Makefile b/internal/protocols/rpicamera/exe/Makefile index d2a19012ddc..65c5e796478 100644 --- a/internal/protocols/rpicamera/exe/Makefile +++ b/internal/protocols/rpicamera/exe/Makefile @@ -36,6 +36,14 @@ OBJS = \ all: exe +TEXT_FONT_URL = https://github.com/IBM/plex/raw/v6.4.2/IBM-Plex-Mono/fonts/complete/ttf/IBMPlexMono-Medium.ttf +TEXT_FONT_SHA256 = 0bede3debdea8488bbb927f8f0650d915073209734a67fe8cd5a3320b572511c + +text_font.ttf: + wget -O text_font.tmp $(TEXT_FONT_URL) + H=$$(sha256sum text_font.tmp | awk '{ print $$1 }'); [ "$$H" = "$(TEXT_FONT_SHA256)" ] || { echo "hash mismatch; got $$H, expected $(TEXT_FONT_SHA256)"; exit 1; } + mv text_font.tmp $@ + text_font.h: text_font.ttf xxd --include $< > text_font.h diff --git a/internal/protocols/rpicamera/exe/text_font.ttf b/internal/protocols/rpicamera/exe/text_font.ttf deleted file mode 100644 index 54927d50fdd..00000000000 Binary files a/internal/protocols/rpicamera/exe/text_font.ttf and /dev/null differ diff --git a/scripts/binaries.mk b/scripts/binaries.mk index c9693fc306d..b49d755cbd0 100644 --- a/scripts/binaries.mk +++ b/scripts/binaries.mk @@ -3,14 +3,14 @@ BINARY_NAME = mediamtx define DOCKERFILE_BINARIES FROM $(RPI32_IMAGE) AS rpicamera32 RUN ["cross-build-start"] -RUN apt update && apt install -y --no-install-recommends g++ pkg-config make libcamera-dev libfreetype-dev xxd +RUN apt update && apt install -y --no-install-recommends g++ pkg-config make libcamera-dev libfreetype-dev xxd wget WORKDIR /s/internal/protocols/rpicamera/exe COPY internal/protocols/rpicamera/exe . RUN make -j$$(nproc) FROM $(RPI64_IMAGE) AS rpicamera64 RUN ["cross-build-start"] -RUN apt update && apt install -y --no-install-recommends g++ pkg-config make libcamera-dev libfreetype-dev xxd +RUN apt update && apt install -y --no-install-recommends g++ pkg-config make libcamera-dev libfreetype-dev xxd wget WORKDIR /s/internal/protocols/rpicamera/exe COPY internal/protocols/rpicamera/exe . RUN make -j$$(nproc)