LPCM in mpeg(ts)

Sebastian Dröge sebastian at centricular.com
Wed Apr 27 06:12:22 UTC 2016

On Di, 2016-04-26 at 12:42 +0200, Michael Olbrich wrote:
> Hi,
> I have a mpegts stream with LPCM audio that is currently not supported by
> the tsdemux element. I'm looking for some advice on the best way to
> implement this. The specification can be found here[1].
> It's similar to the format implemented in dvdlpcmdec. Just a different
> header. The stream type is 0x83.

What are all the differences between this and the already supported

> I hacked dvdlpcmdec to support a different header. That works sometimes,
> but the event handling in dvdlpcmdec is rather broken and the pipeline
> fails to start occasionally.
> I looked into rewriting dvdlpcmdec to use GstAudioDecoder but that's where
> I got stuck:
> The format currently supported by dvdlpcmdec is somewhat special: The
> buffer timestamp might not refer to the first sample but somewhere in the
> middle (the offset is specified in the header). I have no idea how to
> handle this with GstAudioDecoder.

Take a look at e.g. a52dec, it is solving exactly the same problem
for audio/x-private1-ac3 caps coming from DVDs.

> Any Ideas? Maybe split it into a parser and decoder and handle the header
> and timestamps in the parser?
> And what caps should tsdemux produce for the new format?
> audio/x-private2-lpcm?

Seems like a good start, yes.

Sebastian Dröge, Centricular Ltd · http://www.centricular.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160427/08c918db/attachment.sig>

More information about the gstreamer-devel mailing list