VLC player does not correctly decode SAP announcements?

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
SiL
New Cone
New Cone
Posts: 8
Joined: 19 Aug 2010 14:38

VLC player does not correctly decode SAP announcements?

Postby SiL » 19 Aug 2010 15:10

HI there,

I do wirecast streaming & reflect multicast streams from a Quicktime Streaming Server (QTSS)..

* The streams are H264 streams with separate udp ports for video and audio. the streams play successfully either in QTplayer or VLC.
* I also wanted to be able to use SAP to announce the streams so that VLC users could simply find the streams via SAP Announcements instead of having to download a SDP file and open it with VLC.
* I came across a program called EasySAPAnnounce which will generate SAP announcements from SDP files (I had tried compiling miniSAPServer but the last two versions failed to compile on OS X using GSS compiler)
* I was able to successfully generate SAP announcements, however VLC would not see the announcements (so I thought)
* When I examined the Messages window under VLC player (1.1.12 - OSX) I found entries indicating that the media type was not decoded ...
"sap debug: Multiple media ports not supported -> live555"

So I messed around with the SAP file by deliberately removing either the m=video or m=audio entries and the subsequent lines from the SDP file. As soon as there was only one media type entry (m=) the SAP announcement appeared in the VLC SAP announcements list.

SO it appears that the SAP announcements decoder is not recognising SDP files where there is more than one media type (as there is for 264 and other media encodings) even though they are standards compliant SDP files.

If I can make a guess, the VLC code is currently only decoding multliplexed MPG2-TS streams where the interleaved media is sent on the one udp port only.

Can this be fixed so that SAP announcements for streams that use separate video and audio ports (e.g H264 streams) can be correctly interpreted by the VLC player SAP Announcements list?

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

Re: VLC player does not correctly decode SAP announcements?

Postby Rémi Denis-Courmont » 19 Aug 2010 22:13

It can be fixed if someone writes the (large amount of) code required for it.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

SiL
New Cone
New Cone
Posts: 8
Joined: 19 Aug 2010 14:38

Re: VLC player does not correctly decode SAP announcements?

Postby SiL » 20 Aug 2010 06:01

I understand that some of the 0.9 versions of VLC did decode SAP announcements with multiple media ports, so perhaps this code has existed previously and for some reason has dropped out of the final product?

Still seems rather strange that a player that claims to handle almost anything does not cope with more than just basic SAP announcements. :roll:

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

Re: VLC player does not correctly decode SAP announcements?

Postby Rémi Denis-Courmont » 20 Aug 2010 17:00

VLC never decoded SDP's with more than one media line or with dynamic payload format(s). It has always let live555 decode them. There is no difference from 0.9.

Make sure your VLC is linked with the same live555 version.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

SiL
New Cone
New Cone
Posts: 8
Joined: 19 Aug 2010 14:38

Re: VLC player does not correctly decode SAP announcements?

Postby SiL » 25 Aug 2010 05:06

Rémi,

It appears that although RFC4566 allows an SDP file to have the c="<connection info>" information either present once in the session block for all of the media, or present in each of the media block(s), the live555 decoding engine/library in VLC only recognises the second option where the connection information is contained within each media block.

SO this is not recognised by the SAP decoding engine in VLC:

v=0
o=- 1896458343 1896458343 IN IP4 xxx.xxx.xxx.xxx
s=Wirecast
c=IN IP4 239.255.xxx.xxx/15/1
t=0 0
a=range:npt=now-
m=audio 5516 RTP/AVP 96
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 5518 RTP/AVP 97
a=rtpmap:97 X-QT/90000

But modifying the SDP to the following format does make the SAP announcement visible.


v=0
o=- 1896458343 1896458343 IN IP4 xxx.xxx.xxx.xxx
s=Wirecast
t=0 0
a=range:npt=now-
m=audio 5516 RTP/AVP 96
c=IN IP4 239.255.xxx.xxx/15/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 5518 RTP/AVP 97
c=IN IP4 239.255.xxx.xxx/15/1
a=rtpmap:97 X-QT/90000

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

Re: VLC player does not correctly decode SAP announcements?

Postby Rémi Denis-Courmont » 27 Aug 2010 04:33

Frankly, I do not know what live555 does internally. This is not developed by the VideoLAN project.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

SiL
New Cone
New Cone
Posts: 8
Joined: 19 Aug 2010 14:38

Re: VLC player does not correctly decode SAP announcements?

Postby SiL » 19 Feb 2011 08:50

Frankly, I do not know what live555 does internally. This is not developed by the VideoLAN project.
Denis, I have just come back to this conundrum... Up to VLC 1.0.5, SAP Announcements for RTSP streams (H264) with more than one media port that had a corresponding sdp file with connection information {(c) entry} for each media port were correctly decoded by VLC/live555 library and appeared in the SAP services discovery list. (and would successfully open the multicast stream}

This post http://lists.mplayerhq.hu/pipermail/ffm ... 98564.html has some information that implies that there is a limiting condition encoded into VLC or live555
> [...]
> > Or to test with VLC:
> >
> > ffmpeg -re -i<input> -vcodec mpeg4 -acodec libfaac -f sap
> > sap://244.0.0.255?same_port=1
> >
> > (VLC/Live555 requires all RTP streams to be received on the same port in
> > this scenario, for some reasons...)
>
> I do not seem to remember a similar limitation... Can it be due to the
> issue I mentioned above (about the destination addresses)?
After VLC 1.0.5, VLC would no longer decode SAP announcements with multiple media posts and corresponding connection information (even though these are compliant with the SAP/SDP standards).

So either this "workaround" was accidentally or purposefully changed, either in the parameters of the VLC libraries or the live555 libraries (my guess).

Is a fix within the capabilities of the VLC project (compiling option) or is it only an option in the compiling of the live555 libraries. It would be a very useful "fix" for the users who run QTSS and other forms of multicast RTSP streams to be able to have their broadcasts listed under the SAP announcements... as I said, it DID work, and after 1.0.5 it stopped working with this form of SDP file as a SAP announcement
v=0
o=- 1896458343 1896458343 IN IP4 xxx.yyy.zzz.aaa
s=Information
i=Test SAP announcement for streaming
u=http://address
t=0 0
a=range:npt=now-
m=audio 5516 RTP/AVP 96
c=IN IP4 239.255.1.1/15/1
b=AS:64
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 5518 RTP/AVP 97
c=IN IP4 239.255.1.1/15/1
b=AS:1000
a=rtpmap:97 X-QT/90000
a=cliprect:0,0,272,480
a=framesize:97 480-272

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

Re: VLC player does not correctly decode SAP announcements?

Postby Rémi Denis-Courmont » 19 Feb 2011 09:38

The VLC project is happy to review your patches on the vlc-devel mailing list.
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: VLC player does not correctly decode SAP announcements?

Postby fulchiero » 21 Feb 2011 23:46

I have a new link to EasySAPAnnouncer info, and the downloads, if anyone is interested.
https://sites.google.com/a/conncoll.edu ... ticast/esa
Have been out of the SAP/SDP "loop" for a while so trying to re-aquaint myself with the standards.

I had problems a couple of years ago using it with VLC and Wirecast, and started a thread
viewtopic.php?f=2&t=51120
but never had the time to follow up with Wirecast. Not enough hours in the day!
Thanks to SiL for bringing ESA up again, I think it could be a handy utility if we can get it to work right with VLC.
I am not a programmer, but if changes need to be made to ESA I can contact the original programmer to see if it's possible.

SiL
New Cone
New Cone
Posts: 8
Joined: 19 Aug 2010 14:38

Re: VLC player does not correctly decode SAP announcements?

Postby SiL » 04 Mar 2011 14:29

VLC never decoded SDP's with more than one media line or with dynamic payload format(s). It has always let live555 decode them. There is no difference from 0.9.

Make sure your VLC is linked with the same live555 version.
I have asked at live555.com the developer there says that live555 correctly interprets sdp content with more than one media line, and says that it must be separate code that vlc uses to decode Sap announcements.
The problem we have been experiencing is decoding the SAP announcement
with the SDP information embedded inside it. VLC does interpret SAP
announcements, but not SAP announcements with multiple media lines.
The "messages" output from VLC implies that it is a live555 library
function {used to decode the SAP announce}

here's a line that one sees often in that messages window...

"sap debug: Multiple media ports not supported -> live555"
This error message is printed by VLC (specifically, the VLC file "modules/services_discovery/sap.c"), not by our code. I don't know why it's mentioning "live555" at all, because - as far as I can tell - it is *not* using the LIVE555 library at this point to parse the SDP announcement.

In any case, if VLC *were* using the LIVE555 library to parse the SDP announcement, then there would not be a problem, because we can (and always have been able to) parse SDP descriptions that contain multiple "m=" lines.

So this is an issue to raise with the VLC developers, not us.
my apologies, I am note a code writer or developer, but a frustrated video engineer who can see that there should be a cooperative solution somewhere here -- This is a merry-go-round

HELP please...

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

Re: VLC player does not correctly decode SAP announcements?

Postby Rémi Denis-Courmont » 04 Mar 2011 22:05

The message is VLC telling you that it is incapable of parsing the SDP and will pass it onto live555. As already said, make sure that you ahve enabled live555 support and are using the same live555 version than when the stuff was working. If you think it is a bug in VLC, you are welcome to contribute a patch.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

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

Re: VLC player does not correctly decode SAP announcements?

Postby Rémi Denis-Courmont » 25 Mar 2011 15:36

By the way, I just checked the SAP plugin history. There has not been any parser change since VLC 1.0.0 release. So that very much sounds like a live555 regression to me.
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: No registered users and 11 guests