RTSP authentication problem?

17/01/2024, 14:54:47

Hi, I am playing with an RTSP camera (Tapo C210) that is on the local network. The path to the stream is rtsp://myadmin:[email protected]:554/stream1 with credential obfuscated as myadmin and mypassword. I tested the endpoint with VLC and it works and I can see the stream so the credentials are good. I wanted to obtain some information from the camera so I wanted to get information about the session as per the RTSP documentation:

alias Membrane.RTSP
alias Membrane.RTSP.Response
alias Membrane.RTSP.Request

url = "rtsp://myadmin:[email protected]:554/stream1"
{:ok, session} = RTSP.start_link(url)

However, I received:

iex> {:error, {:invalid_addrtype, "o=- 14665860 31787219 1 IN IP4"}}

So I reproduced the steps that are taken by the library to see where the error could happen:

uri = URI.parse(url)
iex> %URI{
  scheme: "rtsp",
  authority: "myadmin:[email protected]:554",
  userinfo: "myadmin:mypassword",
  host: "",
  port: 554,
  path: "/stream1",
  query: nil,
  fragment: nil

So far so good, userinfo is set correctly. I read the comment that the default authentication is "basic" (https://github.com/membraneframework/membrane_rtsp/blob/master/lib/membrane_rtsp/rtsp.ex#L53).

VLC by default utilises Digest and ommits Basic authentication. Am I setting something wrong or missing opts somewhere? Is there any place you could recommend to look at when trying to view all available opts and their values (or examples of them)? Thank you!

12 responses