Skip to content

Support simple camera control operations  #83

Description

@envirover

RadioRoom should support controlling video streaming by supporting the following commands:

  • Start video streaming process on MAV_CMD_VIDEO_START_CAPTURE command.
  • Kill video streaming process on MAV_CMD_VIDEO_STOP_CAPTURE command.
  • Start image capture on MAV_CMD_IMAGE_START_CAPTURE command.
  • Stop image capture on MAV_CMD_IMAGE_STOP_CAPTURE command.
  • Capture images on MAV_CMD_DO_DIGICAM_CONTROL command.
  • Respond to MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS command with CAMERA_CAPTURE_STATUS message.

radioroom.conf

...
[camera_handler]
# Command executed when vehicle is armed
on_arm=

# Command executed when vehicle is disarmed
on_disarm=

# Command executed when MAV_CMD_VIDEO_START_CAPTURE received
on_video_start_capture=raspivid -o - -t 0 -fps 30 -w 640 -h 480 -b 1500000 | ffmpeg -re -f h264 -i - -vcodec copy -preset ultrafast -tune zerolatency -f flv rtmp://52.52.203.204/live/stream

# Command executed when MAV_CMD_VIDEO_STOP_CAPTURE received
on_video_stop_capture=pkill raspivid

# Command executed when MAV_CMD_IMAGE_START_CAPTURE received
on_image_start_capture=

# Command executed when MAV_CMD_IMAGE_STOP_CAPTURE received
on_image_stop_capture=

# Command executed when MAV_CMD_ON_DIGICAM_CONTROL received
on_do_digicam_control=raspistill -o /tmp/image.jpg

CAMERA_CAPTURE_STATUS.video_status should be set to 1 if video streaming is on.

VIDEO_STREAM_* MAVLink messages better suite for this purpose, but the spec for these messages is not yet finalized.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions