rtsp server, save record stream to a file

Nicolas Dufresne nicolas at ndufresne.ca
Mon Sep 3 14:03:36 UTC 2018


Le lun. 3 sept. 2018 01:57, Matthew Waters <ystreet00 at gmail.com> a écrit :

> On 3/9/18 3:37 pm, Dinh Nguyen wrote:
>
> Hello Nicolas,
>
> Thanks for your response.
>
> I am trying with your suggestion
> `gst-launch-1.0 videotestsrc ! x264enc ! rtph264pay ! rtspclientsink
> location=rtsp://127.0.0.1:8554/test` <http://127.0.0.1:8554/test>
>
> however, seems that the pipe itself get error
> `WARNING: erroneous pipeline: could not link rtph264pay0 to
> rtspclientsink0`.
>
> I am not sure I get your suggestion right?
>
>
> rtspclientsink already includes payloaders so you don't need a rtph264pay
> there.
>

Sorry for the noise, I was expecting that element to be consistent with
rtspsrc.

It's quite inconsistent and forces depayloading and payloading again if one
wants to implement a relay.


> What you're missing is that the name of the elements need to match a
> specific format. i.e. the depayloader in your test-record command line
> needs to be named 'depay0'.  You also may need to modify the test-record
> example to send an EOS on shutdown so that mp4 headers are finalized
> correctly as the resulting fiel will not really be playable as-is.  Another
> option is to attempt to attempt enable robust-muxing mode.
>
> Cheers
> -Matt
>
> Thanks.
>
>
>
> On Mon, Sep 3, 2018 at 2:09 AM Nicolas Dufresne <nicolas at ndufresne.ca>
> wrote:
>
>>
>>
>> Le sam. 1 sept. 2018 23:57, Dinh Nguyen <dinh.nguyen at zinnoinc.com> a
>> écrit :
>>
>>> Hello,
>>>
>>> I am new to GStreamer ecosystem, and nowhere to be good at C; hence,
>>> please forgive if I put this silly question here.
>>>
>>> I am using gst-rtsp server, with test-record to save a "record" stream
>>> from client to a file (mp4), and this is the error.
>>>
>>> GST_DEBUG=2 ./build/test-record "( rtph264depay ! h264parse ! mp4mux ! filesink location=result3.mp4 )"
>>> stream ready at rtsp://127.0.0.1:8554/test
>>> On the sender, send a stream with rtspclientsink:
>>>   gst-launch-1.0 videotestsrc ! x264enc ! rtspclientsink location=rtsp://127.0.0.1:8554/test
>>> 0:00:09.120079875   951       0xd0a190 ERROR              rtspmedia rtsp-media.c:3637:default_handle_sdp: 0x7f93380452b0: Media has more or less streams than SDP (0 /= 1)
>>> 0:00:09.120101464   951       0xd0a190 ERROR             rtspclient rtsp-client.c:2946:handle_sdp: client 0xe551a0: could not handle SDP
>>> 0:00:09.120110777   951       0xd0a190 ERROR             rtspclient rtsp-client.c:3107:handle_announce_request: client 0xe551a0: can't handle SDP
>>>
>>>>>>
>>> This is the client side:
>>>
>>> gst-launch-1.0 videotestsrc ! x264enc ! rtspclientsink
>>>
>>> To rtspclientsink you should provide one or more RTP stream. To change
>> h264 into RTP, you need to add rtph264pay.
>>
>> location=rtsp://127.0.0.1:8554/test
>>> Setting pipeline to PAUSED ...
>>> Pipeline is PREROLLED ...
>>> Progress: (open) Opening Stream
>>> Progress: (connect) Connecting to rtsp://127.0.0.1:8554/test
>>> Redistribute latency...
>>> Progress: (open) Retrieving server options
>>> Progress: (open) Opened Stream
>>> Setting pipeline to PLAYING ...
>>> New clock: GstSystemClock
>>> Progress: (request) Sending RECORD request
>>> Progress: (record) Sending server stream info
>>> ERROR: from element /GstPipeline:pipeline0/GstRTSPClientSink:rtspclientsink0: Could not read from resource.
>>> Additional debug info:
>>> gstrtspclientsink.c(3059): gst_rtsp_client_sink_send (): /GstPipeline:pipeline0/GstRTSPClientSink:rtspclientsink0:
>>> Got error response: 415 (Unsupported Media Type).
>>> Execution ended after 0:00:00.046342782
>>> Setting pipeline to PAUSED ...
>>> Setting pipeline to READY ...
>>> Setting pipeline to NULL ...
>>> Freeing pipeline ...
>>>
>>>>>>
>>> Could you please give me a hint for this problems.
>>>
>>> Thanks in advanced.
>>>
>> _______________________________________________
>>> gstreamer-devel mailing list
>>> gstreamer-devel at lists.freedesktop.org
>>> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>>
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>
> _______________________________________________
> gstreamer-devel mailing listgstreamer-devel at lists.freedesktop.orghttps://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20180903/5f3b039a/attachment-0001.html>


More information about the gstreamer-devel mailing list