Can't view WebRTC stream from Janus WebRTC Gateway in Firefox

276 views
Skip to first unread message

Rhythm Chopra

unread,
Feb 24, 2018, 4:38:25 PM2/24/18
to discuss-webrtc
I need to RTP media stream coming from Gstreamer over Web Browser, so I am using Janus WebRTC Gateway for the same. Media stream appears fine in Chrome, but when I try to view the same stream in Firefox, it can't view any stream, moreover the console throws me an error `ICE failed, add a TURN server and see about:webrtc for more details`. On debugging Janus, thorough its Admin API, I figured out that Firefox can't get Remote SDP, whereas Chrome get it. SDP Session state in firefox stays at `gathering` forever, but as soon as it changes to `ready` in Chrome, the stream appears. 

Following are the Session logs for Chrome and FireFox: 
Session Logs for Chrome: https://pastebin.com/WEkMj5DW 
Session Logs for Firefox: https://pastebin.com/wmM6YKJK 

On further debugging, I found out that answer created for SDP negotiation by RTCPeerConnection.createAnswer() returns the answer with attribute `rtpmap:120 VP8/90000` whereas, my stream is `H264/90000` encoded. Is there a way I can create a valid answer for SDP negotiation for H264 encoded stream. 

Please suggest. 

Regards, 
Rhythm 

Byron Campen

unread,
Feb 26, 2018, 10:40:29 AM2/26/18
to discuss...@googlegroups.com, Rhythm Chopra
    I don't see any a=fmtp lines in your logging, which are going to be necessary for H264 negotiation. I bet that the answer has rejected that m-section, and the VP8 stuff is just a placeholder.

Best regards,
Byron Campen
--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/ae97ea7e-c1e5-46ac-a801-1eba019ae373%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Rhythm Chopra

unread,
Feb 26, 2018, 11:27:58 AM2/26/18
to discuss-webrtc
But when the same SDP offer is made to Chrome, it returns with a  valid response. If that is the case, then shouldn't Chrome be rejecting the SDP offer too?

Moreover, as per `janus.plugin.streaming.cfg.sample`, fmtp attribute would be as follows:
videofmtp = profile-level-id=42e01f\;packetization-mode=1

Is there anything in this parameter value that would be necessary for H264 negotiation, or I would need some other parameter?

If needed, I can share both, SDP offer and SDP answer generated by both Chrome and Firefox.

Please suggest, I'm a newbie to PeerToPeer Streaming over WebRTC.

Regards,
Rhythm

Byron Campen

unread,
Feb 26, 2018, 11:44:18 AM2/26/18
to discuss...@googlegroups.com, Rhythm Chopra
On 2/26/18 10:27 AM, Rhythm Chopra wrote:
But when the same SDP offer is made to Chrome, it returns with a  valid response. If that is the case, then shouldn't Chrome be rejecting the SDP offer too?

   Chrome and Firefox differ in how completely they implement the H264 SDP negotiation spec. Firefox generally adheres to the specification more strictly, meaning that some things that work in Chrome don't in Firefox.



Moreover, as per `janus.plugin.streaming.cfg.sample`, fmtp attribute would be as follows:
videofmtp = profile-level-id=42e01f\;packetization-mode=1

   This is not present in the logging for the firefox call in the pastebin link; that SDP has no ftmp line at all.



Is there anything in this parameter value that would be necessary for H264 negotiation, or I would need some other parameter?

If needed, I can share both, SDP offer and SDP answer generated by both Chrome and Firefox.

   That could help.

Best regards,
Byron Campen

Rhythm Chopra

unread,
Feb 26, 2018, 11:54:57 AM2/26/18
to discuss-webrtc
Following are the corresponding SDP offers and answers by Firefox and Chrome.
SDP offer for Firefox      
SDP answer by Firefox

SDP offer generated in either case doesn't have any fmtp parameter, but answer generated by Chrome somehow contains that parameter.
If that is what causing the issue, then please suggest what should be the value I would use for `a=fmtp:` while creating the offer.

Regards,
Rhythm

Lorenzo Miniero

unread,
Feb 26, 2018, 12:04:04 PM2/26/18
to discuss-webrtc
If the fmtp line is missing in the SDP the Janus Streaming plugin originates, then you're not configuring the videofmtp property correctly (maybe it's commented out in the config file?)

L.

Byron Campen

unread,
Feb 26, 2018, 12:05:50 PM2/26/18
to discuss...@googlegroups.com, Rhythm Chopra
    There's no link for the Firefox answer (it is just blue text), but Firefox will reject that offer for sure. The fmtp line that Chrome uses should work fine with Firefox.

Best regards,
Byron Campen

Rhythm Chopra

unread,
Feb 26, 2018, 12:13:20 PM2/26/18
to discuss-webrtc
SDP answer by Firefox.

videofmtp paramter is commented out in `janus.plugin.streaming.cfg`, and initially, it didn't bother me because I couldn't relate it with H264 by any chance.


On Monday, February 26, 2018 at 10:35:50 PM UTC+5:30, Byron Campen wrote:
    There's no link for the Firefox answer (it is just blue text), but Firefox will reject that offer for sure. The fmtp line that Chrome uses should work fine with Firefox.

Since I'm not sending any fmtp value for Chrome either, So are you referring to the one in response generated by Chrome.?
Should I use the same parameter for videofmtp at Janus streaming mountpoint?

Regards
Rhythm 

Lorenzo Miniero

unread,
Feb 26, 2018, 12:16:23 PM2/26/18
to discuss-webrtc
Il giorno lunedì 26 febbraio 2018 18:13:20 UTC+1, Rhythm Chopra ha scritto:
SDP answer by Firefox.

videofmtp paramter is commented out in `janus.plugin.streaming.cfg`, and initially, it didn't bother me because I couldn't relate it with H264 by any chance.



If it's commented, then it won't be used. Try uncommenting it instead and it should appear.

L.

Rhythm Chopra

unread,
Feb 26, 2018, 1:02:24 PM2/26/18
to discuss-webrtc
Using `videofmtp = profile-level-id=42e01f\;packetization-mode=1` in janus.plugin.streaming.cfg, resolves the Firefox issue and stream works fine now.
But it produces some WebRTC error in Chrome.

New SDP offer for Chrome

And console produces the error :
WebRTC error: DOMException: Failed to set remote offer sdp: Session error code: ERROR_CONTENT. Session error description: Failed to set remote video description send parameters

Please suggest a solution for this.
Thanks for your help.

Regards,
Rhythm

Philipp Hancke

unread,
Feb 26, 2018, 1:05:15 PM2/26/18
to WebRTC-discuss
id=42e01f\;packetization-mode=1
-- remove the \ in that.

To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/579bfa6e-0796-4e43-a6ee-e6622ca8ae35%40googlegroups.com.

Rhythm Chopra

unread,
Feb 26, 2018, 1:09:07 PM2/26/18
to discuss-webrtc
Cheers
It works as expected.

Thank you all for your help.

Best Regards,
Rhythm

Lorenzo Miniero

unread,
Feb 27, 2018, 3:42:23 AM2/27/18
to discuss-webrtc
I think you're doing something wrong with the configuration. The slash before the semicolon is needed, when using configuration files, as the semicolon starts comments in INI files, and the slash allows you to escape that character. If you're using the Janus API to create mountpoints, instead, you MUST NOT put the slash.

L.

Rhythm Chopra

unread,
Mar 5, 2018, 10:21:45 AM3/5/18
to discuss-webrtc
Sorry for the late reply.
But I'm dynamically creating mountpoints using Janus API, instead of pre defining it in `janus.plugin.streaming.cfg`.
So, omitting `\` works perfectly.

Regards,
Rhythm
Reply all
Reply to author
Forward
0 new messages