Skip to content

Support 192 byte TS packets (Bluray) #67

@parasense

Description

@parasense

I was trying to run your project as a way to sanity test my own similar project, and ran into an issue parsing 192 byte packets from Blu-ray M2TS files.

Prior to the Sync byte there would be a 4-byte "ExtraHeader"

Something like this snippet:

type TSPacketExtraHeader struct {
	CopyPermissionIndicator uint8  // 2-bits
	ArrivalTimeStamp        uint32 // 30-bits, 27 MHz unit ticks
}

The fields are trivial to decode, here is a snippet:

// Blu-ray extra header
func (h *TSPacketExtraHeader) Read(p *PacketBuf192Byte) {
	h.CopyPermissionIndicator = (p[0] & 0xC0) >> 6
	h.ArrivalTimeStamp = binary.BigEndian.Uint32(p[0:4]) & 0x3FFFFFFF
}

I haven't delved into the ASTITS code very deeply, so my apologies if you actually support 192 sized packets.
If you're interested in the feature then I'd be happy to collaborate by sending patches.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions