Closed Mikescotland closed 1 year ago
This looks like a problem where your cameras PTS / DTS timestamps are incorrect and it is resulting in more segments being than configured (which should be every 10 seconds).
You can confirm by going into the folder directory and checking the segment duration.
NGINX has a max limit on the number of segments that can be requested in a single playlist.
They are usually 3 seconds long. But sometimes 10 seconds (as it should be). Now, I changed a few days ago config file as during the object recognition recorded stream would start to be choppy and losing frames (another issue I had, processor and computing power isn't a problem, it's a core i7 NUC, I believe I changed preset from generic to record, now everything is super smooth. However, the issue with 24/7 recording. Is there any way for ffmpeg to correct the PTS/ DTS? Everything plays live normally, without any hiccups, analysing the clips files shows normal fps, nothing unusual.
You're using go2rtc, I'd suggest editing the go2rtc config to use ffmpeg:
Any specific arguments? Remembering tapo sends stupid alaw audio... (which i'd love just to remove altogether from any processing chain, or at least reencode in go2rtc into aac.
For now I'd just start with something basic
go2rtc:
streams:
doorcam:
- "ffmpeg:rtsp://REDACTED:REDACTED@REDACTED:554/stream1"
doorcam_sub:
- "ffmpeg:rtsp://REDACTED:REDACTED@REDACTED:554/stream2"
Thanks @NickM-27 Before you sent the reply I tested: go2rtc: ffmpeg: input_args: preset-rtsp-restream-low-latency It corrected immediately segment duration to 10 s.
Now changed to your solutions and can confirm it also creates the desired segments. I cannot test the object detection (if it skips frames even in the 24/7 recording during object recognition) just now - night and all house is sleeping, so don't want to be wandering around. Got another question though - what should i put into ffmpeg in the camera sections here (if any?) cameras: doorcam: ffmpeg: inputs:
Not sure I understand your last question
I meant for instance ffmpeg: output_args: preset-rtsp-record where should it go if I wanted to use it? go2rtc section or below in cameras section.
Gotcha, let's take a step back and answer what you're trying to accomplish. That preset is specific to the frigate config, and also doesn't include audio in the config which is confusing if that is the desired outcome.
@NickM-27 , thanks for help. Here is what I want to achieve:
I had it set up quite fine with generic config but during object detection frigate could skip even a few seconds - and it was also skipped in the 24/7 recordings. So now trying to reconfigure it so it's smooth. Very strangely, when I removed hardware acceleration the clips stopped being so choppy during object recognition...
Sounds like you're pretty close, just want #video=copy#audio=aac
for the stream1 in go2rtc
Had to go outside anyway, and so far so good - not even one frame lost during object detection. I will try with aac audio when i manage to get updated go2rtc - I read the documentation but I think I can't do it - running supervised on Ubuntu with frigate as addon, so tried to locate the folder /config with no luck!
You can do it with the addon, /config I'd the main folder that holds frigate.yml, configuration.yaml, etc
Unsuccessful. Created folder, uploaded go2rtc amd64, renamed, changed the permissions sudo chmod 777 go2rtc, restarted frigate, still on 1.2
Working now - I created config folder instead just uploading it to the folder with frigate.yaml
For now all working as intended, @NickM-27 thank you very much for all your help today. Will try with aac audio tomorrow. Thanks again!
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
I can't view recordings from the Media tab (24/7 recordings), as well as from the frigate Recordings tab. Every time shows: "Error starting stream, see logs for details (server failure)". I am able to see the current hour period if recording is still less than 40 minutes, then after this time the message would appear and the whole hour period is unavailable. Clips are OK, there are no errors in frigate log nor in the go2rtc. However, there is an error in Nginx log (see below).
Version
0.12.1
Frigate config file
Relevant log output
FFprobe output from your camera
Frigate stats
Operating system
HassOS
Install method
HassOS Addon
Coral version
CPU (no coral)
Network connection
Wired
Camera make and model
Tapo TC61
Any other information that may be helpful
No response