jos149 schreef op vrijdag 13 juli 2018 @ 00:15:
nu heb ik even aan zitten kloten en heb ik ondekt na het installeren van het uv4L pakket dat mijn camera zijn locatie /dev/video0 is. Ik heb namelijk een foto weten te maken en bekijken. Daarna ben ik verder gaan testen en het volgende geprobeerd:
"platform": "Camera-ffmpeg-omx",
"cameras": [
{
"name": "Security Cam",
"videoConfig": {
"source": "-f uv4l -r 30 -s 1280x720 -i /dev/video0",
"maxStreams": 2,
"maxWidth": 1280,
"maxHeight": 720,
"maxFPS": 30
}
probleem is natuurlijk zoals je al verwachtte: het werkt niet! toch nog iemand die iets heefT?
Eerder had ik al een link geplaatst naar tested configurations met ffmpeg. Op deze pagina kwam ik onderstaande tegen. Heb je dat al geprobeerd?
Raspberry PI Zero W ( Jessie ) and official CAMERA MODULE V2
I had to build ffmpeg with "--enable-libx264" to be able to use the "-tune zerolatency" from ffmpeg.js, and with "--enable-omx" and "--enable-omx-rpi" to use the GPU encoding
I had to remove from the homebridge-camera-ffmpeg code (ffmpeg.js) the resolution and scale for stillImage and videoStream to switch back to GPU encoding, and I now get a decent 10~20 FPS with pretty good video quality and ffmpeg using ~12% CPU on the pi zero
Still image sometimes don't refresh in homekit App : Need to reboot the iPhone to get it back ...
config.json (credits @GeorgViehoever )
{
"platform": "Camera-ffmpeg",
"cameras": [
{
"name": "piCam",
"uploader": false,
"videoConfig": {
"source": "-re -f video4linux2 -i /dev/video0",
"stillImageSource": "-re -f video4linux2 -ss 0.9 -i /dev/video0 -vframes 1",
"maxStreams": 2,
"maxWidth": 1920,
"maxHeight": 1080,
"maxFPS": 30,
"vcodec": "h264_omx"
}
}
]
}