Open nsayer opened 11 months ago
The config didn't work for me. I had to move videoProcessor to the top level.
Process does not terminate after video stops. Any workarounds?
A new and improved version.
First, here's the fake FFmpeg script:
#! /bin/sh
export TUNE=/usr/share/libcamera/ipa/rpi/pisp/imx219_noir.json
killall libcamera-vid
option=$1; shift
if [ $option = video ]; then
libcamera-vid -n --tuning-file $TUNE --codec yuv420 --width 1280 --height 720 --framerate 15 -t 0 -o - | exec ffmpeg -f rawvideo -pix_fmt yuvj420p -s:v 1280x720 -framerate 15 -i - "$@"
elif [ $option = still ]; then
libcamera-jpeg -n --tuning-file $TUNE --width 1280 --height 720 -t 1 -o - | exec ffmpeg -i - "$@"
else
exec ffmpeg $option $@
fi
And simply use "video" as the "source" and "still" as the "stillImageSource". Lastly, use "libx264" as the "vcodec".
Manufacturer/Model:
Raspberry Pi camera with the new libcamera support enabled.
This allows you to use the tuning files for noir cameras (among other things).
It's a particularly ugly hack - you use a shell script that pipes the output of either libcamera-vid or libcamera-jpeg into ffmpeg
Homebridge Config:
Additional Information:
This is the fakeffmpeg script: