H264 to WebRTC

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

H264 to WebRTC

Simon Brown
Hi,
I'm very new to Gstreamer, so please bear with me.
I have an h264 video stream and an aac audio stream in an Mpeg2 Transport stream.  I would like to send this to a webpage using WebRTC.  Everything I read suggests it's possible, but all the examples I've found encode the video first.  Is there a simple pipeline that will let me take the mpeg2ts and output webrtc?

This is all running on an embedded system so I don't have the CPU power to re-encode the video.

Regards,
Simon

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

Re: H264 to WebRTC

Pascal Jacquemart

Hi Simon,

I think it depends on the H264 profile but it should be possible.
You should be able to use something like

filesrc location=video.ts ! tsdemux ! rtph264pay !
application/x-rtp,media=video,encoding-name=H264,payload=96 ! webrtcbin

Cheers,        Pascal

On Wed, 11 Sep 2019 17:24:11 +0100
Simon Brown <[hidden email]> wrote:

> Hi,
> I'm very new to Gstreamer, so please bear with me.
> I have an h264 video stream and an aac audio stream in an Mpeg2
> Transport stream.  I would like to send this to a webpage using
> WebRTC.  Everything I read suggests it's possible, but all the
> examples I've found encode the video first.  Is there a simple
> pipeline that will let me take the mpeg2ts and output webrtc?
>
> This is all running on an embedded system so I don't have the CPU
> power to re-encode the video.
>
> Regards,
> Simon

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

Re: H264 to WebRTC

Simon Brown
On Thu, 12 Sep 2019 at 02:19, Pascal Jacquemart <[hidden email]> wrote:

Hi Simon,

I think it depends on the H264 profile but it should be possible.
You should be able to use something like

filesrc location=video.ts ! tsdemux ! rtph264pay !
application/x-rtp,media=video,encoding-name=H264,payload=96 ! webrtcbin

Cheers,        Pascal


Thanks Pascal,
I'm trying this now on an Ubuntu system, and two things spring to light:
1) webrtcbin isn't available - it looks like this is available from source for gstreamer bad plugins, but not from install of the bad plugins?  
2) It looks like it's only doing the video - is there a secondary path that I can send the audio on?

Cheers,
Simon

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

Re: H264 to WebRTC

Pascal Jacquemart-3
Yes there are few things to be aware of:
- gstwebrtcbin was introduced in 1.14. I am not surprise if you still have an older version.
- Yes you can add an audio path but we will probably need to re-encode the audio. See https://github.com/centricular/gstwebrtc-demos
- You cannot use a static pipeline to use the webrtcbin because you need to plug a custom signalling. So you have to write code and you cannot use gst-launch directly.

Cheers,       Pascal

On 13 Sep 2019, at 21:41, Simon Brown <[hidden email]> wrote:

On Thu, 12 Sep 2019 at 02:19, Pascal Jacquemart <[hidden email]> wrote:

Hi Simon,

I think it depends on the H264 profile but it should be possible.
You should be able to use something like

filesrc location=video.ts ! tsdemux ! rtph264pay !
application/x-rtp,media=video,encoding-name=H264,payload=96 ! webrtcbin

Cheers,        Pascal


Thanks Pascal,
I'm trying this now on an Ubuntu system, and two things spring to light:
1) webrtcbin isn't available - it looks like this is available from source for gstreamer bad plugins, but not from install of the bad plugins?  
2) It looks like it's only doing the video - is there a secondary path that I can send the audio on?

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

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