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

Example: capture_video_timer #1092

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

Conversation

mbauer575
Copy link

This PR adds a new example script capture_video_timer.py that demonstrates how to capture video for a specific duration starting at a specific time using the picamera2 library. The script includes logging and error handling to ensure smooth operation.

Usage:

  1. Modify the start_time and duration variables in the script to set the desired start time and recording duration.
  2. Run the script using python capture_video_timer.py

@davidplowman
Copy link
Collaborator

Hi, and thanks for posting this!

Looks good, I guess the main question I had was about the use of threads. Obviously threads can be essential, particularly in more complex applications, though in this case everything could have been run just in Python's main thread. Do you think the threads are adding something in this case? Also (sorry for the nit pick!), I wonder whether the bits of code that start threads should be "joining" them at the end, maybe this would be a bit tidier?

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