Documentation
¶
Overview ¶
Package esinfo reads the headers of the elementary streams a Blu-ray carries — enough to describe a track the way a listing does: codec flavour, channels, sample rate, bitrate, picture size and frame rate.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Audio ¶
type Audio struct {
// Codec is the human label: "AC3", "E-AC3 (DD+)", "TRUE-HD", "DTS",
// "DTS-HD Master Audio", "DTS-HD High Resolution", "LPCM".
Codec string
// Channels is the channel count including the LFE; LFE says whether one
// of them is the LFE, so 6 channels with LFE is "5.1".
Channels int
LFE bool
SampleRate int
// Bitrate is in kbit/s; for TrueHD it is the peak, with the AC-3 core's
// in CoreBitrate. 0 when the stream does not say (lossless DTS, LPCM).
Bitrate int
CoreBitrate int
// Atmos is set for a TrueHD stream carrying the Atmos substream.
Atmos bool
// Core says which core a TrueHD or DTS-HD stream wraps ("AC3", "DTS").
Core string
// Bits is the sample size of LPCM.
Bits int
}
Audio describes an audio stream from its first frames.
func ParseAC3 ¶
ParseAC3 reads the first frame set of an AC-3 or E-AC-3 stream. An E-AC-3 7.1 track on a Blu-ray is an AC-3 (or E-AC-3) 5.1 independent substream plus an E-AC-3 dependent one carrying the extra channels, so every substream of the first frame set is counted. eac3 says the PMT announced E-AC-3, which decides the label when the first frame is plain AC-3.
func ParseDTS ¶
ParseDTS reads a DTS core frame and, when one follows, the DTS-HD substream header: the extension's channel count and sample rate are what a Master Audio track really has, the core being a 5.1 downmix.
func ParseTrueHD ¶
ParseTrueHD reads a Blu-ray TrueHD stream: MLP access units with an AC-3 core interleaved. The major sync gives the channel assignment and the peak rate; the AC-3 frames give the core's.