Wojciech Orzechowski
Wojciech Orzechowski
SMSoftware Mansion
Created by Wojciech Orzechowski on 1/17/2024 in #membrane-help
RTSP authentication problem?
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
rtsp://myadmin:[email protected]:554/stream1
with credential obfuscated as
myadmin
myadmin
and
mypassword
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)
RTSP.describe(session)
alias Membrane.RTSP
alias Membrane.RTSP.Response
alias Membrane.RTSP.Request

url = "rtsp://myadmin:[email protected]:554/stream1"
{:ok, session} = RTSP.start_link(url)
RTSP.describe(session)
However, I received:
iex> {:error, {:invalid_addrtype, "o=- 14665860 31787219 1 IN IP4 192.168.1.10"}}
iex> {:error, {:invalid_addrtype, "o=- 14665860 31787219 1 IN IP4 192.168.1.10"}}
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: "192.168.1.10",
port: 554,
path: "/stream1",
query: nil,
fragment: nil
}
uri = URI.parse(url)
iex> %URI{
scheme: "rtsp",
authority: "myadmin:[email protected]:554",
userinfo: "myadmin:mypassword",
host: "192.168.1.10",
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!
13 replies