RTSP stream to webrtcbin

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

RTSP stream to webrtcbin

Ottawa Boy
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);

Thanks!

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: RTSP stream to webrtcbin

Matthew Waters
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=<a class="moz-txt-link-freetext" href="rtsp://">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!

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: RTSP stream to webrtcbin

Ottawa Boy
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 <[hidden email]> 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!


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel