I have confirmed that it is NOT a codec problem, even though the profile is MAIN, because I loaded a .mp4 with the exact same codec successfully in firefox using HTML5 tag with local .mp4 file, worked perfectly. Our cameras do not support changing the profile from MAIN.
The SDPs seem to have a discrepancy between the browsers:
FIREFOX:
Remote SDP (janus):
a=fmtp:96 profile-level-id=420029;
CHROME:
Remote SDP (janus):
a=fmtp:96 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f
What is weird about this is that the streaming plugin is configured as per the Chrome reported Remote SDP. It's the EXACT same streaming plugin configuration.
Firefox's local SDP just indicates rejected:
m=video 0 RTP/SAVPF 120
c=IN IP4 0.0.0.0
a=inactive
a=rtpmap:120 VP8/90000
NOTE: I have applied all relevant fixes to firefox configuration to enable H264 and to prefer it over VP8, it doesn't make a difference, to be honest I think it doesn't get that far. The profile-level-id seems to be incorrectly sent from Janus with the wrong value when FF is in use.
Config:
streaming plugin:
[rtsp-test]
type = rtsp
id = 99
description = RTSP Test
audio = no
video = yes
videopt = 96
videortpmap = H264:90000
videofmtp = profile-level-id=42e01f\;packetization-mode=1;level-asymmetry-allowed=1
url=rtsp://a.b.c.d/Streaming/Channels/1
rtsp_user=admin
rtsp_pwd=abcd
We do see an "ICE failed" in the firefox web console, but I can't figure out how to see the rest of ICE debug in FF. My suspicion is this has something to do with ICE, but I can't figure it out. I've read this issue: https://github.com/meetecho/janus-gateway/issues/83 but it sounds like you fixed the trickle issues you had before. Our FF version is 50+, in particular 50.1.0.
--
You received this message because you are subscribed to the Google Groups "meetecho-janus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to meetecho-janus+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to meetecho-janu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Regards,Mirko
--
You received this message because you are subscribed to the Google Groups "meetecho-janus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to meetecho-janus+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to meetecho-janu...@googlegroups.com.
if (event.candidate == null ||
1275 (adapter.browserDetails.browser === 'edge' && event.candidate.candidate.indexOf('endOfCandidates') > 0)) {
1276 Janus.log("End of candidates.");
1277 config.iceDone = true;
1278 if(config.trickle === true) {
1279 // Notify end of candidates
1280 sendTrickleCandidate(handleId, {"completed": true});
1281 } else {
1282 // No trickle, time to send the complete SDP (including all candidates)
1283 sendSDP(handleId, callbacks);
1284 }
Rgds Anton
To unsubscribe from this group and stop receiving emails from it, send an email to meetecho-janu...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to meetecho-janus+unsubscribe@googlegroups.com.
RFC 6184 8.2.2:
o The parameters identifying a media format configuration for H.264
are profile-level-id and packetization-mode. These media format
configuration parameters (except for the level part of profile-
level-id) MUST be used symmetrically; that is, the answerer MUST
either maintain all configuration parameters or remove the media
format (payload type) completely if one or more of the parameter
values are not supported. Note that the level part of profile-
level-id includes level_idc, and, for indication of Level 1b when
profile_idc is equal to 66, 77, or 88, bit 4
(constraint_set3_flag) of profile-iop. The level part of profile-
level-id is changeable.
i.e. you can't answer profile-level-id=42e0xx with 4200xx - they don't
match. Many H264 impls ignore the constraint bits and hope things just
work. As it's invalid, we should probably call the error callback, but
I think instead it just didn't start send or receive for video.
Also: I would generally suggest using Mode 1 and not mode 0. While it
may not matter (most implementations that support both handle this) but
mode 0 has a bug where we send SPS/PPS in a STAP-A packet (which is
mode-1 only).
Randell Jesup
Hi Lorenzo,
It's there, but it's just a rejection and contains m=video 0 RTP/SAVPF 120.
I have done some more digging and discovered a few things:
1) FF does NOT like profile-level-id 420029
2) If I transcode the h264 stream from my camera using FFMPEG and present it as RTP to Janus, then FF successfully negotiates everything, all ICE, SDPs etc look ok. When I transcode, I map it to 42e01f.
3) As I mentioned earlier, Chrome just sends back 42e01f in the answer, and things just work.
4) Janus doesn't allow me to override the profile-level-id, I have it set to 42e01f but it still sends 420029. I don't know if this is intended behaviour or not, but if I can find a way to override this and force 42e01f it may provide a solution
I also found this on the mozilla dev media group that may explain it. It says you can't answer profile-level 42e0xx with profile-level 4200xx, it's similar to my problem but back to front - I'm sending 4200xx and the other side doesn't like it. Chrome seems to break this RFC and just answers with 42e0xx anyway, and it works.
Il giorno venerdì 27 gennaio 2017 14:44:18 UTC+1, Anton Smith ha scritto:Hi Lorenzo,
It's there, but it's just a rejection and contains m=video 0 RTP/SAVPF 120.
I have done some more digging and discovered a few things:
1) FF does NOT like profile-level-id 420029
2) If I transcode the h264 stream from my camera using FFMPEG and present it as RTP to Janus, then FF successfully negotiates everything, all ICE, SDPs etc look ok. When I transcode, I map it to 42e01f.
3) As I mentioned earlier, Chrome just sends back 42e01f in the answer, and things just work.
4) Janus doesn't allow me to override the profile-level-id, I have it set to 42e01f but it still sends 420029. I don't know if this is intended behaviour or not, but if I can find a way to override this and force 42e01f it may provide a solutionJanus and the Streaming plugin have no idea what 420029 or 42e01f are (they're nowhere in the code) so it's definitely not Janus that is preventing you to do that or messing with the SDP. Make sure you're escaping all the semicolons and not just the first one in the fmtp when configuring the mountpoint. Besides, if you're changing the configuration file you need to restart Janus for it to have effect. If you don't want to do that, you have to destroy the mountpoint and create a new one via Streaming plugin API.
Hi,
On Friday, January 27, 2017 at 2:51:36 PM UTC+1, Lorenzo Miniero wrote:
Il giorno venerdì 27 gennaio 2017 14:44:18 UTC+1, Anton Smith ha scritto:Hi Lorenzo,
It's there, but it's just a rejection and contains m=video 0 RTP/SAVPF 120.
I have done some more digging and discovered a few things:
1) FF does NOT like profile-level-id 420029
2) If I transcode the h264 stream from my camera using FFMPEG and present it as RTP to Janus, then FF successfully negotiates everything, all ICE, SDPs etc look ok. When I transcode, I map it to 42e01f.
3) As I mentioned earlier, Chrome just sends back 42e01f in the answer, and things just work.
4) Janus doesn't allow me to override the profile-level-id, I have it set to 42e01f but it still sends 420029. I don't know if this is intended behaviour or not, but if I can find a way to override this and force 42e01f it may provide a solutionJanus and the Streaming plugin have no idea what 420029 or 42e01f are (they're nowhere in the code) so it's definitely not Janus that is preventing you to do that or messing with the SDP. Make sure you're escaping all the semicolons and not just the first one in the fmtp when configuring the mountpoint. Besides, if you're changing the configuration file you need to restart Janus for it to have effect. If you don't want to do that, you have to destroy the mountpoint and create a new one via Streaming plugin API.
Yes, I've been restarting Janus (it's a test setup). I've tried escaping all semicolons, and only having the profile-level in the line. If Janus doesn't care about what these levels are, what does the configuration option for videofmtp do in the streaming plugin configuration? I did try looking through the code and noted that janus doesn't set any values explicitly itself, but could you point me to the part where you take the videofmtp config and set the values in the SDP? (I tried looking and couldn't find it. Maybe I am a bit tired, I've been banging my head on this for over 24 hours). It may not work with FF anyway, but I want to see if it throws some different errors if I set it manually to 42e01f.
And while I would tend to agree with you that it seems like something that Chrome supports and FF doesn't, I can't understand why FF can play a file with the same codec when wrapped in normal HTML5 video tag (to do this, I simply used ffmpeg and wrote out some of the RTSP based stream to a .mp4 file).
Il giorno venerdì 27 gennaio 2017 16:12:30 UTC+1, Anton Smith ha scritto:Hi,
On Friday, January 27, 2017 at 2:51:36 PM UTC+1, Lorenzo Miniero wrote:
Il giorno venerdì 27 gennaio 2017 14:44:18 UTC+1, Anton Smith ha scritto:Hi Lorenzo,
It's there, but it's just a rejection and contains m=video 0 RTP/SAVPF 120.
I have done some more digging and discovered a few things:
1) FF does NOT like profile-level-id 420029
2) If I transcode the h264 stream from my camera using FFMPEG and present it as RTP to Janus, then FF successfully negotiates everything, all ICE, SDPs etc look ok. When I transcode, I map it to 42e01f.
3) As I mentioned earlier, Chrome just sends back 42e01f in the answer, and things just work.
4) Janus doesn't allow me to override the profile-level-id, I have it set to 42e01f but it still sends 420029. I don't know if this is intended behaviour or not, but if I can find a way to override this and force 42e01f it may provide a solutionJanus and the Streaming plugin have no idea what 420029 or 42e01f are (they're nowhere in the code) so it's definitely not Janus that is preventing you to do that or messing with the SDP. Make sure you're escaping all the semicolons and not just the first one in the fmtp when configuring the mountpoint. Besides, if you're changing the configuration file you need to restart Janus for it to have effect. If you don't want to do that, you have to destroy the mountpoint and create a new one via Streaming plugin API.
Yes, I've been restarting Janus (it's a test setup). I've tried escaping all semicolons, and only having the profile-level in the line. If Janus doesn't care about what these levels are, what does the configuration option for videofmtp do in the streaming plugin configuration? I did try looking through the code and noted that janus doesn't set any values explicitly itself, but could you point me to the part where you take the videofmtp config and set the values in the SDP? (I tried looking and couldn't find it. Maybe I am a bit tired, I've been banging my head on this for over 24 hours). It may not work with FF anyway, but I want to see if it throws some different errors if I set it manually to 42e01f.videofmtp is something we manually add as a=fmtp: for video in the SDP. Since codecs may differ, we let developers choose what should be there (in this case to describe H.264). This is what we specify in the H.264 example as well, for instance:Anyway, please beware that this only applies to plain RTP mountpoints, that is mountpoints you feed yourself by sending RTP packets to the ports you configured. Since you mentioned RTSP cameras in your title, if you're having Janus connect via RTSP to your camera then settings like videofmtp will be ignored, as the whole SDP template that is used is whatever the camera sends in the SDP the RTSP answer contains. For RTSP mountpoints the whole configuration is basically automatically generated out of the negotiation with the RTSP server. Not sure if this is what is happening in your tests?
And while I would tend to agree with you that it seems like something that Chrome supports and FF doesn't, I can't understand why FF can play a file with the same codec when wrapped in normal HTML5 video tag (to do this, I simply used ffmpeg and wrote out some of the RTSP based stream to a .mp4 file).
The WebRTC media stack in browsers is separated from the simple decoding stuff used for file-based playout. For WebRTC, Firefox uses openH264 as an external library to encode/decode H.264, while for MP4 I guess something else is used.
On Friday, January 27, 2017 at 4:33:00 PM UTC+1, Lorenzo Miniero wrote:Il giorno venerdì 27 gennaio 2017 16:12:30 UTC+1, Anton Smith ha scritto:Hi,
On Friday, January 27, 2017 at 2:51:36 PM UTC+1, Lorenzo Miniero wrote:
Il giorno venerdì 27 gennaio 2017 14:44:18 UTC+1, Anton Smith ha scritto:Hi Lorenzo,
It's there, but it's just a rejection and contains m=video 0 RTP/SAVPF 120.
I have done some more digging and discovered a few things:
1) FF does NOT like profile-level-id 420029
2) If I transcode the h264 stream from my camera using FFMPEG and present it as RTP to Janus, then FF successfully negotiates everything, all ICE, SDPs etc look ok. When I transcode, I map it to 42e01f.
3) As I mentioned earlier, Chrome just sends back 42e01f in the answer, and things just work.
4) Janus doesn't allow me to override the profile-level-id, I have it set to 42e01f but it still sends 420029. I don't know if this is intended behaviour or not, but if I can find a way to override this and force 42e01f it may provide a solutionJanus and the Streaming plugin have no idea what 420029 or 42e01f are (they're nowhere in the code) so it's definitely not Janus that is preventing you to do that or messing with the SDP. Make sure you're escaping all the semicolons and not just the first one in the fmtp when configuring the mountpoint. Besides, if you're changing the configuration file you need to restart Janus for it to have effect. If you don't want to do that, you have to destroy the mountpoint and create a new one via Streaming plugin API.
Yes, I've been restarting Janus (it's a test setup). I've tried escaping all semicolons, and only having the profile-level in the line. If Janus doesn't care about what these levels are, what does the configuration option for videofmtp do in the streaming plugin configuration? I did try looking through the code and noted that janus doesn't set any values explicitly itself, but could you point me to the part where you take the videofmtp config and set the values in the SDP? (I tried looking and couldn't find it. Maybe I am a bit tired, I've been banging my head on this for over 24 hours). It may not work with FF anyway, but I want to see if it throws some different errors if I set it manually to 42e01f.videofmtp is something we manually add as a=fmtp: for video in the SDP. Since codecs may differ, we let developers choose what should be there (in this case to describe H.264). This is what we specify in the H.264 example as well, for instance:Anyway, please beware that this only applies to plain RTP mountpoints, that is mountpoints you feed yourself by sending RTP packets to the ports you configured. Since you mentioned RTSP cameras in your title, if you're having Janus connect via RTSP to your camera then settings like videofmtp will be ignored, as the whole SDP template that is used is whatever the camera sends in the SDP the RTSP answer contains. For RTSP mountpoints the whole configuration is basically automatically generated out of the negotiation with the RTSP server. Not sure if this is what is happening in your tests?
Yes, that's right. It's an RTSP based camera, so your description matches what is happening.
Il giorno venerdì 27 gennaio 2017 16:53:48 UTC+1, Anton Smith ha scritto:
On Friday, January 27, 2017 at 4:33:00 PM UTC+1, Lorenzo Miniero wrote:Il giorno venerdì 27 gennaio 2017 16:12:30 UTC+1, Anton Smith ha scritto:Hi,
On Friday, January 27, 2017 at 2:51:36 PM UTC+1, Lorenzo Miniero wrote:
Il giorno venerdì 27 gennaio 2017 14:44:18 UTC+1, Anton Smith ha scritto:Hi Lorenzo,
It's there, but it's just a rejection and contains m=video 0 RTP/SAVPF 120.
I have done some more digging and discovered a few things:
1) FF does NOT like profile-level-id 420029
2) If I transcode the h264 stream from my camera using FFMPEG and present it as RTP to Janus, then FF successfully negotiates everything, all ICE, SDPs etc look ok. When I transcode, I map it to 42e01f.
3) As I mentioned earlier, Chrome just sends back 42e01f in the answer, and things just work.
4) Janus doesn't allow me to override the profile-level-id, I have it set to 42e01f but it still sends 420029. I don't know if this is intended behaviour or not, but if I can find a way to override this and force 42e01f it may provide a solutionJanus and the Streaming plugin have no idea what 420029 or 42e01f are (they're nowhere in the code) so it's definitely not Janus that is preventing you to do that or messing with the SDP. Make sure you're escaping all the semicolons and not just the first one in the fmtp when configuring the mountpoint. Besides, if you're changing the configuration file you need to restart Janus for it to have effect. If you don't want to do that, you have to destroy the mountpoint and create a new one via Streaming plugin API.
Yes, I've been restarting Janus (it's a test setup). I've tried escaping all semicolons, and only having the profile-level in the line. If Janus doesn't care about what these levels are, what does the configuration option for videofmtp do in the streaming plugin configuration? I did try looking through the code and noted that janus doesn't set any values explicitly itself, but could you point me to the part where you take the videofmtp config and set the values in the SDP? (I tried looking and couldn't find it. Maybe I am a bit tired, I've been banging my head on this for over 24 hours). It may not work with FF anyway, but I want to see if it throws some different errors if I set it manually to 42e01f.videofmtp is something we manually add as a=fmtp: for video in the SDP. Since codecs may differ, we let developers choose what should be there (in this case to describe H.264). This is what we specify in the H.264 example as well, for instance:Anyway, please beware that this only applies to plain RTP mountpoints, that is mountpoints you feed yourself by sending RTP packets to the ports you configured. Since you mentioned RTSP cameras in your title, if you're having Janus connect via RTSP to your camera then settings like videofmtp will be ignored, as the whole SDP template that is used is whatever the camera sends in the SDP the RTSP answer contains. For RTSP mountpoints the whole configuration is basically automatically generated out of the negotiation with the RTSP server. Not sure if this is what is happening in your tests?
Yes, that's right. It's an RTSP based camera, so your description matches what is happening.
Then in order to get it to work you have to either make the camera send a different fmtp, or edit the SDP in JavaScript before passing it to the browser in setRemoteDescription (in janus.js terms, before calling handleRemoteJsep), e.g., by doing a simple string replace on the profile code.
// Create offer/answer now
if(jsep === null || jsep === undefined) {
createOffer(handleId, media, callbacks);
} else {
if(adapter.browserDetails.browser === "edge") {
// This is Edge, add an a=end-of-candidates at the end
jsep.sdp += "a=end-of-candidates\r\n";
}
var oldsdp = jsep["sdp"];
var pattern=/420029/gi;
var newsdp = oldsdp.replace(pattern,"42e01f");
Janus.log(newsdp);
jsep["sdp"]=newsdp;
config.pc.setRemoteDescription(
new RTCSessionDescription(jsep),
function() {
Janus.log("Remote description accepted!");
createAnswer(handleId, media, callbacks);
}, callbacks.error);
}
}
[rtsp-test]
type = rtsp
id = 4
description = RTSP
url = rtsp://admin:ad...@a.b.c.d:554/11
audio = no
video = yes
videopt = 96
videortpmap = H264/90000
videofmtp = profile-level-id=42e01f\;packetization-mode=1\;sprop-parameter-sets=Z00AKpWoHgCJ+VA=,aO48gA==
secret = adminpwd
You received this message because you are subscribed to a topic in the Google Groups "meetecho-janus" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/meetecho-janus/jKg5u9421kM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to meetecho-janu...@googlegroups.com.
Resolution: 1280x720
Bitrate: 1024
Maximum Frame: 25
Bit Rate Type: Constant bitrate
I Frame Gap: 25
L.
Lorenzo
<div style="background-color:rgb(250,250,250);border-color:rgb(187,187,187);border-style:solid;border-wid
Yepp I saw this thread too.The thing is that it does not matter if I restart FFMPEG, the stream does not get displayed.I don't get why is it that difficult, sorry :)