-
Notifications
You must be signed in to change notification settings - Fork 78
Video: Add local still image and video recording [WIP] #295
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
base: master
Are you sure you want to change the base?
Conversation
|
Great! I'll take a look later in the week |
aa95364 to
8f97180
Compare
- Enables local still image and video recording by re-organizing the camera subsystem into three distinct modes: streaming video (default), still photo capture, and video capture - Adds Python helper scripts to detect and control cameras for local still/video capture - Now sends a VideoStreamInformation packet whenever video streaming is started - Captures a photo or starts/stops video recording either when the button is pressed on the web UI, or when a MavLink MAV_CMD_DO_DIGICAM_CONTROL message is received - Unit testing and linting fixes
|
I've had a look through - looks good. A few issues I came across during testing (on my laptop. Will try a Rpi tomorrow):
|
|
Testing on the RPI
EDIT: |
|
Thanks for reviewing/testing. I also found that in streaming mode, streaming mode stopped in the UI, but the video stream didn't actually stop. This might be a peculiarity (or intentional behaviour?) of Mission Planner: MP only recognizes the stream the first time the VideoStreamInformation message is sent. If you stop the stream, then restart it with the same device, it doesn't recognize the stream again unless you close and restart MP. Could also be related to the aforementioned issue. Guess there are a few things to work on still! |
|
Yeah, could be an MP-specific thing. Happy with the overall work on the PR. Keen to get it merged in once we've ironed out the final issues. |
3ce7964 to
c083bb7
Compare
This draft PR is a work in progress to address feature request #167 and continues where PR #229 left off. It's incomplete and some parts are likely still broken. Adding the PR now for visibility into the proposed changes and to solicit feedback if there is any.
This reorganizes the camera system into three distinct modes:
It adds a Python helper script to detect all of the camera devices available for still/video capture (get_camera_caps.py), and a backend/server script (photomode.py) that listens for a SIGUSR1 from Rpanion to trigger it to either take a still photo, or to toggle video recording on and off.
By default, photomode.py will use the first available camera supported by Picamera2(). If that's not available, or if a V4l2 device path is specified, it will use V4L2 instead.
To do list (for this PR):
Confirm that camera service still responds correctly to MAVLink commandsAdd/update unit testsTo do list for future PR(s):