Video: Add local still image and video recording#295
Video: Add local still image and video recording#295ddd999 wants to merge 1 commit intostephendade:masterfrom
Conversation
|
Great! I'll take a look later in the week |
1eed373 to
2459aac
Compare
|
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
9dbb182 to
fdc1d50
Compare
d582479 to
b8b47dd
Compare
e7bb842 to
9c0208e
Compare
VSCode auto-formatting strikes again, sorry about that. I think it's fixed now. |
|
Looking better. There's still some changes in |
c6a09c7 to
d39b375
Compare
|
The merge issues look resolved now, so I'll run some tests on the PR early next week. |
Thanks, I was going to double check the code before replying as I thought there were still some unnecessary formatting changes in src/video.jsx but if you're good with the current state I'll let it be for now. I've tested on my Pi Zero 2W with the CSI camera and with a USB web cam and both seemed to work as expected. |
stephendade
left a comment
There was a problem hiding this comment.
Looks really good!
A few small things to change:
- Web GUI: Under photo mode, a CSI camera comes up as "Unnamed CSI camera" instead of it's actual model
- Web GUI: Add a confirmation message when picture taken with "Take Photo" Same with stop video.
- Web GUI: Add photo&video folder to "Flight Logs" page for easy download. Add a note to Photo&Video page about this
- Add ./media folder to .gitignore
| onChange={this.handleCameraModeChange} | ||
| checked={isStreaming} | ||
| /> | ||
| <Form.Check |
There was a problem hiding this comment.
Disable Photo/Video GUI elements if not running in RPi and picamera2 not installed
- 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 - Geotagging: Writes GPS position information (if available) to EXIF metadata of photos- - Adds media file management to the flight log browser page
Still need to add this:
|
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 (photovideo.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, photovideo.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):
Testing and bug fixes as required to make sure all of the above works correctlyConfirm that camera service still responds correctly to MAVLink commandsAdd/update unit testsTo do list for future PR(s):
Add geotagging abilityAdded in this PR