Anybody having a working GStreamer webrtcbin H.264 pipeline?

426 views
Skip to first unread message

Neil Young

unread,
Aug 21, 2021, 4:28:58 AM8/21/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 AM8/28/21
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 AM8/28/21
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.

Israel Robotnick

unread,
4:37 PM (5 hours ago) 4:37 PM
to discuss-webrtc
Hey Neil

Did you manage to make main\high profiles work?

For some reason on kurento it works (Main on chrome 119 without transcoding) , but basically the same pipeline with webrtcbin doesnt - meaning it connects, but the feed jumps.
(works great on baseline with both kurento and webrtcbin)

I generated both pipelines to pdf, and they are basically the same (apart of kurento using appsrc that I guess have rtspsrc+decodebin inside). Makes me crazy.
(I don't know on which chrome version they started to accept main. They even accept high profile these days. But again doesnt work well for me with webrtcbin)

Thanks
Reply all
Reply to author
Forward
0 new messages