Hello,
Souhaitant migrer mes caméras de MotionEye sous Frigate, je bute sur la configuration de 2 caméras USB branchés sur le pi accueillant HA supervised; je connais leur adresse /dev/video0 (une vieille Logitech Quickcam Ultra Vision) et /dev/video2 (une vieille Gopro Hero3) et elles sont visibles sous VLC ; j’ai beau faire preuve de tout le chamanisme (dixit @golfvert ), de nombreux essais et de recherches web (y compris éplucher https://docs.frigate.video/) mais je n’arrive toujours pas à les faire fonctionner; quelqu’un aurait-il une idée de la manière de les configurer ?
Voici les éléments que j’ai :
mqtt:
host: 192.168.1.40
user: xxxx
password: yyyy
client_id: frigate
topic_prefix: frigate
detectors:
coral:
type: edgetpu
device: usb
ffmpeg:
hwaccel_args:
- -c:v
- h264_v4l2m2m
- yuv420p
cameras:
camera13:
rtmp:
enabled: true # <-- RTMP should be disabled if your stream is not H264
ffmpeg:
inputs:
- path: /dev/video2 #video0 1ère USB cam Logitech et video2 2ème USB cam GoPRO Hero3
input_args: -f v4l2
roles:
- detect
- rtmp
- record
# input_args: -f v4l2 -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -use_wallclock_as_timestamps 1
# output_args:
# detect: -f rawvideo -pix_fmt yuv420p
# input_args: -f v4l2 -avoid_negative_ts -flags low_delay -strict experimental -fflags +genpts+discardcorrupt -use_wallclock_as_timestamps 1 -c:v mjpeg
# output_args:
# record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:a aac
# rtmp: -c:v libx264 -an -f flv
# input_args: -f video4linux2 -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -use_wallclock_as_timestamps 1
# output_args:
# record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:a aac
output_args:
rtmp: -vf transpose=2,transpose=2 -c:v libx264 -preset ultrafast -tune zerolatency -b:v 600k -f flv
record: -vf transpose=2,transpose=2 -c:v libx264 -preset ultrafast -tune zerolatency -b:v 600k -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -an
detect: -vf transpose=1 -f rawvideo -pix_fmt yuv420p
detect:
width: 1920 #paramètres vus sur VLC : video0 960 video2 1920
height: 1080 #paramètres vus video0 720 video2 1080
fps: 5 #paramètres vus video0 10 video2 5
enabled: true
# objects:
# track:
# - person
record: # <----- Enable recording
enabled: True
snapshots: # <----- Enable snapshots
enabled: True
le type d’erreurs :
[2023-01-22 00:14:00] watchdog.camera13 ERROR : Ffmpeg process crashed unexpectedly for camera13.
[2023-01-22 00:14:00] watchdog.camera13 ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
[2023-01-22 00:14:00] ffmpeg.camera13.detect ERROR : [NULL @ 0x557c819250] Unable to find a suitable output format for 'yuv420p'
[2023-01-22 00:14:00] ffmpeg.camera13.detect ERROR : yuv420p: Invalid argument
[2023-01-22 00:14:00] ffmpeg.camera13.detect ERROR : [video4linux2,v4l2 @ 0x557c817090] Some buffers are still owned by the caller on close.
[2023-01-22 00:14:00] ffmpeg.camera13.detect ERROR : ioctl(VIDIOC_QBUF): Bad file descriptor
[2023-01-22 00:14:00] frigate.video ERROR : camera13: Unable to read frames from ffmpeg process.
[2023-01-22 00:14:00] frigate.video ERROR : camera13: ffmpeg process is not running. exiting capture
voilà ce que donne ffprobe :
ffprobe /dev/video0
ffprobe version 4.3.5-0+deb11u1+rpt2 Copyright (c) 2007-2022 the FFmpeg developers
built with gcc 10 (Debian 10.2.1-6)
configuration: --prefix=/usr --extra-version=0+deb11u1+rpt2 --toolchain=hardened --incdir=/usr/include/aarch64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-mmal --enable-neon --enable-v4l2-request --enable-libudev --enable-epoxy --enable-sand --libdir=/usr/lib/aarch64-linux-gnu --arch=arm64 --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-vout-drm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 499994.665700, bitrate: 110592 kb/s
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 960x720, 110592 kb/s, 10 fps, 10 tbr, 1000k tbn, 1000k tbc
ffprobe /dev/video2
ffprobe version 4.3.5-0+deb11u1+rpt2 Copyright (c) 2007-2022 the FFmpeg developers
built with gcc 10 (Debian 10.2.1-6)
configuration: --prefix=/usr --extra-version=0+deb11u1+rpt2 --toolchain=hardened --incdir=/usr/include/aarch64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-mmal --enable-neon --enable-v4l2-request --enable-libudev --enable-epoxy --enable-sand --libdir=/usr/lib/aarch64-linux-gnu --arch=arm64 --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-vout-drm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
Input #0, video4linux2,v4l2, from '/dev/video2':
Duration: N/A, start: 501485.387962, bitrate: 165888 kb/s
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1920x1080, 165888 kb/s, 5 fps, 5 tbr, 1000k tbn, 1000k tbc