From 3d478d7d5b19839b10b581b14be0140793fcbeb0 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Sun, 24 Nov 2024 17:01:37 +0100 Subject: [PATCH] Build FFmpeg with v4l2 support for Linux So that --v4l2-sink works with Linux static builds. --- .github/workflows/release.yml | 6 ++++-- app/deps/ffmpeg.sh | 8 +++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 13f4accf..4f7d0241 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -77,7 +77,8 @@ jobs: sudo apt update sudo apt install -y meson ninja-build nasm ffmpeg libsdl2-2.0-0 \ libsdl2-dev libavcodec-dev libavdevice-dev libavformat-dev \ - libavutil-dev libswresample-dev libusb-1.0-0 libusb-1.0-0-dev + libavutil-dev libswresample-dev libusb-1.0-0 libusb-1.0-0-dev \ + libv4l-dev - name: Test run: release/test_client.sh @@ -93,7 +94,8 @@ jobs: sudo apt update sudo apt install -y meson ninja-build nasm ffmpeg libsdl2-2.0-0 \ libsdl2-dev libavcodec-dev libavdevice-dev libavformat-dev \ - libavutil-dev libswresample-dev libusb-1.0-0 libusb-1.0-0-dev + libavutil-dev libswresample-dev libusb-1.0-0 libusb-1.0-0-dev \ + libv4l-dev - name: Build linux run: release/build_linux.sh diff --git a/app/deps/ffmpeg.sh b/app/deps/ffmpeg.sh index cc71ab13..386de190 100755 --- a/app/deps/ffmpeg.sh +++ b/app/deps/ffmpeg.sh @@ -81,8 +81,14 @@ else --enable-muxer=wav ) - if [[ "$HOST" != linux ]] + if [[ "$HOST" == linux ]] then + conf+=( + --enable-libv4l2 + --enable-outdev=v4l2 + --enable-encoder=rawvideo + ) + else # libavdevice is only used for V4L2 on Linux conf+=( --disable-avdevice