RTSP stream to webrtcbin

Ottawa Boy ottawa.boy14 at gmail.com
Wed Apr 11 14:02:06 UTC 2018


Hi Matt,

Thanks for your reply. I tried the following pipeline as per your
suggestion but the video still continues to allude me.

gst_parse_launch("rtspsrc location=rtsp://10.51.52.115/h264 ! rtph264depay
! rtph264pay ! application/x-rtp,media=video,encoding-name=H264,payload=96
! webrtcbin name=sendrecv", &error);

I also tried replacing rtspsrc with urisourcebin but that hasn't worked
either.

gst_parse_launch("urisourcebin uri=rtsp://10.51.52.115/h264 ! rtph264depay
! rtph264pay ! application/x-rtp,media=video,encoding-name=H264,payload=96
! webrtcbin name=sendrecv", &error);

Do both of these pipelines look reasonable? Perhaps I missed some
intermediate element/plugin.

The only way that I have managed to get video is to decode the H264 frames
and re-encode them in H264 format, which is redundant and undesirable.

gst_parse_launch("rtspsrc location=rtsp://10.51.52.115/h264 ! rtph264depay
! h264parse ! decodebin ! videoconvert ! queue ! x264enc ! rtph264pay !
queue ! application/x-rtp,media=video,encoding-name=H264,payload=96 !
webrtcbin name=sendrecv", &error);

Thanks!
Talha

On Wed, Apr 11, 2018 at 1:16 AM, Matthew Waters <ystreet00 at gmail.com> wrote:

> On 11/04/18 07:32, Ottawa Boy wrote:
>
> Hi Nirbheek,
>
> In your reply to Ivan in the comments section of your blog post, you
> mentioned that it should be possible to directly payload-encode an RTSP
> stream containing H264 frames into webrtcbin without having to first decode
> it and then re-encode it. I am interested in this exact scenario. I've
> tried the following pipeline but it doesn't show the video on the webpage.
> There is no error in the browser console either. Could you please take a
> look and let me know if there is something wrong with this pipeline?
>
> gst_parse_launch("rtspsrc location=rtsp://10.51.52.115/h264 ! queue !
> rtph264pay ! application/x-rtp,media=video,encoding-name=H264,payload=96
> ! webrtcbin name=sendrecv", &error);
>
>
> You need to depayload after rtspsrc before you repayload again.
>
> i.e. add a rtph264depay before rtph264pay.
>
> Cheers
> -Matt
>
> Thanks!
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20180411/5883a94e/attachment.html>


More information about the gstreamer-devel mailing list