Closed dsanner closed 1 year ago
If you check /tmp/cache do you see recordings files for that camera?
in docker bash ls -all -h shows:
-rw-r--r-- 1 root root 420M Mar 3 16:28 livingroomtokitchen-20230303155605.mp4
Okay, so that means something is wrong with the Timestamps so the recording never closes.
Maybe try preset-rtsp-restream for that camera and see what happens.
Okay I tried that with and without go2rtc... it still just grows in the tmp/cache and doesn't ever get transferred. For go2rtc I tried using go2rtc with a few different input args.
ffmpeg:
hwaccel_args: preset-nvidia-h264
rtsp: " -fflags nobuffer -flags low_delay -timeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_transport tcp -i {input}"
testrtsp: "-timeout 5000000 -analyzeduration 1000M -probesize 1000M -strict experimental -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt low_delay -correct_ts_overflow 0 -use_wallclock_as_timestam
test2rtsp: " -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -rtsp_transport tcp -i {input}"
ps 1 -rtsp_transport tcp -i {input}"
livingroomtokitchen:
#amcrest
- rtsp://admin:pass@10.0.0.47/cam/realmonitorchannel=1&subtype=0&authbasic=64
- "ffmpeg:livingroomtokitchen#input=rtsp#video=copy#audio=copy#audio=opus"
livingroomtokitchen:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/livingroomtokitchen?video=h264&audio=aac
input_args: preset-rtsp-restream
roles:
- record
- detect
If you left the original go2rtc config there then the ffmpeg one would never be used so I don't believe any of those tests would have gone through. You would need to merge the two in order for that to work
- "ffmpeg:rtsp://admin:pass@10.0.0.47/cam/realmonitorchannel=1&subtype=0&authbasic=64#input=rtsp#video=copy#audio=copy#audio=opus"
I would suggest trying those again
I removed all go2rtc, and tried again using pure Frigate config. It works if i change input args to: input_args:
Thank you for the hint about timestamps, even if can't get working with go2rtc i can at least use frigate and per-camera input_args.
Excellent. Thanks for the hint about timestamps. Adding "-correct_ts_overflow 0" was needed for go2rtc to work. Now works all going through go2rtc
Interesting, thanks, that may be very helpful to know for other users who have the same issue
just as update. Works as long as audio=copy and video=copy in go2rtc. If I add audio=opus then it throwing the following error:
[rtsp @ 0x55fdf1c36080] Non-monotonous DTS in output stream 0:2; previous: 117627, current: 116475; changing to 117628. This may result in incorrect timestamps in the output file.
and frigate fails to move it out of /tmp/cache again and it sits there and grows. For now I'm just using aac, but will have to investigate later.
preset-rtsp-generic
just as update. Works as long as audio=copy and video=copy in go2rtc. If I add audio=opus then it throwing the following error:
[rtsp @ 0x55fdf1c36080] Non-monotonous DTS in output stream 0:2; previous: 117627, current: 116475; changing to 117628. This may result in incorrect timestamps in the output file.
and frigate fails to move it out of /tmp/cache again and it sits there and grows. For now I'm just using aac, but will have to investigate later.
Can you please share a copy of your final config? I'm having the same issue not moving files from cache when updating to beta9, I am assuming because of changes is go2rtc 1.2. Timestamp problem makes sense.
I never really got it working well. Removing #audio=opus helped for my amcrest and reolink on previous beta.
In beta9 it went back to having the growing problem in /tmp/cache for those two cameras.
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.
Describe the problem you are having
Amcrest IP4M-1041B camera's not recording. I have a few tapo's, reolink, and wyze with rtsp. Detection and record works fine on all those. I was using go2rtc with everything at first. The other cameras will record clips and record snapshots. The two amcrest cameras, however, will work fine with detect, and snapshot but I can't get them to record anything.
There doesn't seem to be any errors in logs related to it. I tried using go2rtc, and then tried using just a single camera in frigate config, and both ways it doesn't store a recording for the event... just a snapshot picture.
I am running the bleeding edge so might be that... or maybe something wrong with my config.
I tried running ffmpeg -hide_banner -loglevel debug -i 'rtsp://admin:pass@10.0.0.44/cam/realmonitor?channel=1&subtype=0&authbasic=64 ' -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an test.mp4
and ffmpeg is able to connect and record the mp4 with no issues.
Version
0.12.0-318240C
Frigate config file
Relevant log output
Frigate stats
No response
Operating system
Proxmox
Install method
Docker Compose
Coral version
USB
Any other information that may be helpful
No response