Problems detecting SAPs with 0.9.4

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
fulchiero
Blank Cone
Blank Cone
Posts: 12
Joined: 15 Oct 2007 18:28

Problems detecting SAPs with 0.9.4

Postby fulchiero » 08 Oct 2008 23:18

We use Wirecast on an Intel Mac Mini to multicast H.264 video. The SDP file is used by a SAP server to create SAPs, it's not changed.
The SAPs have been detected fine in VLC 0.8.6. However, they are not detected with 0.9.3 and 0.9.4 on Mac OSX 10.4.11, Mac OSX 10.5.5, and WinXP SP3 clients. I understand that VLC is now fussier regarding SAP detection.

This is the original Wirecast SDP that does not create detectable SAPs in 0.9.4 (but does in 0.8.6)

v=0
o=- 82811671 82811671 IN IP4 127.0.0.0
s=Wirecast
t=0 0
a=range:npt=now-
m=audio 5432 RTP/AVP 96
c=IN IP4 233.88.214.139/99/1
a=rtpmap:96 mpeg4-generic/44100/2
a=fmtp:96 profile-level-id=15;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1210
m=video 5434 RTP/AVP 97
c=IN IP4 233.88.214.139/99/1
a=rtpmap:97 H264/90000
a=fmtp:97 packetization-mode=1;profile-level-id=4D401E;sprop-parameter-sets=J01AHqkYFAe2ANQYBBrbCte98BA=,KN4JF6A=
a=cliprect:0,0,480,640
a=framesize:97 640-480
b=AS:1500


Now, all I do is move the b=AS:1500 line to go just below the video c=IN line, and add ONE carriage return at the end of the file.
This results in the following file, which is able to create SAPs that 0.9.4 (and 0.8.6) detect and play the video.

v=0
o=- 82811671 82811671 IN IP4 127.0.0.0
s=Wirecast
t=0 0
a=range:npt=now-
m=audio 5432 RTP/AVP 96
c=IN IP4 233.88.214.139/99/1
a=rtpmap:96 mpeg4-generic/44100/2
a=fmtp:96 profile-level-id=15;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1210
m=video 5434 RTP/AVP 97
c=IN IP4 233.88.214.139/99/1
b=AS:1500
a=rtpmap:97 H264/90000
a=fmtp:97 packetization-mode=1;profile-level-id=4D401E;sprop-parameter-sets=J01AHqkYFAe2ANQYBBrbCte98BA=,KN4JF6A=
a=cliprect:0,0,480,640
a=framesize:97 640-480


There are two settings in VCL under Services discovery, SAP
1) Try to parse announcement (default is on). The SAP module in VLC parses announcement, otherwise parsed by the "live555" (RTP/RTSP) module.
2) SAP strict mode (default is off). SAP parser will discard some non-compliant announcements.

It does not make any difference what the settings are, after the changes are made in the SDP, the SAP always works.
It appears that either Wirecast or VLC does not follow the SDP RFC
http://www.ietf.org/rfc/rfc2327.txt

But I have not waded through it yet...Would anyone know which app is out of spec here?
Also, why is the new VLC so fussy with SAPs, the old one worked fine!

The DJ
Cone Master
Cone Master
Posts: 5987
Joined: 22 Nov 2003 21:52
VLC version: git
Operating System: Mac OS X
Location: Enschede, Holland
Contact:

Re: Problems detecting SAPs with 0.9.4

Postby The DJ » 09 Oct 2008 21:16

We currently also enforce strict SDP with 0.9.*
It turns out that there are apparently MANY SDPs which are not strict at all (incorrect order of options for instance). Unfortunately, it's a bit difficult to switch this behaviour around atm. and i'm not sure what timeline that work is on (I don't think anyone volunteered to solve it yet :D )
Don't use PMs for support questions.

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Problems detecting SAPs with 0.9.4

Postby Rémi Denis-Courmont » 09 Oct 2008 21:43

Non-strict mode allows receiving announces with nul hash, which is bad as it harms caching.

From the letter of the specification, Wirecast is at fault. From your report, I infer that live555 rejects the SDP all the same as VLC.
Some lines in each description are REQUIRED and some are OPTIONAL, but all MUST appear in exactly the order given here (the fixed order greatly enhances error detection and allows for a simple parser). OPTIONAL items are marked with a "*".
(...)
Media description, if present
m= (media name and transport address)
i=* (media title)
c=* (connection information -- optional if included at session level)
b=* (zero or more bandwidth information lines)
k=* (encryption key)
a=* (zero or more media attribute lines)
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

fulchiero
Blank Cone
Blank Cone
Posts: 12
Joined: 15 Oct 2007 18:28

Re: Problems detecting SAPs with 0.9.4

Postby fulchiero » 10 Oct 2008 02:29

Derk-Jan and Rémi, thanks for your prompt response, and for saving me the effort of wading through the rfc, though I am sure I would benefit from it. I am away until Monday, then will definitely contact Wirecast to request they fix their SDP syntax.
I am not positive that live555 rejects the non-compliant Wirecast SDP syntax, as I just used VLC's defaults, with VLC failing to parse the announcements. I will test that Monday.
However, I don't think we can expect most users to dig through preferences and change them to detect a SAP, so it's important that announcements and streams work with default settings whenever possible.
I assume other developers will be encouraged to clean up their SDP and SAP syntax also.
Thanks again, what great support!


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 33 guests