Anybody having a working GStreamer webrtcbin H.264 pipeline?

51 views
Skip to first unread message

Neil Young

unread,
Aug 21, 2021, 4:28:58 AMAug 21
to discuss-webrtc
...which is applicable in order to answer an incoming offer from a browser?

I can do VP8 offering/answering from webrtcbin and offering H.264, but I cannot negotiate any single H.264 connection offered from one of the browsers with webrtcbin.


Takenori Sato

unread,
Aug 28, 2021, 10:11:21 AMAug 28
to discuss-webrtc
> I can do VP8 offering/answering from webrtcbin and offering H.264, but I cannot negotiate any single H.264 connection offered from one of the browsers with webrtcbin.

It is because a GStreamer pipeline with webrtbin has to be built before making an offer/answer. 

So, the connected encoder, which is H.264 in your case, is configured as the default one as 96. You can see such an answer from webrtcbin no matter what offer arrives. 

While Chrome uses VP8 as a default encoder on its offer. Then, webrtcbin can not find a matched media, then fails a negotiation.

an offer from Chrome

a=rtpmap:96 VP8/90000



You can make the H.264 work by:
  1. building an offer from Chrome by yourself (never tried by myself)
  2. adding a capsfilter to your GStreamer pipeline by assuming an offer from Chrome (this could change by device type, e.g. PC or mobile)
2021年8月21日土曜日 17:28:58 UTC+9 forevern...@googlemail.com:

Neil Young

unread,
Aug 28, 2021, 10:44:49 AMAug 28
to discuss-webrtc
> It is because a GStreamer pipeline with webrtbin has to be built before making an offer/answer. 
This is what I'm doing. I'm getting the offer,  creating and starting the pipeline, set-remote-description and creating the answer.

W/o intervention there is no way to make that reliably run with H.264. VP8 always works. What I'm doing now is: I examine, what profile-level-id is generated, if I'm the offerer. This profile-level-id is patched into the first found H.264 profile before the SDP is passed via set-remote-description. While opening the pipeline I'm setting the payload-id of the first found H.264 in the rtp264caps. This is simply just a pain in the a..., but it works for some cameras (of course not for all) but with all browsers.
Reply all
Reply to author
Forward
0 new messages