-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect PTS after 12 hours of process operation #197
Comments
Looks like somehow the PTS got messed up. Can you run the following command and tell me the value of the first PTS in the resulting file?
Also, do you know if the camera rebooted at 12? |
Autoreboot is configured every tuesday and there is no any logs about linkdown (Last Link Up Time: Nov/12/2024 04:20:05). Today after midnight the situation is same, new movies after 0:00 are broken (0:00 is time of creation new laps file). I can keep it broken for you |
I used old motion (not motionplus) for years and there was no such issue. |
Just to confirm. This is passthrough recording correct? If so, when it is broken, can you use the web control to change the fflog_level to something higher so that those messages appear. Also validate that the camera is still feeding live images and that the problem is with the recording instead of the capture. |
Yes,
Camera is working correcly, i can watch it via vlc rtsp, motion web and also timelapse has correct recording during broken movies time I have changed fflog level but there is no changes. So i changed it in conf, switched timelapse to hourly and restarted service. Where is fflog has to be stored? I am not observing any changes in journalctl. |
After i switched timelapse to hourly the movie file between two hourly files are ok yet |
I've still not been able to recreate this but I think that the time of the broken MKVs being correlated to the timelapse option provides some clues. In Motionplus the movie and timelapse are separate objects but perhaps there are some interactions inside the ffmpeg libs. If the broken MKVs go back to being corrupted past midnight once you change it back to daily, I think we can confirm that something behind the scenes is occurring. As for the resolution, my first thought would be to change this line from Let me know if you'd be able to test that change. |
You can try it. I'm at a loss as to what could be causing this. From the ffprobe of the broken MKVs, it appears that something this wrong with the PTS values. But there isn't much that Motionplus does with those. It just copies from the source, rescales to the container and writes them. It could be interesting to know whether the issue persists when there is not any timelapse running. Or whether it happens when the mov or mp4 containers are used. After that, I'd think that a lot of debugging messages would have to be added to determine when the PTS values were getting messed up. e.g. Are they coming in from the camera wrong, rescaled wrong or only after they are written out. (That would be a massive amount of output since the issue is intermittent.) |
is there any little manual to build it locally using buildplus.sh? |
You could use the buildplus.sh but that could be a bit much for testing purposes. (I'd only do that for long term use). I would just create a directory in your home and follow the directions for building except do not do the Once it is built, use the command If you want to use the changed version long term, then you could use the |
I didnt build yet, but maybe it is important info to reproduce that i have second camera (almost the same) with config:
|
You could also turn off the timelapse and see if issue persists |
Yep, issue still perisist with timelapse disabled, that means the reason may be CAM2. I will disable it today ( |
Issue still persist with timelapse disabled and proccess restart at Dec 01 21:11:56 - broke between Dec 02 09:16 and 11:13 |
Were you able to compile it and run with the test version? |
Yes i can, but i have no free time next few days |
i have built noble_motionplus_0.2.0-dirty-20241121-3e28491-1_amd64.deb, there is no any changes, pts is broken after 12 hours Also my cpu was 100% for a long time (till i restarted process): UPD: i cant reproduce 100% cpu utilization with CAM1 config only. I'll try to return CAM2 config.
|
Using the deb creation script probably isn't practical for debugging what may be occurring with your cameras. You'll probably need to compile and run separately to understand what is occurring. Probably also want to review the logs and/or thread cpu usage via htop to understand what is occurring. |
UPD: |
You can try to change this line to |
I have built it already at #197 (comment) and it didnt solve the issue |
What kind of debug info can i provide for you? |
This one is still confusing. There isn't a whole lot happening to the PTS/DTS between the camera and writing it out. All I can suggest are various things to try in order to determine the cause. After implementing the change to You can try to put You can try to put You can try to put
In here (right before last brace) and we can see whether it is some other stream from the camera causing the problem. You can try using |
Step 1/4
|
Step 2-3/4
|
Step 4/4
Any idea? |
Interesting. What i had before: cam1 (outdoor) events broke after ~13h15min, cam2 is ok. I swapped urls only, it become: cam2 videos (that now are low-res hourly videos from outdoor camera) broke after 13h15min I have changed both urls to hi-res (fhd) and everything seems to be ok Hi-res is 1920x1080, low-res is 800x448 UPD: cannot reproduce, issue still persist |
Did you read the guide?
Yes
What is the base version number of MotionPlus being used?
0.2.x
What was the install method?
Built from source code
What is base architecture?
x86/x64
What is the distro being used?
Ubuntu
Disto version number
24.04
Camera/Sound type(s) being used?
Network camera with RTSP
Describe the issue/problem and steps to reproduce
Motionplus d79e5c5 commit
I have 2 cameras with different configs: CAM1 and CAM2
CAM1 config:
So it is 1 fps 24/7 daily laps recording and external api calls (eventstart and eventend) for 5 fps movies. Everything was ok but today after 12:00AM movies become broken until sudo service motionplus restart
All files attached
journalctl.zip
mov_ok.zip
mov_broken.zip
Relevant MotionPlus log output (at log_level 8)
The text was updated successfully, but these errors were encountered: