Skip to content
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

Recordings daytime/nighttime FPS difference #749

Closed
JA16122000 opened this issue Mar 19, 2023 · 13 comments
Closed

Recordings daytime/nighttime FPS difference #749

JA16122000 opened this issue Mar 19, 2023 · 13 comments
Labels
bug Something isn't working

Comments

@JA16122000
Copy link

JA16122000 commented Mar 19, 2023

Hi!

Just upgraded my V3 to the V3 PRO, but now i've got problems with both of my cams.

Night-time
Recordings will play in night-time faster (2 seconds, will play fastforward in 1 second)
When i restart the container, it is working fine, till the morning starts.

Day-time
Recordings will play slower in day-time (1 second will play slower in 2 seconds)
When i restart the container, it is working fine, till the night starts ....

And so on, and on and on

FPS_FIX=true don't make any difference.

What do i miss?

Allready tried:

FPS_FIX=True
In the wyze-app turn off "night vision mode" so it will not change

Any suggestions what i am missing?

It is only one off the two camera's thats having this problem.
When i recreate the container, it is working fine, till the evening or morning starts.

@mrlt8 mrlt8 added the bug Something isn't working label Mar 26, 2023
mrlt8 added a commit that referenced this issue Apr 7, 2023
mrlt8 added a commit that referenced this issue Apr 7, 2023
* HA MQTT auto discovery #751

* remove debug

* Update stream.py

* Change default IMG_DIR to media #660

* Fix API snapshots

* Command to change FPS #609 #749  #755

* Update docs
@mrlt8
Copy link
Owner

mrlt8 commented Apr 7, 2023

Hey @JA16122000, I added a couple of commands to adjust the FPS. Could you see if any of these help when the night FPS drops?

"set_fps_5": ("K10052SetFPS", 5),
"set_fps_10": ("K10052SetFPS", 10),
"set_fps_15": ("K10052SetFPS", 15),
"set_fps_20": ("K10052SetFPS", 20),

@JA16122000
Copy link
Author

I will try @mrlt8!

Will this commands, work automatic?
Or do i have, to give this command by hand?

@mrlt8
Copy link
Owner

mrlt8 commented Apr 10, 2023

You'd have to manually send the commands for now. If it works, then we could potentially try to automate the commands if the fps starts to drift.

@JA16122000
Copy link
Author

JA16122000 commented Apr 10, 2023

How do i do that in portainer?

I did: set_fps_20
in the console, and it seems working!

@mrlt8
Copy link
Owner

mrlt8 commented Apr 10, 2023

@JA16122000
Copy link
Author

JA16122000 commented Apr 10, 2023

Wel, i've tried:
http://ip:5000/api/achtertuin/set_fps_20 and get a confirmation respons.
But the recordings are still twice as slow.

Also tried
http://ip:5000/api/achtertuin/set_fps_10 and get a confirmation respons,
but the recordings are still twice as slow.

The command is working, but the file output did not make any difference at all :(

@JA16122000
Copy link
Author

JA16122000 commented May 7, 2023

FPS are now terrible 🤣
Even set on 20

When I remove FORCE_ENCODE=true, the FPS in the stream are much better and smoother

@mrlt8
Copy link
Owner

mrlt8 commented May 8, 2023

FORCE_ENCODE requires more processing power, so make sure your host can handle the re-encode or utilize a hardware encoder.

Not sure if it would make a difference, but have you tried recording the output from the rtsp stream instead? https://github.com/aler9/mediamtx#save-streams-to-disk

@JA16122000
Copy link
Author

FORCE_ENCODE requires more processing power, so make sure your host can handle the re-encode or utilize a hardware encoder.

Not sure if it would make a difference, but have you tried recording the output from the rtsp stream instead? https://github.com/aler9/mediamtx#save-streams-to-disk

i would love to try that, but i realy don't know how.
Is there someone, hoe can explane to me (in simple language) how to do this in my portainer?

@mrlt8
Copy link
Owner

mrlt8 commented May 11, 2023

something like:

- MTX_PATHS_CAMNAME_RUNONREADY=ffmpeg -i rtsp://0.0.0.0:8554/camname -c copy -f segment -strftime 1 -segment_time 60 -segment_format mpegts /record/camname_%Y-%m-%d_%H-%M-%S.ts

@JA16122000
Copy link
Author

something like:

- MTX_PATHS_CAMNAME_RUNONREADY=ffmpeg -i rtsp://0.0.0.0:8554/camname -c copy -f segment -strftime 1 -segment_time 60 -segment_format mpegts /record/camname_%Y-%m-%d_%H-%M-%S.ts

Schermafbeelding 2023-05-14 135929
Like this?

It don't get any *.ts file

@mrlt8
Copy link
Owner

mrlt8 commented May 17, 2023

You need to specify the CAMNAME in MTX_PATHS_CAMNAME_RUNONREADY with the actual name:
MTX_PATHS_ACHTERTUIN_RUNONREADY

@JA16122000
Copy link
Author

Now the recordings don't mis any frames!
So this is just working fine, except for the switch to nighttime and daytime.
Maybe this is to tweak somehow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants