[Bug 770528] tsdemux: add support ATSC EAC3

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Sep 13 13:41:35 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=770528

--- Comment #6 from Edward Hervey <bilboed at bilboed.com> ---
(In reply to Wonchul Lee from comment #4)
> Oh, I didn't know, I referred to stream type table here.
> https://en.wikipedia.org/wiki/Program-specific_information
> Does this type stream (0x87) could be the other standards for some reason?

Unfortunately that page isn't wrong nor right. It's just missing to specify
which specs the elemtary stream type comes from.

The base standard for mpeg-ts is ISO/IEC 13818-1 (or H.222.0) [0]. You can
*not* go against that one. All other standards will abide by that one, and
there are various ways you can create derived standards without interfering
with those.

Now, You'll find the base elementary stream types in there. Note in there that
0x24-0x7E are *reserved* for ITU/ISO usage (so only a spec from ITU or ISO can
use them in derived standards). Furthermore 0x80-0xff are called "User
Private". That means that derived standards *can* (and will) use those to
define other kind of streams.

There are quite a few "derived" standards. DVB, ATSC, SCTE, BDMV (Bluray
standard), ISDB, HDV, ... Where it gets tricky is that, while they all use the
"User Private" range (if needed) to define new stream types (as to not
interfere with the base standard), they might have different meaning between
standards ! Oh, and for total enjoyment, some specs aren't available.

In order to know what the stream types in the User Private range correspond to,
you can't just blindly look at the stream_type. You also need to look at extra
information to figure out to which spec it corresponds to.

The various tricks are:
1) A "Registration ID Descriptor" in the top-level descriptor list of a PMT.
That essentially defines the "type" of specification that is being followed by
the stream. That's the safest/best bet. See how we deal with bluray
stream_types for examples in tsdemux. Sadly not all specifications use that,
let alone bad muxers/content-creators.

2) A "Registration ID Descriptor" in stream-level descriptor list of a PMT.
Generally used in the private PES packet stream types. It's a supplementary
information to tell you what the exact type is. See the examples in tsdemux
again.

3) Magic. No, not really, but you get to the point where it's a combination of
specs that were badly thought about to not conflict with other specifications
(early version of DigiCipher and SCTE) or come from crap content creator (yes,
there are a lot of those). So you need to figure out another way to "identify"
from what specification it corresponds to, in order to avoid mis-recognizing
such streams. Some tips could be to check for the presence of some streams that
only/don't exist in other standards (the ATSC 0x1ffb PSI stream for example).

[0] Latest free copy available here :
https://www.itu.int/rec/T-REC-H.222.0-201206-S/en

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list