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

Use calculated video length #87

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

stephenharris
Copy link

Description

After altering video_duration_before_motion and video_duration_after_motion, I noticed that the videos were still the same length. This is because the video length is hard-coded when saving the video. This PR fixes that by replacing the hard-coded 15 with the calculated duration.

This is actually a partial revert of 2d82579 - so there might be a reason for the hardcoded value that I'm missing.

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

I have ssh-ed onto the Pi and fixed the code manually.

Tested on the following devices:

  • Development environment (Linux, Windows, or MacOS)
  • Pi Zero W
  • Pi 3A+
  • Pi 3B+
  • Pi 4

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes

@mikevanis
Copy link
Member

Thanks for the contribution! Can you tell us a little bit about the durations that you tried? We haven't had much success on Pi Zero in the past and longer recordings...

@stephenharris
Copy link
Author

Hi @mikevanis I tried up to 50 seconds (10 seconds before and 40 seconds after) while debugging this. But I can't be certain that I used that confuguration after applying the fix. However, I have been recording videos of around 30 seconds regularly since.

I can try some other configurations and report back.

@mikevanis
Copy link
Member

Hi @stephenharris, Do you have an update with some more testing? The build action is back up and running, so if you re-run the PR (maybe easier to add a new commit just for the sake of it) it should pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants