Anafi & VLC / RTSP Stream


#1

We need an Anafi category :wink:

Is there way to host the Anafi live stream in a player such as VLC similar to what is offered on the Mambo? I see there is an RTSP listener on port 554.

Thanks in advance.


#2

Yes, you can use RTSP to get a video stream from an Anafi:

  • vlc rtsp://anafi.local/live
  • Note that there is a bug in VLC 2.x with some features used on the Anafi live stream, so the video won’t be perfect :wink: The bug is corrected on VLC 3 and newer versions.
  • All PC-based players (vlc, mplayer …) won’t have the same error concealment as we have in FreeFlight, so expect a “worse” video stream for the same wifi conditions.
  • Anafi only accepts ONE video client, so if you have FreeFlight (or a SkyController3 with FreeFlight attached), you won’t be able to get the video this way.
  • Adaptive bitrate will be best when connected to a SkyController3 (we have a better control of the available wifi bandwidth between our two devices :wink: )

With that said, there is a slightly better option: Get the video stream from the SkyController3 !

Connecting the SkyController3 to your computer with the USB-C cable (with no smartphone connected) should create an RNDIS interface on your computer (linux shoud work out of the box, Windows requires a driver install, and to my knowledge there is no RNDIS driver available on macOS :confused: )

With the SkyController3 connected, you can just change the address of the stream to the one of the SkyController:
vlc rtsp://192.168.53.1/live

And get the same result.


#3

So what I’d like to do is control the drone via the SkyController, while simultaneously feeding the live video to a perception pipeline. Ideally, I’d want the operator to use video on the SkyController, while simultaneously also streaming to a PC. It looks like this is not possible, however.
Next best option would be using the SkyController for control and the video shown on the PC monitor via RTSP. However, so far my testing with VLC and gstreamer shows significant latency, making controlling the drone infeasible. If you have any suggestions to improve the situation, they would be welcome.


#4

Hi,

You can try to reduce the latency in VLC by changing the “Network Caching” setting (in Tools > Preferences > Check “All” at the bottom > Input / Codecs) from the default 1s value to a lower value. Doing this also reduces the stream resiliency, so expect to see more artifacts than with the longer setting.

Regards,
Nicolas.