SDP Problems

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
cdr70800
New Cone
New Cone
Posts: 3
Joined: 19 Oct 2009 14:46

SDP Problems

Postby cdr70800 » 19 Oct 2009 15:19

Hi there,

i am expieriencing strange Problems when i try to watch a multicast rtp video Stream from my Linksys WVC54GCA Wlan Camera.
Here the VLC Log:

Code: Select all

main debug: adding item `rtp://225.2.0.1:2240' ( rtp://@225.2.0.1:2240 ) main debug: rebuilding array of current - root Playlist main debug: rebuild done - 1 items, index -1 main debug: processing request item rtp://225.2.0.1:2240 node Playlist skip 0 main debug: resyncing on rtp://225.2.0.1:2240 main debug: rtp://225.2.0.1:2240 is at 0 main debug: starting new item main debug: creating new input thread main debug: Creating an input for 'rtp://225.2.0.1:2240' main debug: thread (input) created at priority 22 (input/input.c:230) main debug: thread started main debug: using timeshift granularity of 50 MBytes main debug: using timeshift path '/tmp' main debug: `rtp://@225.2.0.1:2240' gives access `rtp' demux `' path `@225.2.0.1:2240' main debug: creating demux: access='rtp' demux='' path='@225.2.0.1:2240' main debug: looking for access_demux module: 1 candidate macosx debug: input has changed, refreshing interface main debug: net: opening 225.2.0.1 datagram port 2240 main debug: IP_ADD_MEMBERSHIP multicast request main debug: using access_demux module "rtp" main debug: TIMER module_need() : 2.283 ms - Total 2.283 ms / 1 intvls (Avg 2.283 ms) main debug: `rtp://@225.2.0.1:2240' successfully opened sap debug: unknown SDP line type: 0x00
sometimes i also see "unexpected SDP line: 0x63" (0x63 would be a "c", so i guess VLC does not like the "c= IN IP4 225.2.0.1/16" line)

So i fired up my wireshark and captured one of those SAP/SDP Pakets:

Code: Select all

No. Time Source Destination Protocol Info 182 3.375887 10.250.1.99 224.2.127.254 SAP/SDP Announcement (v1), with session description Internet Protocol, Src: 10.250.1.99 (10.250.1.99), Dst: 224.2.127.254 (224.2.127.254) Version: 4 Header length: 20 bytes Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00) 0000 00.. = Differentiated Services Codepoint: Default (0x00) .... ..0. = ECN-Capable Transport (ECT): 0 .... ...0 = ECN-CE: 0 Total Length: 595 Identification: 0x0000 (0) Flags: 0x04 (Don't Fragment) 0... = Reserved bit: Not set .1.. = Don't fragment: Set ..0. = More fragments: Not set Fragment offset: 0 Time to live: 1 Protocol: UDP (0x11) Header checksum: 0x0b3d [correct] [Good: True] [Bad : False] Source: 10.250.1.99 (10.250.1.99) Destination: 224.2.127.254 (224.2.127.254) User Datagram Protocol, Src Port: 918 (918), Dst Port: sapv1 (9875) Source port: 918 (918) Destination port: sapv1 (9875) Length: 575 Checksum: 0xe17a [validation disabled] [Good Checksum: False] [Bad Checksum: False] Session Announcement Protocol Flags: 0x20 001. .... = Version Number: SAPv1 or later (1) ...0 .... = Address Type: IPv4 .... 0... = Reserved: Not set .... .0.. = Message Type: Announcement .... ..0. = Encryption Bit: Payload not encrypted .... ...0 = Compression Bit: Payload not compressed Authentication Length: 0 Message Identifier Hash: 0x7261 Originating Source: 10.250.1.99 Payload type: application/sdp Session Description Protocol Session Description Protocol Version (v): 0 Owner/Creator, Session Id (o): - 000000000000000000 1150370773 IN IP4 10.250.1.99 Owner Username: - Session ID: 000000000000000000 Session Version: 1150370773 Owner Network Type: IN Owner Address Type: IP4 Owner Address: 10.250.1.99 Session Name (s): RTSP Server - WM_Empfangscam Time Description, active time (t): 0 0 Session Start Time: 0 Session Stop Time: 0 Session Attribute (a): charset:Shift_JIS Session Attribute Fieldname: charset Session Attribute Value: Shift_JIS Session Attribute (a): range:npt=0- Session Attribute Fieldname: range Session Attribute Value: npt=0- Session Attribute (a): control:* Session Attribute Fieldname: control Session Attribute Value: * Session Attribute (a): etag:1234567890 Session Attribute Fieldname: etag Session Attribute Value: 1234567890 Media Description, name and address (m): video 2240 RTP/AVP 96 Media Type: video Media Port: 2240 Media Protocol: RTP/AVP Media Format: DynamicRTP-Type-96 Connection Information (c): IN IP4 225.2.0.1/16 Connection Network Type: IN Connection Address Type: IP4 Connection Address: 225.2.0.1 Connection TTL: 16 Bandwidth Information (b): AS:1280 Bandwidth Modifier: AS [Application Specific (RTP session bandwidth)] Bandwidth Value: 1280 kb/s Media Attribute (a): rtpmap:96 MP4V-ES/30000 Media Attribute Fieldname: rtpmap Media Format: 96 MIME Type: MP4V-ES Sample Rate: 30000 Media Attribute (a): control:trackID=1 Media Attribute Fieldname: control Media Attribute Value: trackID=1 Media Attribute (a): fmtp:96 profile-level-id=1; config=000001B001000001B509000001000000012000845D4C28A021E0A31F;decode_buf=76800 Media Attribute Fieldname: fmtp Media Format: 96 [MP4V-ES] Media format specific parameters: profile-level-id=1 [Level Code: Simple Profile/Level 1 (1)] Media format specific parameters: config=000001B001000001B509000001000000012000845D4C28A021E0A31F Configuration: 000001B001000001B509000001000000012000845D4C28A0... 0000 0000 0000 0000 0000 0001 = start code prefix: 0x00000001 1011 0000 = Start code: visual_object_sequence_start_code (176) 0000 0001 = profile_and_level_indication: Simple Profile/Level 1 (1) 0... .... = visual_object_identifier: 0 .000 1... = visual_object_type: video ID (1) .... .0.. = video_signal_type: 0 .... ..01 = Stuffing: 1 0000 0000 0000 0000 0000 0001 = start code prefix: 0x00000001 0000 0000 = Start code: video_object_start_code (0) 0000 0000 0000 0000 0000 0001 = start code prefix: 0x00000001 0010 0000 = Start code: video_object_layer_start_code (32) 0... .... = random_accessible_vol: 0 .000 0000 1... .... = video_object_type_indication: Simple Object Type (1) .0.. .... = is_object_layer_identifier: 0 ..00 01.. = aspect_ratio_info: 1:1 (Square) (1) ..0. .... = vol_control_parameters: 0 ...0 0... = video_object_layer_shape: rectangular (0) Media format specific parameters: decode_buf=76800 Media Attribute (a): x-framerate:30 Media Attribute Fieldname: x-framerate Media Attribute Value: 30 Media Attribute (a): framerate:30.0 Media Attribute Fieldname: framerate Media Attribute Value: 30.0 Media Description, name and address (m): audio 2242 RTP/AVP 97 Media Type: audio Media Port: 2242 Media Protocol: RTP/AVP Media Format: DynamicRTP-Type-97 Media Attribute (a): rtpmap:97 G726-16/8000/1 Media Attribute Fieldname: rtpmap Media Format: 97 MIME Type: G726-16 Sample Rate: 8000/1 Connection Information (c): IN IP4 225.2.0.1/16 Connection Network Type: IN Connection Address Type: IP4 Connection Address: 225.2.0.1 Connection TTL: 16 Bandwidth Information (b): AS:16 Bandwidth Modifier: AS [Application Specific (RTP session bandwidth)] Bandwidth Value: 16 kb/s Media Attribute (a): control:trackID=2 Media Attribute Fieldname: control Media Attribute Value: trackID=2 Media Attribute (a): ptime:125 Media Attribute Fieldname: ptime Media Attribute Value: 125 Data (2 bytes)
So is this a Bug in VLCs SDP protocol implementation or is my Linksys camera sending corrupt sdp pakets?

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

Re: SDP Problems

Postby Rémi Denis-Courmont » 19 Oct 2009 17:57

The SDP is corrupt. The order MUST BE: m-line then (optionally) c-line then any number of a-lines for each media.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

cdr70800
New Cone
New Cone
Posts: 3
Joined: 19 Oct 2009 14:46

Re: SDP Problems

Postby cdr70800 » 20 Oct 2009 10:31

ok, i've read the rfc for sdp and you are right, the problem is, if i deactivate audio streaming on the camera a get this SDP packet:

Code: Select all

No. Time Source Destination Protocol Info 546 12.017103 10.250.1.99 224.2.127.254 SAP/SDP Announcement (v1), with session description Frame 546 (490 bytes on wire, 490 bytes captured) Ethernet II, Src: Cisco-Li_ed:97:42 (00:22:6b:ed:97:42), Dst: IPv4mcast_02:7f:fe (01:00:5e:02:7f:fe) Internet Protocol, Src: 10.250.1.99 (10.250.1.99), Dst: 224.2.127.254 (224.2.127.254) User Datagram Protocol, Src Port: 918 (918), Dst Port: sapv1 (9875) Session Announcement Protocol Session Description Protocol Session Description Protocol Version (v): 0 Owner/Creator, Session Id (o): - 000000000000000000 1150370773 IN IP4 10.250.1.99 Session Name (s): RTSP Server - WM_Empfangscam Time Description, active time (t): 0 0 Session Attribute (a): charset:Shift_JIS Session Attribute (a): range:npt=0- Session Attribute (a): control:* Session Attribute (a): etag:1234567890 Media Description, name and address (m): video 2240 RTP/AVP 96 Connection Information (c): IN IP4 225.2.0.1/16 Bandwidth Information (b): AS:1280 Media Attribute (a): rtpmap:96 MP4V-ES/30000 Media Attribute (a): control:trackID=1 Media Attribute (a): fmtp:96 profile-level-id=1; config=000001B001000001B509000001000000012000845D4C28A021E0A31F;decode_buf=76800 Media Attribute (a): x-framerate:30 Media Attribute (a): framerate:30.0 Data (2 bytes)
This seems to be compliant with the RFC but the Stream does not start an the Log says:

Code: Select all

macosx debug: notification received in VLC with name VLCOSXGUIInit and object VLCEyeTVSupport main debug: adding services_discovery sap... main debug: rebuilding array of current - root Playlist main debug: rebuild done - 0 items, index -1 main debug: looking for services_discovery module: 1 candidate main debug: using services_discovery module "sap" main debug: TIMER module_need() : 63.303 ms - Total 63.303 ms / 1 intvls (Avg 63.303 ms) main debug: net: opening 224.2.127.254 datagram port 9875 main debug: IP_ADD_MEMBERSHIP multicast request main debug: net: opening 239.195.255.255 datagram port 9875 main debug: IP_ADD_MEMBERSHIP multicast request main debug: net: opening 239.255.255.255 datagram port 9875 main debug: IP_ADD_MEMBERSHIP multicast request main debug: net: opening 224.0.0.255 datagram port 9875 main debug: IP_ADD_MEMBERSHIP multicast request main debug: net: opening ff02::2:7ffe%lo0 datagram port 9875 main debug: IPV6_JOIN_GROUP multicast request main error: cannot join IPv6 any-source multicast group (Can't assign requested address) main error: Multicast group join error (Can't assign requested address) main error: Multicast not supported main debug: net: opening ff02::2:7ffe%gif0 datagram port 9875 main debug: IPV6_JOIN_GROUP multicast request main error: cannot join IPv6 any-source multicast group (Can't assign requested address) main error: Multicast group join error (Can't assign requested address) main error: Multicast not supported main debug: net: opening ff02::2:7ffe%stf0 datagram port 9875 main debug: IPV6_JOIN_GROUP multicast request main error: cannot join IPv6 any-source multicast group (Can't assign requested address) main error: Multicast group join error (Can't assign requested address) main error: Multicast not supported main debug: net: opening ff02::2:7ffe%en0 datagram port 9875 main debug: IPV6_JOIN_GROUP multicast request main error: cannot join IPv6 any-source multicast group (Can't assign requested address) main error: Multicast group join error (Can't assign requested address) main error: Multicast not supported main debug: net: opening ff02::2:7ffe%en1 datagram port 9875 main debug: IPV6_JOIN_GROUP multicast request main error: cannot join IPv6 any-source multicast group (Can't assign requested address) main error: Multicast group join error (Can't assign requested address) main error: Multicast not supported main debug: net: opening ff02::2:7ffe%fw0 datagram port 9875 main debug: IPV6_JOIN_GROUP multicast request main error: cannot join IPv6 any-source multicast group (Can't assign requested address) main error: Multicast group join error (Can't assign requested address) main error: Multicast not supported main debug: net: opening ff02::2:7ffe%vboxnet0 datagram port 9875 main debug: IPV6_JOIN_GROUP multicast request main error: cannot join IPv6 any-source multicast group (Can't assign requested address) main error: Multicast group join error (Can't assign requested address) main error: Multicast not supported main debug: net: opening ff01::2:7ffe datagram port 9875 main debug: IPV6_JOIN_GROUP multicast request main debug: net: opening ff04::2:7ffe datagram port 9875 main debug: IPV6_JOIN_GROUP multicast request main error: cannot join IPv6 any-source multicast group (Can't assign requested address) main error: Multicast group join error (Can't assign requested address) main error: Multicast not supported main debug: net: opening ff05::2:7ffe datagram port 9875 main debug: IPV6_JOIN_GROUP multicast request main error: cannot join IPv6 any-source multicast group (Can't assign requested address) main error: Multicast group join error (Can't assign requested address) main error: Multicast not supported main debug: net: opening ff06::2:7ffe datagram port 9875 main debug: IPV6_JOIN_GROUP multicast request main error: cannot join IPv6 any-source multicast group (Can't assign requested address) main error: Multicast group join error (Can't assign requested address) main error: Multicast not supported main debug: net: opening ff07::2:7ffe datagram port 9875 main debug: IPV6_JOIN_GROUP multicast request main error: cannot join IPv6 any-source multicast group (Can't assign requested address) main error: Multicast group join error (Can't assign requested address) main error: Multicast not supported main debug: net: opening ff08::2:7ffe datagram port 9875 main debug: IPV6_JOIN_GROUP multicast request main error: cannot join IPv6 any-source multicast group (Can't assign requested address) main error: Multicast group join error (Can't assign requested address) main error: Multicast not supported main debug: net: opening ff09::2:7ffe datagram port 9875 main debug: IPV6_JOIN_GROUP multicast request main error: cannot join IPv6 any-source multicast group (Can't assign requested address) main error: Multicast group join error (Can't assign requested address) main error: Multicast not supported main debug: net: opening ff0A::2:7ffe datagram port 9875 main debug: IPV6_JOIN_GROUP multicast request main error: cannot join IPv6 any-source multicast group (Can't assign requested address) main error: Multicast group join error (Can't assign requested address) main error: Multicast not supported main debug: net: opening ff0B::2:7ffe datagram port 9875 main debug: IPV6_JOIN_GROUP multicast request main error: cannot join IPv6 any-source multicast group (Can't assign requested address) main error: Multicast group join error (Can't assign requested address) main error: Multicast not supported main debug: net: opening ff0C::2:7ffe datagram port 9875 main debug: IPV6_JOIN_GROUP multicast request main error: cannot join IPv6 any-source multicast group (Can't assign requested address) main error: Multicast group join error (Can't assign requested address) main error: Multicast not supported main debug: net: opening ff0D::2:7ffe datagram port 9875 main debug: IPV6_JOIN_GROUP multicast request main error: cannot join IPv6 any-source multicast group (Can't assign requested address) main error: Multicast group join error (Can't assign requested address) main error: Multicast not supported main debug: net: opening ff0E::2:7ffe datagram port 9875 main debug: IPV6_JOIN_GROUP multicast request main error: cannot join IPv6 any-source multicast group (Can't assign requested address) main error: Multicast group join error (Can't assign requested address) main error: Multicast not supported sap debug: unknown SDP line type: 0x00 sap debug: unknown SDP line type: 0x00 sap debug: unknown SDP line type: 0x00 sap debug: unknown SDP line type: 0x00 sap debug: unknown SDP line type: 0x00 sap debug: unknown SDP line type: 0x00 [repeated for every received sdp packet]
The errors are all ipv6 related, the ipv4 multicast join is ok, i also checked that with netstat, but nothing shows up in the SAP Section of the Playlist and i also cannot watch the video Stream.
So what is the Problem with "unknown SDP line type: 0x00" ?
I cant find a line in the packet that starts with 00 3d(code for = )

cdr70800
New Cone
New Cone
Posts: 3
Joined: 19 Oct 2009 14:46

Re: SDP Problems

Postby cdr70800 » 20 Oct 2009 10:54

Code: Select all

0000 20 00 0d 9a 0a fa 01 63 61 70 70 6c 69 63 61 74 ......capplicat 0010 69 6f 6e 2f 73 64 70 00 76 3d 30 0d 0a 6f 3d 2d ion/sdp.v=0..o=- 0020 20 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 000000000000000 0030 30 30 30 20 31 31 35 30 33 37 30 37 37 33 20 49 000 1150370773 I 0040 4e 20 49 50 34 20 31 30 2e 32 35 30 2e 31 2e 39 N IP4 10.250.1.9 0050 39 0d 0a 73 3d 52 54 53 50 20 53 65 72 76 65 72 9..s=RTSP Server 0060 20 2d 20 57 4d 5f 45 6d 70 66 61 6e 67 73 63 61 - WM_Empfangsca 0070 6d 0d 0a 74 3d 30 20 30 0d 0a 61 3d 63 68 61 72 m..t=0 0..a=char 0080 73 65 74 3a 53 68 69 66 74 5f 4a 49 53 0d 0a 61 set:Shift_JIS..a 0090 3d 72 61 6e 67 65 3a 6e 70 74 3d 30 2d 0d 0a 61 =range:npt=0-..a 00a0 3d 63 6f 6e 74 72 6f 6c 3a 2a 0d 0a 61 3d 65 74 =control:*..a=et 00b0 61 67 3a 31 32 33 34 35 36 37 38 39 30 0d 0a 6d ag:1234567890..m 00c0 3d 76 69 64 65 6f 20 32 32 34 30 20 52 54 50 2f =video 2240 RTP/ 00d0 41 56 50 20 39 36 0d 0a 63 3d 49 4e 20 49 50 34 AVP 96..c=IN IP4 00e0 20 32 32 35 2e 32 2e 30 2e 31 2f 31 36 0d 0a 62 225.2.0.1/16..b 00f0 3d 41 53 3a 31 32 38 30 0d 0a 61 3d 72 74 70 6d =AS:1280..a=rtpm 0100 61 70 3a 39 36 20 4d 50 34 56 2d 45 53 2f 33 30 ap:96 MP4V-ES/30 0110 30 30 30 0d 0a 61 3d 63 6f 6e 74 72 6f 6c 3a 74 000..a=control:t 0120 72 61 63 6b 49 44 3d 31 0d 0a 61 3d 66 6d 74 70 rackID=1..a=fmtp 0130 3a 39 36 20 70 72 6f 66 69 6c 65 2d 6c 65 76 65 :96 profile-leve 0140 6c 2d 69 64 3d 31 3b 20 63 6f 6e 66 69 67 3d 30 l-id=1; config=0 0150 30 30 30 30 31 42 30 30 31 30 30 30 30 30 31 42 00001B001000001B 0160 35 30 39 30 30 30 30 30 31 30 30 30 30 30 30 30 5090000010000000 0170 31 32 30 30 30 38 34 35 44 34 43 32 38 41 30 32 12000845D4C28A02 0180 31 45 30 41 33 31 46 3b 64 65 63 6f 64 65 5f 62 1E0A31F;decode_b 0190 75 66 3d 37 36 38 30 30 0d 0a 61 3d 78 2d 66 72 uf=76800..a=x-fr 01a0 61 6d 65 72 61 74 65 3a 33 30 0d 0a 61 3d 66 72 amerate:30..a=fr 01b0 61 6d 65 72 61 74 65 3a 33 30 2e 30 0d 0a 0d 0a amerate:30.0....
could it be that vlc's sap/sdp implementation interpretes Offset 0017 (00) as the first byte of the SDP section? Wireshark shows Offset 0018 as the start of the SDP section.

Here the correspondig part of rfc2974 (sap):

The payload type field is a MIME content type specifier, describing
the format of the payload. This is a variable length ASCII text
string, followed by a single zero byte (ASCII NUL). The payload type
SHOULD be included in all packets. If the payload type is
`application/sdp' both the payload type and its terminating zero byte
MAY be omitted, although this is intended for backwards compatibility
with SAP v1 listeners only.

So does VLC only understand SAP v1 and treats that zero byte as the first byte of the SAP Payload?

UPDATE:

i took a peek into VLC sap.c and from what i understand i could be right. Unfortunately i cannot compile vlc from source on OSX 10.6 so i cannot further investigate that problem.

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

Re: SDP Problems

Postby Rémi Denis-Courmont » 20 Oct 2009 17:17

This SDP has a dangling empty line at the end...
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: Google [Bot] and 71 guests