I am currently working on a project using a Jetson AGX Orin with JetPack 6, a Skycontroller 4 Black, and an Anafi USA. The goal is to keep the RTSP stream running while I trigger a still photo from an Olympe Python script.
I am able to play the live stream with GStreamer without issues with the following prompt :
gst-launch-1.0 -v \
rtspsrc location="rtsp://192.168.53.1/live" ! \
rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! \
autovideosink sync=false
But as soon as I take a photo using Olympe, the GStreamer pipeline stops with EOS and exits. I am using the following code:
import olympe
from olympe.messages.camera import set_camera_mode, set_photo_mode, take_photo, photo_progress
SC_IP = "192.168.53.1"
CAM_ID = 0
drone = olympe.Drone(SC_IP)
drone.connect()
# (also tried without these two calls once the drone is preconfigured)
drone(set_camera_mode(cam_id=CAM_ID, value="photo")).wait().success()
drone(set_photo_mode(cam_id=CAM_ID, mode="single",
format="rectilinear", file_format="jpeg")).wait().success()
waiter = drone(photo_progress(result="photo_saved", _policy="wait"))
assert drone(take_photo(cam_id=CAM_ID)).wait().success()
assert waiter.wait(_timeout=20).success()
And the console shows:
Got EOS from element pipeline0
Execution ended after 0:00:09.xxxxxx
Setting pipeline to NULL
Freeing pipeline
I have tried removing the set_camera_mode and set_photo_mode commands (since the drone is already pre-configured in photo mode), but the issue still persists.
Question:
Is it expected for the RTSP stream to stop after a still capture on Anafi USA?
If not, is there a recommended way to keep the live stream alive while taking photos?
Solution I am exploring :
Using pdraw backend to take a screenshot while demuxing the stream.