Read RTP Stream with FFMPEG

Hello,

I would like read vertical camera stream. How I can do this with RTP or RTSP with FFplay. RTP is avaible but not documented. PDraw also doesn’t explain how to use RTP mode “-i” because I dont give the port.

Thanks.

Hi,

The drone proposes five possible streams in the SDP document returned on the rtsp://192.168.42.1/live endpoint:

  • The main camera, which is the one selected by default by FreeFlight
  • The left and right stereo cameras
  • The vertical camera
  • A disparity map, computed from the stereo camera, used to display obstacle detection data on FreeFlight

With pdraw, you can run pdraw -u rtsp://192.168.42.1/live, and you will get a prompt like:

Select demuxer media id(s); either a single media id (e.g. "1")
or a comma-separated list of media ids (e.g. "1,3"):
 * 1: [front] Front camera
 - 2: [front-stereo-left] Front stereo left camera
 - 3: [front-stereo-right] Front stereo right camera
 - 4: [vertical] Vertical camera
 - 5: [disparity] Disparity map
 > 

On which you can select which camera you want to see.

How to select a specific media in the SDP document returned by the drone varies depending on the receiving software (e.g. vlc displays this choice as a video track selector), but I don’t know how to do it specifically on ffplay.

On pdraw, the -i, -s, -c, -S and -C options are kind of deprecated, as they were only useful for getting the video stream out of a Bebop/Bebop2/Disco drone, which used RTP for streaming, but not RTSP for session management. On an Anafi Ai, the -u rtsp://<drone_ip>/live option is all you need to get a live stream.

Regards,
Nicolas.

Ok. To get video from Anafi I need to communicate with RTSP.

I would like use my video reader library to do that, so I must integrate a RTSP communication :frowning:

Have you a documentation that explain the protocol and command ? There are lot of codes and examples in the GroundSDK but without a clear documentation is very difficult.

Hi,

RTSP is a standard protocol, described in RFC-2326. The same goes for the underlying RTP & RTCP protocols (RFC-3550 & RFC-3551).

That’s why other video players (like ffplay or vlc can be used to get the drone video stream.

Regards,
Nicolas.

This topic was automatically closed after 30 days. New replies are no longer allowed.