-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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/1.0 400 Bad Request when query parameters are supplied in RTSP URL #3295
Comments
Hello, i can confirm that there's a bug, but it's on the GStreamer side, since in RTSP the control attribute (stream=0) should be appended AFTER query parameters (key=value), not merged with query parameters. This is the (wrong) request that GStreamer sends when publishing:
This is the right one:
The problem is that this split between query parameters and control attribute is not mentioned in the specification, it's an unwritten rule of RTSP that is implemented anywhere nonetheless. Except GStreamer, evidently. Thus i doubt that GStreamer maintainers would accept a patch. |
This is fixed by bluenviron/gortsplib#619. With respect to my previous comment, i improved the server in order to support both URL formats. |
Which version are you using?
v1.8.0
Which operating system are you using?
Describe the issue
When attempting to stream video with RTSP (using Gstreamer), response 400 is given on SETUP request.
Describe how to replicate the issue
gst-launch-1.0 videotestsrc ! videoconvert ! videoscale ! video/x-raw,width=640,height=480 ! x264enc speed-preset=veryfast tune=zerolatency bitrate=800 ! rtspclientsink protocols=tcp location=rtsp://127.0.0.1:8554/mystream
gst-launch-1.0 videotestsrc ! videoconvert ! videoscale ! video/x-raw,width=640,height=480 ! x264enc speed-preset=veryfast tune=zerolatency bitrate=800 ! rtspclientsink protocols=tcp location=rtsp://127.0.0.1:8554/mystream?key=value
Error (400): Bad Request
Logs
Logs from server:
It seems fine until Gstreamer tries to send data to the
/mystream/stream=0
endpoint.Additional info
The reason I need to send a query parameter is for JWT authentication; as specified in the docs I am trying to send
jwt=...
, however the process fails as described above.Did you attach the server logs?
yes
Did you attach a network dump?
no
The text was updated successfully, but these errors were encountered: