[Live-devel] Mpeg Audio missing or corrupted in MPEG-2 Transport Stream or seperate sreams

Guy Bonneau gbonneau at matrox.com
Tue Jan 29 06:15:30 PST 2008


I've been looking into this in the last few days. And I believe it might be
possible but it's rather unusual like Ross said. The DVD specification has a
private stream definition in a Mpeg2 program stream that allow LPCM. I have
been successful to have standard player like VLC to play a Mpeg2 program
stream that has LPCM wrapped around a private ES with LPCM. 

However like Ross said when you try to wrap LPCM into a transport stream you
run into trouble. From my own investigation I have found this is not because
the ISO/IEC 13818-1 don't have provision for it. It is mostly because nobody
seems to do it outside of special broadcasting purpose. Also there is some
confusion about how to do it. 

Yet I have been successful to use Live555 without any modification to
experiment and create a compliant Mpeg-2 transport stream that has LPCM
wrapped into a private stream. To experiment with that feature you only need
to create with Elecard Pro Muxer a Mpeg2 program stream that has Mpeg2 video
ES and LPCM audio which is DVD compliant. Then use the testing application
testMPEG1or2ProgramToTransportStream to create the Mpeg2 transport stream
with LPCM wrapped into a private stream. 

However when you try to play the transport stream into a standard player
like VLC Media Player the audio is not recognized. I have investigated the
issue with VLC Media player. Strangely VLC media player has provision to
demux the LPCM audio from a Mpeg2 transport stream. I checked the code.
However there is a bug in the code that prevent VLC to properly recognize
the LPCM audio stream. Only a small modification would be needed to have VLC
Media recognize the LPCM audio private stream. I posted on VLC developer
email list a request for investigation of the issue but I have had no reply.


Thought it is off topic on this list I include a copy of the email I sent to
the VLC developer list for academic purpose. Here it is:

VLC Developer posting

I have tried to decode a LPCM DVD like compliant audio stream with VLC Media
player inside an Mpeg2 program stream. And VLC Media Player nicely
recognized the audio stream and played it as well as the accompanied Mpeg2
Video stream in the Mpeg2 program stream. 

I used LiveMedia testMPEG1or2ProgramToTransportStream.cpp testing
application to create a transport stream wrapping the Mpeg2 DVD like program
stream. Using an Mpeg2 Stream Analyzer from Elecard I was able to find that
LiveMedia created the properly Mpeg2 Transport stream around the program
stream.

I have tried to playback the created Mpeg2 Transport Stream with VLC and
though the video played nicely the audio wasn't decoded. I Opened the
Message Dialog Box of VLC and found that the LPCM Audio Codec wasn't
instantiated this time.

I downloaded VLC source code and began investigating the problem. I checked
through the file "ts.c" trying to find what going on. I quickly found the
code where the private type 0x06 of the packetized elementary stream is
checked to find what data is carried. My understanding of the code is that
LPCM audio is detected inside a private stream when the Mpeg-2 descriptor is
matched with "BSSD" (Line 2961 of ts.c).

Now looking at the Website:

http://www.smpte-ra.org/mpegreg/mpegreg.html
http://www.smpte-ra.org/mpegreg/bssd.html

I found that BSSD is associated to the mapping of audio data as specified in
SMPTE Standard SMPTE 302M-1998 for Television which is "Mapping of AES3 Data
into MPEG-2 Transport Stream".  This is a LPCM audio stream formatted
according to AES3.

I have found that LiveMedia doesn't add the descriptor when wrapping the
transport stream. Then for sure the audio will never be recognized.

Now will adding the BSSD descriptor solve the problem? Well I did not try it
but I expect it will properly decode the audio stream. 

However when doing that I will create an improperly association between the
audio data and the BSSD descriptor and thus have an illegal Mpeg2 Transport
Stream that won't be recognized by other decoder. Why ? Because the BSSD
description create an association with an audio AES3 formatted LPCM P-ES
stream. Not a DVD-Video audio LPCM formatted P-ES. They do not share the
same formatting. The LPCM audio codec "lpcm.c" used by VLC is clearly a
formatted DVD-Video audio LPCM codec. Not an AES3 LPCM formatted audio
codec.

I suspect that the descriptor to be used to create the properly association
is: "DVDF". Please check:

http://www.smpte-ra.org/mpegreg/dvdf.html

Unfortunately I do not have any stream sample of a DVDF Mpeg-2 transports
stream to double check my finding. But I believe this is an issue that will
prevent the decoding of a compliant DVDF Mpeg-2 transport stream.

Anyone having a DVDF compliant stream could confirm my finding please ?

Guy

 

 





-----Original Message-----
From: live-devel-bounces at ns.live555.com
[mailto:live-devel-bounces at ns.live555.com] On Behalf Of Ross Finlayson
Sent: Tuesday, January 29, 2008 12:28 AM
To: LIVE555 Streaming Media - development & use
Subject: Re: [Live-devel] Mpeg Audio missing or corrupted in MPEG-2
Transport Stream or seperate sreams


>Where should I look to figure out what I need to do to possibly stream
>mpeg2 video and pcm audio in a transport stream?

I don't believe that PCM audio can be included in a Transport Stream (at
least, not in any standard way that a receiver is likely to understand).


	Ross Finlayson
	Live Networks, Inc. (LIVE555.COM)
	<http://www.live555.com/>

_______________________________________________
live-devel mailing list
live-devel at lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel



More information about the live-devel mailing list