curl / Mailing Lists / curl-users / Single Mail


RTSP in curl tool. Setting of CURLOPT_RTSP_STREAM_URI in curl tool.

From: Vitaly Zhuravlev <>
Date: Tue, 27 Feb 2018 01:46:47 +0300

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:// --user admin:1234
    * Trying
    * Connected to ( port 554 (#0)
    * Server auth using Basic with user 'admin'
> 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 left intact

But it looks like that RTSP_STREAM_URI is not set. so `*` is used instead
`> 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:// 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:
And it doesn't automatically use value of --url neither.

How to set CURLOPT_RTSP_STREAM_URI in curl tool?
Thank you

Received on 2018-02-27