Discussion:
RTSP in curl tool. Setting of CURLOPT_RTSP_STREAM_URI in curl tool.
(too old to reply)
Vitaly Zhuravlev
2018-02-26 22:46:47 UTC
Permalink
I'm trying to do a simple health check of RTSP stream with curl tool.
But command like this always gives me 404 Stream Not Found error:

curl -v --url rtsp://192.168.1.80/h264/ --user admin:1234
* Trying 192.168.1.80...
* Connected to 192.168.1.80 (192.168.1.80) port 554 (#0)
* Server auth using Basic with user 'admin'
OPTIONS * RTSP/1.0
CSeq: 1
User-Agent: curl/7.47.0
Authorization: Basic YWRtaW46YWRtaW4=
< RTSP/1.0 404 Stream Not Found
< CSeq: 1
< Date: Tue, Feb 27 2018 01:14:21 GMT
<
* Connection #0 to host 192.168.1.80 left intact

But it looks like that RTSP_STREAM_URI is not set. so `*` is used instead
here:
`> OPTIONS * RTSP/1.0`

For instance, I tested the same URI with VLC media player and captured
packets with tcpdump. With VLC it works and I can see the video without any
issues and data send in request to RTSP server looks like this as observed
in tcpdump:


OPTIONS rtsp://192.168.1.80:554/h264 RTSP/1.0
CSeq: 2
User-Agent: LibVLC/2.2.2 (LIVE555 Streaming Media v2016.02.09)


It looks that there is an option `CURLOPT_RTSP_STREAM_URI` in libcurl under
the hood of curl tool, but I can't find command line option to set this
parameter so `*` is used as default value according to this:
https://curl.haxx.se/libcurl/c/CURLOPT_RTSP_STREAM_URI.html
And it doesn't automatically use value of --url neither.

How to set CURLOPT_RTSP_STREAM_URI in curl tool?
Thank you
Daniel Stenberg
2018-03-04 23:17:57 UTC
Permalink
Post by Vitaly Zhuravlev
How to set CURLOPT_RTSP_STREAM_URI in curl tool?
There is no way! In fact, not a single CURLOPT_RTSP_* option can be set with
the command line tool.

This is just a sign that nobody has wanted to do that yet bad enough to
actually provide the code to enable it. It chould be easy enough to introduce
a new command line option that lets you set CURLOPT_RTSP_STREAM_URI.

You up for it? You're the one who wants it and possibly even have a good way
to test it out in real life...!
--
/ daniel.haxx.se
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquett
Loading...