[Camera Support]: Raspberrypi-Cam on Synology 1221+
Describe the problem you are having
Hi, I have recently commissioned a Raspberry Pi cam and would like to explore the possibilities with Frigate. So Frigate is also new to me. The installation of Frigate via Portainer went without a problem. Now I have problems to configure the cam on my Rackstation from Synology 1221+ (AMD Ryzen V1500B) with Google Coral USB.
The protocol is full and I cannot integrate the camera stream: Protocol not supported, ffmpeg crashes, ... see log Maybe I have use a different hwaccel_args, preset-vaapi doesnt works
Version
0.13.1
Frigate config file
mqtt:
enabled: False
ffmpeg:
hwaccel_args: preset-vaapi
detectors:
coral:
type: edgetpu
device: usb
record:
enabled: False
retain:
days: 7
mode: motion
events:
retain:
default: 30
mode: motion
snapshots:
enabled: True
retain:
default: 30
cameras:
raspberrypi:
detect:
width: 1280
height: 720
fps: 5
ffmpeg:
inputs:
- path: rtsp://192.168.3.202:8554/stream
roles:
- detect
motion:
mask:
- 0,461,3,0,1919,0,1919,843,1699,492,1344,458,1346,336,973,317,869,375,866,432
Relevant log output
2024-02-09 23:53:14.339022851 [INFO] Preparing Frigate...
2024-02-09 23:53:14.780125415 [INFO] Starting Frigate...
2024-02-09 23:53:18.188539272 [2024-02-09 23:53:18] frigate.app INFO : Starting Frigate (0.13.1-34fb1c2)
2024-02-09 23:53:18.263406215 [2024-02-09 23:53:18] peewee_migrate.logs INFO : Starting migrations
2024-02-09 23:53:18.269236763 [2024-02-09 23:53:18] peewee_migrate.logs INFO : There is nothing to migrate
2024-02-09 23:53:18.273894013 [2024-02-09 23:53:18] frigate.app INFO : Recording process started: 444
2024-02-09 23:53:18.276967057 [2024-02-09 23:53:18] frigate.app INFO : go2rtc process pid: 89
2024-02-09 23:53:18.294797299 [2024-02-09 23:53:18] frigate.app INFO : Output process started: 451
2024-02-09 23:53:18.304576169 [2024-02-09 23:53:18] frigate.app INFO : Camera processor started for raspberrypi: 456
2024-02-09 23:53:18.308486550 [2024-02-09 23:53:18] frigate.app INFO : Capture process started for raspberrypi: 457
2024-02-09 23:53:18.330469294 [2024-02-09 23:53:18] detector.coral INFO : Starting detection process: 450
2024-02-09 23:53:18.384417551 [2024-02-09 23:53:18] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as usb
2024-02-09 23:53:21.000123682 [2024-02-09 23:53:18] frigate.video ERROR : raspberrypi: Unable to read frames from ffmpeg process.
2024-02-09 23:53:21.000274901 [2024-02-09 23:53:18] frigate.video ERROR : raspberrypi: ffmpeg process is not running. exiting capture thread...
2024-02-09 23:53:21.005369581 [2024-02-09 23:53:20] frigate.detectors.plugins.edgetpu_tfl INFO : TPU found
AND
2024-02-09T22:58:38.675894821Z 2024-02-09 23:58:38.675736941 [2024-02-09 23:58:38] watchdog.raspberrypi ERROR : Ffmpeg process crashed unexpectedly for raspberrypi.
2024-02-09T22:58:38.676379600Z 2024-02-09 23:58:38.675826561 [2024-02-09 23:58:38] watchdog.raspberrypi ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2024-02-09T22:58:38.676454540Z 2024-02-09 23:58:38.675962781 [2024-02-09 23:58:38] ffmpeg.raspberrypi.detect ERROR : [rtsp @ 0x55d39af58f40] method SETUP failed: 461 Unsupported transport
2024-02-09T22:58:38.676494280Z 2024-02-09 23:58:38.676083701 [2024-02-09 23:58:38] ffmpeg.raspberrypi.detect ERROR : rtsp://192.168.3.202:8554/stream: Protocol not supported
2024-02-09T22:58:39.134305249Z 2024-02-09 23:58:39.134198189 [2024-02-09 23:58:39] frigate.video ERROR : raspberrypi: Unable to read frames from ffmpeg process.
2024-02-09T22:58:39.134505919Z 2024-02-09 23:58:39.134347879 [2024-02-09 23:58:39] frigate.video ERROR : raspberrypi: ffmpeg process is not running. exiting capture thread...
2024-02-09T22:58:48.685505254Z 2024-02-09 23:58:48.685367064 [2024-02-09 23:58:48] watchdog.raspberrypi ERROR : Ffmpeg process crashed unexpectedly for raspberrypi.
2024-02-09T22:58:48.686148833Z 2024-02-09 23:58:48.685496804 [2024-02-09 23:58:48] watchdog.raspberrypi ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2024-02-09T22:58:48.686224582Z 2024-02-09 23:58:48.685646804 [2024-02-09 23:58:48] ffmpeg.raspberrypi.detect ERROR : [rtsp @ 0x555d50972f40] method SETUP failed: 461 Unsupported transport
2024-02-09T22:58:48.686269152Z 2024-02-09 23:58:48.685800133 [2024-02-09 23:58:48] ffmpeg.raspberrypi.detect ERROR : rtsp://192.168.3.202:8554/stream: Protocol not supported
2024-02-09T22:58:48.952015625Z 2024-02-09 23:58:48.951883965 [2024-02-09 23:58:48] frigate.video ERROR : raspberrypi: Unable to read frames from ffmpeg process.
2024-02-09T22:58:48.952201604Z 2024-02-09 23:58:48.952064745 [2024-02-09 23:58:48] frigate.video ERROR : raspberrypi: ffmpeg process is not running. exiting capture thread...
FFprobe output from your camera
Input #0, rtsp, from 'rtsp://192.168.3.202:8554/stream':
Metadata:
title : Unnamed
comment : N/A
Duration: N/A, start: 3057.590989, bitrate: N/A
Stream #0:0: Video: h264 (High), yuv420p(progressive), 1280x720, 5 fps, 2.50 tbr, 90k tbn
Frigate stats
No response
Operating system
Other
Install method
Docker Compose
Coral version
USB
Network connection
Wireless
Camera make and model
Raspberry pi zero 2 | Pi Cam v3
Any other information that may be helpful
Configuration Raspberry Pi Zero 2 via https://code.berrydejager.com/Libcamera-RTSP/
I use this for creating the stream: libcamera-vid -t 0 --inline --width 1280 --height 720 --framerate 5 --vflip -o - | cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554/stream}' :demux=h264
On VLC it works.
You need to use udp instead of tcp
To understand: The RTSP stream is at the moment TCP and must be sent in UDP, right? After this I have to use input_args: preset-rtsp-udp?
the rtsp stream is already UDP but frigate is expecting tcp. You should use the input args like you said
I replaced: cameras: raspberrypi: detect: width: 1280 height: 720 fps: 5 ffmpeg: inputs: - path: rtsp://192.168.3.202:8554/stream input_args: preset-rtsp-udp roles: - detect motion: mask: - 0,461,3,0,1919,0,1919,843,1699,492,1344,458,1346,336,973,317,869,375,866,432
and now I get following error messages:
2024-02-10T14:21:21.450013149Z 2024-02-10 15:21:21.449505120
[2024-02-10 15:21:21] watchdog.raspberrypi ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2024-02-10T14:21:21.450107189Z 2024-02-10 15:21:21.449612090
[2024-02-10 15:21:21] ffmpeg.raspberrypi.detect ERROR : Option hwaccel (use HW accelerated decoding) cannot be applied to output url vaapi -- you are trying to apply an input option to an output file or vice versa. Move this option before the file it belongs to.
2024-02-10T14:21:21.450195098Z 2024-02-10 15:21:21.449718119 [2024-02-10 15:21:21] ffmpeg.raspberrypi.detect ERROR : Error parsing options for output file vaapi.
2024-02-10T14:21:21.450244818Z 2024-02-10 15:21:21.449833959 [2024-02-10 15:21:21] ffmpeg.raspberrypi.detect ERROR : Error opening output files: Invalid argument
2024-02-10T14:21:26.264678915Z 2024-02-10 15:21:26.264555345 [2024-02-10 15:21:26] frigate.video ERROR : raspberrypi: Unable to read frames from ffmpeg process.
2024-02-10T14:21:26.265235614Z 2024-02-10 15:21:26.264710205 [2024-02-10 15:21:26] frigate.video ERROR : raspberrypi: ffmpeg process is not running. exiting capture thread...
2024-02-10T14:21:31.458362237Z 2024-02-10 15:21:31.458286507 [2024-02-10 15:21:31] watchdog.raspberrypi ERROR : Ffmpeg process crashed unexpectedly for raspberrypi.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.