-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RTSP Basic Authorization #8941
Comments
Hello Pitel, Thanks for your interest in RTSP, right now ExoPlayer does not support RTSP auth, but it is something that we have planned. Please stay tuned. If you are looking to implement auth yourself, take a look at |
Hi Pitel, Wondered if you could provide a sample source to help us test? |
Hi, But I can show you the requests (but it should be just the same header as HTTP uses) and reposnses and help you test it. |
The requests are useful too, thanks! You can send us an email at dev.exoplayer@gmail.com using a subject in the format "Issue #8941", if you find it uncomfortable sharing that on Github. |
I guess it's alright sharing it there. It's just a testing camera on the intranet with dummy password. After a bit of debugging, I find you probably has 2 options: The first one is to simply use the URI with username and password in it, like this (notice the
This is what I see when I'm using ExoPlayer from #3854. Another option is what ffmpeg is doing. It sends the plain request, the camera responds with 401 and some
I'm not the expert here, but I suppose the second option is more secure. However, when testing it, I found out that our camera responds |
Hey @claincly. I've seen your commit on dev-v2 on basic and digest auth. So, I tried it with my camera that is located on my local network. It just streams an h.264 stream on rtsp. It correctly parses the After some debugging I found out that it stucks in Now, I am not sure if it's "Test Ready" or not, but if there is anything i can provide, please tell. I also attached logs below
|
@k1llrogg Is the log complete? On a rough look, the DESCRIBE response did not carry the actual SDP media description. I'm not sure if that's because how you logged the message. Where did you insert the log lines? Is it where I mentioned in the pull request? |
@claincly Here i just log the lines. I can also attach a kind of "sequence of actions":
|
Thanks for the detailed comment. Can you try printing out the received bytes in |
I am pretty confident that it doesn't have CRLF at the end. But for additional information, I logged the bytes I am receiving. There are 700 bytes, but I will include last 10 of them. Probably have to use |
I advanced a little bit, changed DESCRIBE parser so it splits by LF instead of CRLF, but now it crashes on
|
So there are two things:
|
Another thing that pops to my mind, You said in one of the comments that you received over 700 bytes, but the Content-Length header you posted is only 303 bytes long. Are they the same media? |
I was wrong, it equals to content length.
I don't have an exact access to the server, since my server is my client's camera, but i notified my client about it. meanwhile, I will probably drop the session name or assign some arbitrary value |
@claincly There is one more thing. As you can see in my SDP, there is no
But even better solution would be to parse it from |
@k1llrogg Thanks for pointing out. Could you post another issue on the As for the CRLF line terminator thing, we are working on a solution. |
Related to Issue: #8941. RTSP message body's format is not regulated by the RTSP spec, meaning it can use either CRLF or LF as its line terminator. The old code assumes every line ends with CRLF (RTSP message and the message body); the new code will rely on the Content-Length information to receive the bytes for the message body. #minor-release PiperOrigin-RevId: 377475565
Related to Issue: #8941. RTSP message body's format is not regulated by the RTSP spec, meaning it can use either CRLF or LF as its line terminator. The old code assumes every line ends with CRLF (RTSP message and the message body); the new code will rely on the Content-Length information to receive the bytes for the message body. #minor-release PiperOrigin-RevId: 377475565
Hi , |
Use case description
I'm trying to connect to RTSP stream with URI:
rtsp://admin:heslo123@1.2.3.4:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1
. It doesn't work. I get the following error:Indeed, when I debuigged the requests and responses, the
Authorization: Basic
header is missing. And I couldn't find any way to provide custom headers.Proposed solution
Automaticaly generate the header based on the URI.
Alternatives considered
Provide a way to add custom headers.
The text was updated successfully, but these errors were encountered: