Closed kdjordjev closed 2 years ago
I have the AD110 as well and recording works for me. I think you're missing the output args. Here's the relevant part of my config for reference, hope it helps:
cameras: doorbell_cam: ffmpeg: input_args: -hide_banner -loglevel warning -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 output_args: detect: -f rawvideo -pix_fmt yuv420p record: -f segment -segment_time 3 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an -vsync 0 -enc_time_base -1 inputs:
EDIT: Sorry, not sure how to preserve formatting here
Hi Blakeblackshear Thank you for the response. I used the default output arguments.
Regardless. i changed to what you provided, but still have the same issue. Camera can be viewed, detection works, but i can not record clips. Below is the detailed debug configuration for this camera
Is there any way to debug it? Any limitation on number of cameras? Anything else The only difference i see between the hickvision and AD110 is the frame rate (Hick is 6fps / AD is more)
I disabled one of the other cameras, but no effect as well (in case there was a limitation of the number of cameras) K
full command:
ffmpeg -hide_banner -loglevel warning -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p -avoid_negative_ts make_zero -flags low_delay -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -i @.***:554/cam/realmonitor?channel=1&subtype=01 -f segment -segment_time 3 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an -vsync 0 -enc_time_base -1 /tmp/cache/front_door-%Y%m%d%H%M%S.mp4 -c copy -f flv rtmp://127.0.0.1/live/front_door -r 6 -s 640x480 -f rawvideo -pix_fmt yuv420p pipe:",
"front_door": {
"best_image_timeout": 60,
"detect": {
"enabled": true,
"fps": 6,
"height": 480,
"max_disappeared": 25,
"width": 640
},
"ffmpeg": {
"global_args": [
"-hide_banner",
"-loglevel",
"warning"
],
"hwaccel_args": [
"-hwaccel",
"vaapi",
"-hwaccel_device",
"/dev/dri/renderD128",
"-hwaccel_output_format",
"yuv420p"
],
"input_args": "-avoid_negative_ts make_zero -flags low_delay
-fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1", "inputs": [ { "global_args": [], "hwaccel_args": [], "input_args": [], "path": @.:554/cam/realmonitor?channel=1&subtype=01", "roles": [ "detect", "rtmp", "record" ] } ], "output_args": { "detect": [ "-f", "rawvideo", "-pix_fmt", "yuv420p" ], "record": "-f segment -segment_time 3 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an -vsync 0 -enc_time_base -1", "rtmp": [ "-c", "copy", "-f", "flv" ] } }, "ffmpeg_cmds": [ { "cmd": "ffmpeg -hide_banner -loglevel warning -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p -avoid_negative_ts make_zero -flags low_delay -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -i @.:554/cam/realmonitor?channel=1&subtype=01 -f segment -segment_time 3 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an -vsync 0 -enc_time_base -1 /tmp/cache/front_door-%Y%m%d%H%M%S.mp4 -c copy -f flv rtmp://127.0.0.1/live/front_door -r 6 -s 640x480 -f rawvideo -pix_fmt yuv420p pipe:", "roles": [ "detect", "rtmp", "record" ] } ], "live": { "height": 360, "quality": 8 }, "motion": { "contour_area": 74, "delta_alpha": 0.2, "frame_alpha": 0.2, "frame_height": 180, "mask": "", "threshold": 25 }, "mqtt": { "bounding_box": true, "crop": true, "enabled": true, "height": 270, "quality": 70, "required_zones": [], "timestamp": true }, "name": "front_door", "objects": { "filters": { "bicycle": { "mask": null, "max_area": 24000000, "min_area": 0, "min_score": 0.5, "threshold": 0.7 }, "dog": { "mask": null, "max_area": 24000000, "min_area": 0, "min_score": 0.5, "threshold": 0.7 }, "person": { "mask": null, "max_area": 24000000, "min_area": 0, "min_score": 0.5, "threshold": 0.7 } }, "mask": "", "track": [ "person", "dog", "bicycle" ] }, "record": { "enabled": true, "events": { "max_seconds": 300, "objects": null, "post_capture": 0, "pre_capture": 10, "required_zones": [ "front_step" ], "retain": { "default": 7, "objects": {} } }, "retain_days": 0 }, "rtmp": { "enabled": true }, "snapshots": { "bounding_box": true, "clean_copy": true, "crop": false, "enabled": true, "height": null, "quality": 70, "required_zones": [ "front_step" ], "retain": { "default": 7, "objects": {} }, "timestamp": true }, "timestamp_style": { "color": { "blue": 255, "green": 255, "red": 255 }, "effect": null, "format": "%m/%d/%Y %H:%M:%S", "position": "tl", "thickness": 2 }, "zones": { "front_step": { "coordinates": "93,354,556,364,640,480,0,480", "filters": {}, "objects": [] } } },
On Thu, Oct 21, 2021 at 2:51 AM jaytea33 @.***> wrote:
I have the AD110 as well and recording works for me. I think you're missing the output args. Here's the relevant part of my config for reference, hope it helps:
cameras: doorbell_cam: ffmpeg: input_args: -hide_banner -loglevel warning -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 output_args: detect: -f rawvideo -pix_fmt yuv420p record: -f segment -segment_time 3 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an -vsync 0 -enc_time_base -1 inputs:
- path: rtsp:// @.***:554/cam/realmonitor?channel=1&subtype=1
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/blakeblackshear/frigate/issues/2068#issuecomment-948444635, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGLINQCOSL6MLV66I5IIMOLUH7PDHANCNFSM5GNA3W3A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
The comment above wasn't from me. I wouldn't use those output args suggested by another user. Do you see the live stream for the camera without recordings in the UI? If so, can you check to see if there are files being created in /tmp/cache
or /media/frigate/recordings
for that camera?
Sorry.. my mistake ..
i can see the stream form the camera in the GUI/live view
I get the events / object recognition with snapshots
I do not get any recordings / videos, this is the only issue
I believe it is setup correctly following the well made documentation (thank you for that)
I do not get any recordings in the /media/frigate/recordings from this camera (i get from the other three cameras)
I do see a recording in the /tmp/cache from the "front_door" with is huge - 1.7GB. It seems the large file does not get split into smaller chunks of 10s clips .
Attaching screenshots
Are you still using the configuration from the original post? Something is preventing ffmpeg from properly splitting the segments for the cache file. Typically I have seen this happen when users have custom args defined.
Thanks for the quick reply.
Originally i used the Default settings, now is below . Both cases the same behavior
record": "-f segment -segment_time 3 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an -vsync 0 -enc_time_base -1",
record": "-f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an ",
ffmpeg -hide_banner -loglevel warning -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p -avoid_negative_ts make_zero -flags low_delay -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -i @.***:554/cam/realmonitor?channel=1&subtype=01 -f segment -segment_time 3 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an -vsync 0 -enc_time_base -1 /tmp/cache/front_door-%Y%m%d%H%M%S.mp4 -c copy -f flv rtmp://127.0.0.1/live/front_door -r 6 -s 640x480 -f rawvideo -pix_fmt yuv420p pipe:",
Can you try again without the custom args? The vsync parameter in particular has a known issue with segments and causes the behavior you see in the cache where the file grows forever.
Thank you ... ! Found the issue It was in the input arguments "-flags low_delay" which causes somehow the file not to split .
input_args: ... -flags low_delay ....
It is interesting, since the live view of the camera was working. Perhaps the low delay combined with some of the output arguments referring to the timestamp. "-reset_timestamps 1 -strftime 1" .. sorry i do not understand them..
In any case works without the "low_delay"
thanks alot .. awesome product !!!
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.
Thank you ... ! Found the issue It was in the input arguments "-flags low_delay" which causes somehow the file not to split .
input_args: ... -flags low_delay ....
It is interesting, since the live view of the camera was working. Perhaps the low delay combined with some of the output arguments referring to the timestamp. "-reset_timestamps 1 -strftime 1" .. sorry i do not understand them..
In any case works without the "low_delay"
thanks alot .. awesome product !!!
Is this still working for you? I'm having the exact same problem, issue 2359
Yes. It has been working flawlessly since thenSent from my Galaxy -------- Original message --------From: aforch @.> Date: 12/3/21 12:00 AM (GMT-08:00) To: blakeblackshear/frigate @.> Cc: kdjordjev @.>, Author @.> Subject: Re: [blakeblackshear/frigate] [Support]: One out of 4 cameras does not record clips (Issue #2068)
Thank you ... ! Found the issue It was in the input arguments "-flags low_delay" which causes somehow the file not to split . input_args: ... -flags low_delay .... It is interesting, since the live view of the camera was working. Perhaps the low delay combined with some of the output arguments referring to the timestamp. "-reset_timestamps 1 -strftime 1" .. sorry i do not understand them.. In any case works without the "low_delay" thanks alot .. awesome product !!!
Is this still working for you? I'm having the exact same problem, issue 2359
—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.Triage notifications on the go with GitHub Mobile for iOS or Android.
Yes. It has been working flawlessly since thenSent from my Galaxy
Could you share your current config and frigate version please?
Nothing special. Just using the baseline settings. (below) Since the issue happened on only one one camera, my speculation is something to do with the time synchronization (i.e. the camera time stamp compared to the ffmpeg time) The camera which failed had the lowest latency. When i used the "-flags low_delay" flag the camera time was faster compared to ffmpeg and ffmpeg failed to split for snapshots. My other 5 cameras had different timestamp, were slower and they worked without issue. I removed the "-flags low_delay" flag for that specific camera , it added some more latency to it (~1s) and the splitting was fine I assume the same could be achieved with some other way to adjust camera timestamp
Starting Frigate (0.9.4-26ae608) Hassio add on: Frigate NVR 2.3
cameras:
front_door: ffmpeg: input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 inputs:
front_door_zone record: events: required_zones:
back_yard: ffmpeg: inputs:
ffmpeg: input_args: -avoid_negative_ts make_zero -flags low_delay -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 hwaccel_args:
birdseye: enabled: True height: 360 width: 640
rtmp: enabled: True
live: height: 360
rtmp: enabled: True
record: enabled: True retain_days: 0 events: max_seconds: 300 pre_capture: 10 post_capture: 0 retain: default: 7
snapshots: enabled: True timestamp: True bounding_box: True retain: default: 7
detectors: coral: type: edgetpu device: usb
objects: track:
detect: width: 640 height: 360 fps: 6 enabled: True max_disappeared: 30 `
Thanks for the reply. I tried your config but I still don't get any recording when using it. My camera timestamp runs approximately 1-2 seconds behind the ffmpeg timestamp, so I'm not sure where the problem is coming from
Im having a similar issue with my ad-110, 3 other cameras record clips no problem
Describe the problem you are having
I have 4 cameras , 3 Hikvision and one Amcrest AD110 doorbell All of the cameras work perfectly fine for object detection, birthview or live view the 3 Hikvision record video clips, while the Amcrest can not record clips. (wifi connected)
I can not see any errors in the Frigate NRV Log window , but i have no recordings form the Camera = front_door.
Please help on how to debug this? Any suggestion on resolving the issue?
Version
2.0 as Home Assistant Add On , haasio OS
Frigate config file
Relevant log output
FFprobe output from your camera
Frigate stats
No response
Operating system
HassOS
Install method
HassOS Addon
Coral version
CPU (no coral)
Network connection
Mixed
Camera make and model
Amcrest AD110
Any other information that may be helpful
I tested with the baseline ffmpg flags and with an additional "-flags low_delay" with no difference in behaviour