Documentation
¶
Index ¶
- Constants
- Variables
- func ContainerInfo(c ContainerBox, w io.Writer, specificBoxLevels, indent, indentStep string) error
- func DecryptBytesCTR(data []byte, key []byte, iv []byte) ([]byte, error)
- func DecryptSampleCenc(sample []byte, key []byte, iv []byte, subSamplePatterns []SubSamplePattern) ([]byte, error)
- func EncodeContainer(c ContainerBox, w io.Writer) error
- func EncodeContainerSW(c ContainerBox, sw mp4ff.SliceWriter) error
- func EncodeHeader(b Box, w io.Writer) error
- func EncodeHeaderSW(b Box, sw mp4ff.SliceWriter) error
- func EncodeHeaderWithSize(boxType string, boxSize uint64, largeSize bool, w io.Writer) error
- func EncodeHeaderWithSizeSW(boxType string, boxSize uint64, largeSize bool, sw mp4ff.SliceWriter) error
- func GetChannelListFromACMod(acmod byte) []string
- func GetVersion() string
- func IsSyncSampleFlags(flags uint32) bool
- func SetNonSyncSampleFlags(flags uint32) uint32
- func SetSyncSampleFlags(flags uint32) uint32
- func WriteToFile(boxStructure BoxStructure, filePath string) error
- type AlstSampleGroupEntry
- type AudioSampleEntryBox
- func (a *AudioSampleEntryBox) AddChild(child Box)
- func (a *AudioSampleEntryBox) Encode(w io.Writer) error
- func (a *AudioSampleEntryBox) EncodeSW(sw mp4ff.SliceWriter) error
- func (a *AudioSampleEntryBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (a *AudioSampleEntryBox) RemoveEncryption() (*SinfBox, error)
- func (a *AudioSampleEntryBox) Size() uint64
- func (a *AudioSampleEntryBox) Type() string
- type Box
- func DecodeAudioSampleEntry(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeAudioSampleEntrySR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeBox(startPos uint64, r io.Reader) (Box, error)
- func DecodeBoxLazyMdat(startPos uint64, r io.ReadSeeker) (Box, error)
- func DecodeBoxSR(startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeBtrt(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeBtrtSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeCToo(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeCTooSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeCdat(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeCdatSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeClap(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeClapSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeCo64(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeCo64SR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeContainerChildren(hdr BoxHeader, startPos, endPos uint64, r io.Reader) ([]Box, error)
- func DecodeContainerChildrenSR(hdr BoxHeader, startPos, endPos uint64, sr mp4ff.SliceReader) ([]Box, error)
- func DecodeCslg(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeCslgSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeCtim(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeCtimSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeCtts(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeCttsSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeDac3(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeDac3SR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeData(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeDataSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeDec3(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeDec3SR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeDinf(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeDinfSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeDref(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeDrefSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeEdts(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeEdtsSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeElng(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeElngSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeElst(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeElstSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeEmsg(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeEmsgSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeEsds(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeEsdsSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeFree(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeFreeSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeFrma(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeFrmaSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeFtyp(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeFtypSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeHdlr(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeHdlrSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeIden(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeIdenSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeIlst(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeIlstSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeKind(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeKindSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeMdat(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeMdatLazily(hdr BoxHeader, startPos uint64) (Box, error)
- func DecodeMdatSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeMdhd(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeMdhdSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeMdia(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeMdiaSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeMehd(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeMehdSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeMeta(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeMetaSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeMfhd(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeMfhdSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeMfra(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeMfraSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeMfro(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeMfroSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeMime(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeMimeSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeMinf(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeMinfSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeMoof(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeMoofSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeMoov(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeMoovSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeMvex(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeMvexSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeMvhd(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeMvhdSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeNmhd(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeNmhdSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodePasp(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodePaspSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodePayl(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodePaylSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodePrft(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodePrftSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodePssh(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodePsshSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeSaio(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeSaioSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeSaiz(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeSaizSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeSbgp(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeSbgpSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeSchi(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeSchiSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeSchm(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeSchmSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeSdtp(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeSdtpSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeSenc(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeSencSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeSgpd(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeSgpdSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeSidx(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeSidxSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeSinf(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeSinfSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeSmhd(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeSmhdSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeStbl(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeStblSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeStco(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeStcoSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeSthd(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeSthdSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeStpp(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeStppSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeStsc(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeStscSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeStsd(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeStsdSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeStss(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeStssSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeStsz(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeStszSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeSttg(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeSttgSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeStts(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeSttsSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeStyp(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeStypSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeSubs(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeSubsSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeTenc(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeTencSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeTfdt(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeTfdtSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeTfhd(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeTfhdSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeTfra(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeTfraSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeTkhd(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeTkhdSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeTraf(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeTrafSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeTrak(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeTrakSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeTref(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeTrefSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeTrefType(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeTrefTypeSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeTrep(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeTrepSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeTrex(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeTrexSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeTrun(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeTrunSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeURLBox(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeURLBoxSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeUUIDBox(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeUUIDBoxSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeUdta(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeUdtaSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeUnknown(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeUnknownSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeVisualSampleEntry(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeVisualSampleEntrySR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeVlab(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeVlabSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeVmhd(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeVmhdSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeVsid(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeVsidSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeVttC(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeVttCSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeVtta(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeVttaSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeVttc(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeVttcSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeVtte(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeVtteSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- func DecodeWvtt(hdr BoxHeader, startPos uint64, r io.Reader) (Box, error)
- func DecodeWvttSR(hdr BoxHeader, startPos uint64, sr mp4ff.SliceReader) (Box, error)
- type BoxDecoder
- type BoxDecoderSR
- type BoxHeader
- type BoxStructure
- type BtrtBox
- type CTooBox
- func (b *CTooBox) AddChild(child Box)
- func (b *CTooBox) Encode(w io.Writer) error
- func (b *CTooBox) EncodeSW(sw mp4ff.SliceWriter) error
- func (b *CTooBox) GetChildren() []Box
- func (b *CTooBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (b *CTooBox) Size() uint64
- func (b *CTooBox) Type() string
- type CdatBox
- type Chunk
- type ClapBox
- type Co64Box
- func (b *Co64Box) Encode(w io.Writer) error
- func (b *Co64Box) EncodeSW(sw mp4ff.SliceWriter) error
- func (b *Co64Box) GetOffset(chunkNr int) (uint64, error)
- func (b *Co64Box) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (b *Co64Box) Size() uint64
- func (b *Co64Box) Type() string
- type ContainerBox
- type CslgBox
- type CtimBox
- type CttsBox
- func (b *CttsBox) Encode(w io.Writer) error
- func (b *CttsBox) EncodeSW(sw mp4ff.SliceWriter) error
- func (b *CttsBox) GetCompositionTimeOffset(sampleNr uint32) int32
- func (b *CttsBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (b *CttsBox) Size() uint64
- func (b *CttsBox) Type() string
- type Dac3Box
- func (b *Dac3Box) BitrateBps() int
- func (b *Dac3Box) ChannelInfo() (nrChannels int, chanmap uint16)
- func (b *Dac3Box) Encode(w io.Writer) error
- func (b *Dac3Box) EncodeSW(sw mp4ff.SliceWriter) error
- func (b *Dac3Box) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (b *Dac3Box) SamplingFrequency() int
- func (b *Dac3Box) Size() uint64
- func (b *Dac3Box) Type() string
- type DataBox
- type DataRange
- type Dec3Box
- func (b *Dec3Box) ChannelInfo() (nrChannels int, chanmap uint16)
- func (b *Dec3Box) Encode(w io.Writer) error
- func (b *Dec3Box) EncodeSW(sw mp4ff.SliceWriter) error
- func (b *Dec3Box) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (b *Dec3Box) Size() uint64
- func (b *Dec3Box) Type() string
- type DecFileMode
- type DinfBox
- func (d *DinfBox) AddChild(box Box)
- func (d *DinfBox) Encode(w io.Writer) error
- func (d *DinfBox) EncodeSW(sw mp4ff.SliceWriter) error
- func (d *DinfBox) GetChildren() []Box
- func (d *DinfBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (d *DinfBox) Size() uint64
- func (d *DinfBox) Type() string
- type DrefBox
- type EC3Sub
- type EdtsBox
- func (e *EdtsBox) AddChild(child Box)
- func (b *EdtsBox) Encode(w io.Writer) error
- func (b *EdtsBox) EncodeSW(sw mp4ff.SliceWriter) error
- func (b *EdtsBox) GetChildren() []Box
- func (b *EdtsBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (b *EdtsBox) Size() uint64
- func (b *EdtsBox) Type() string
- type ElngBox
- type ElstBox
- type ElstEntry
- type EmsgBox
- type EncFragFileMode
- type EncOptimize
- type EsdsBox
- type File
- func (f *File) AddChild(box Box, boxStartPos uint64)
- func (f *File) AddMediaSegment(m *MediaSegment)
- func (f *File) ApplyOptions(opts ...Option)
- func (f *File) CopySampleData(w io.Writer, rs io.ReadSeeker, trak *TrakBox, ...) error
- func (f *File) DumpWithSampleData(w io.Writer, specificBoxLevels string) error
- func (f *File) Encode(w io.Writer) error
- func (f *File) EncodeSW(sw mp4ff.SliceWriter) error
- func (f *File) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (f *File) IsFragmented() bool
- func (f *File) LastSegment() *MediaSegment
- func (f *File) Size() uint64
- type Fixed16
- type Fixed32
- type Fragment
- func (f *Fragment) AddChild(b Box)
- func (f *Fragment) AddFullSample(s FullSample)
- func (f *Fragment) AddFullSampleToTrack(s FullSample, trackID uint32) error
- func (f *Fragment) AddSample(s Sample, baseMediaDecodeTime uint64)
- func (f *Fragment) AddSampleInterval(sItvl SampleInterval) error
- func (f *Fragment) AddSampleToTrack(s Sample, trackID uint32, baseMediaDecodeTime uint64) error
- func (f *Fragment) AddSamples(ss []Sample, baseMediaDecodeTime uint64)
- func (f *Fragment) DumpSampleData(w io.Writer, trex *TrexBox) error
- func (f *Fragment) Encode(w io.Writer) error
- func (f *Fragment) EncodeSW(sw mp4ff.SliceWriter) error
- func (f *Fragment) GetChildren() []Box
- func (f *Fragment) GetFullSamples(trex *TrexBox) ([]FullSample, error)
- func (f *Fragment) GetSampleInterval(trex *TrexBox, startSampleNr, endSampleNr uint32) (SampleInterval, error)
- func (f *Fragment) GetSampleNrFromTime(trex *TrexBox, sampleTime uint64) (uint32, error)
- func (f *Fragment) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (f *Fragment) SetTrunDataOffsets()
- func (f *Fragment) Size() uint64
- type FreeBox
- type FrmaBox
- type FtypBox
- func (b *FtypBox) CompatibleBrands() []string
- func (b *FtypBox) Encode(w io.Writer) error
- func (b *FtypBox) EncodeSW(sw mp4ff.SliceWriter) error
- func (b *FtypBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (b *FtypBox) MajorBrand() string
- func (b *FtypBox) MinorVersion() uint32
- func (b *FtypBox) Size() uint64
- func (b *FtypBox) Type() string
- type FullSample
- type HdlrBox
- type IdenBox
- type IlstBox
- func (b *IlstBox) AddChild(child Box)
- func (b *IlstBox) Encode(w io.Writer) error
- func (b *IlstBox) EncodeSW(sw mp4ff.SliceWriter) error
- func (b *IlstBox) GetChildren() []Box
- func (b *IlstBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (b *IlstBox) Size() uint64
- func (b *IlstBox) Type() string
- type Informer
- type InitSegment
- func (s *InitSegment) AddChild(b Box)
- func (s *InitSegment) AddEmptyTrack(timeScale uint32, mediaType, language string)
- func (s *InitSegment) Encode(w io.Writer) error
- func (s *InitSegment) EncodeSW(sw mp4ff.SliceWriter) error
- func (s *InitSegment) GetMediaType() string
- func (s *InitSegment) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (s *InitSegment) Size() uint64
- type InitializationVector
- type KindBox
- type MdatBox
- func (m *MdatBox) AddSampleData(s []byte)
- func (m *MdatBox) AddSampleDataPart(s []byte)
- func (m *MdatBox) CopyData(start, size int64, rs io.ReadSeeker, w io.Writer) (nrWritten int64, err error)
- func (m *MdatBox) DataLength() uint64
- func (m *MdatBox) Encode(w io.Writer) error
- func (m *MdatBox) EncodeSW(sw mp4ff.SliceWriter) error
- func (m *MdatBox) GetLazyDataSize() uint64
- func (m *MdatBox) HeaderSize() uint64
- func (m *MdatBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (m *MdatBox) IsLazy() bool
- func (m *MdatBox) PayloadAbsoluteOffset() uint64
- func (m *MdatBox) ReadData(start, size int64, rs io.ReadSeeker) ([]byte, error)
- func (m *MdatBox) SetData(data []byte)
- func (m *MdatBox) SetLazyDataSize(newSize uint64)
- func (m *MdatBox) Size() uint64
- func (m *MdatBox) Type() string
- type MdhdBox
- func (m *MdhdBox) Encode(w io.Writer) error
- func (m *MdhdBox) EncodeSW(sw mp4ff.SliceWriter) error
- func (m *MdhdBox) GetLanguage() string
- func (m *MdhdBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (m *MdhdBox) SetLanguage(lang string)
- func (m *MdhdBox) Size() uint64
- func (m *MdhdBox) Type() string
- type MdiaBox
- func (m *MdiaBox) AddChild(box Box)
- func (m *MdiaBox) Encode(w io.Writer) error
- func (m *MdiaBox) EncodeSW(sw mp4ff.SliceWriter) error
- func (m *MdiaBox) GetChildren() []Box
- func (m *MdiaBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (m *MdiaBox) Size() uint64
- func (m *MdiaBox) Type() string
- type MediaSegment
- func (s *MediaSegment) AddFragment(f *Fragment)
- func (s *MediaSegment) Encode(w io.Writer) error
- func (s *MediaSegment) EncodeSW(sw mp4ff.SliceWriter) error
- func (s *MediaSegment) Fragmentify(timescale uint64, trex *TrexBox, duration uint32) ([]*Fragment, error)
- func (s *MediaSegment) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (s *MediaSegment) LastFragment() *Fragment
- func (s *MediaSegment) Size() uint64
- type MehdBox
- type MetaBox
- func (b *MetaBox) AddChild(box Box)
- func (b *MetaBox) Encode(w io.Writer) error
- func (b *MetaBox) EncodeSW(sw mp4ff.SliceWriter) error
- func (b *MetaBox) GetChildren() []Box
- func (b *MetaBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (b *MetaBox) Size() uint64
- func (b *MetaBox) Type() string
- type MfhdBox
- type MfraBox
- func (m *MfraBox) AddChild(child Box) error
- func (m *MfraBox) Encode(w io.Writer) error
- func (m *MfraBox) EncodeSW(sw mp4ff.SliceWriter) error
- func (m *MfraBox) GetChildren() []Box
- func (m *MfraBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (m *MfraBox) Size() uint64
- func (m *MfraBox) Type() string
- type MfroBox
- type MimeBox
- type MinfBox
- func (m *MinfBox) AddChild(box Box)
- func (m *MinfBox) Encode(w io.Writer) error
- func (m *MinfBox) EncodeSW(sw mp4ff.SliceWriter) error
- func (m *MinfBox) GetChildren() []Box
- func (m *MinfBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (m *MinfBox) Size() uint64
- func (m *MinfBox) Type() string
- type MoofBox
- func (m *MoofBox) AddChild(b Box) error
- func (m *MoofBox) Encode(w io.Writer) error
- func (m *MoofBox) EncodeSW(sw mp4ff.SliceWriter) error
- func (m *MoofBox) GetChildren() []Box
- func (m *MoofBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (m *MoofBox) RemovePsshs() []*PsshBox
- func (m *MoofBox) Size() uint64
- func (m *MoofBox) Type() string
- type MoovBox
- func (m *MoovBox) AddChild(box Box)
- func (m *MoovBox) Encode(w io.Writer) error
- func (m *MoovBox) EncodeSW(sw mp4ff.SliceWriter) error
- func (m *MoovBox) GetChildren() []Box
- func (m *MoovBox) GetSinf(trackID uint32) *SinfBox
- func (m *MoovBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (m *MoovBox) RemovePsshs() []*PsshBox
- func (m *MoovBox) Size() uint64
- func (m *MoovBox) Type() string
- type MvexBox
- func (m *MvexBox) AddChild(box Box)
- func (m *MvexBox) Encode(w io.Writer) error
- func (m *MvexBox) EncodeSW(sw mp4ff.SliceWriter) error
- func (m *MvexBox) GetChildren() []Box
- func (m *MvexBox) GetTrex(trackID uint32) (trex *TrexBox, ok bool)
- func (m *MvexBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (m *MvexBox) Size() uint64
- func (m *MvexBox) Type() string
- type MvhdBox
- type NmhdBox
- type Option
- type PaspBox
- type PaylBox
- type PiffData
- type PrftBox
- type PsshBox
- type RapSampleGroupEntry
- type RollSampleGroupEntry
- type SaioBox
- type SaizBox
- type Sample
- type SampleFlags
- type SampleGroupEntry
- func DecodeAlstSampleGroupEntry(name string, length uint32, sr mp4ff.SliceReader) (SampleGroupEntry, error)
- func DecodeRapSampleGroupEntry(name string, length uint32, sr mp4ff.SliceReader) (SampleGroupEntry, error)
- func DecodeRollSampleGroupEntry(name string, length uint32, sr mp4ff.SliceReader) (SampleGroupEntry, error)
- func DecodeSeigSampleGroupEntry(name string, length uint32, sr mp4ff.SliceReader) (SampleGroupEntry, error)
- func DecodeUnknownSampleGroupEntry(name string, length uint32, sr mp4ff.SliceReader) (SampleGroupEntry, error)
- type SampleGroupEntryDecoder
- type SampleInterval
- type SbgpBox
- type SchiBox
- func (b *SchiBox) AddChild(box Box)
- func (b *SchiBox) Encode(w io.Writer) error
- func (b *SchiBox) EncodeSW(sw mp4ff.SliceWriter) error
- func (b *SchiBox) GetChildren() []Box
- func (b *SchiBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (b *SchiBox) Size() uint64
- func (b *SchiBox) Type() string
- type SchmBox
- type SdtpBox
- type SdtpEntry
- type SeigSampleGroupEntry
- func (s *SeigSampleGroupEntry) ConstantIVSize() byte
- func (s *SeigSampleGroupEntry) Encode(sw mp4ff.SliceWriter)
- func (s *SeigSampleGroupEntry) Info(w io.Writer, specificBoxLevels, indent, indentStep string) (err error)
- func (s *SeigSampleGroupEntry) Size() uint64
- func (s *SeigSampleGroupEntry) Type() string
- type SencBox
- func (s *SencBox) AddSample(sample SencSample) error
- func (s *SencBox) Encode(w io.Writer) error
- func (s *SencBox) EncodeSW(sw mp4ff.SliceWriter) error
- func (s *SencBox) GetPerSampleIVSize() int
- func (s *SencBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (s *SencBox) ParseReadBox(perSampleIVSize byte, saiz *SaizBox) error
- func (s *SencBox) Size() uint64
- func (s *SencBox) Type() string
- type SencSample
- type SgpdBox
- type SidxBox
- type SidxRef
- type SinfBox
- func (b *SinfBox) AddChild(box Box)
- func (b *SinfBox) Encode(w io.Writer) error
- func (b *SinfBox) EncodeSW(sw mp4ff.SliceWriter) error
- func (b *SinfBox) GetChildren() []Box
- func (b *SinfBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (b *SinfBox) Size() uint64
- func (b *SinfBox) Type() string
- type SmhdBox
- type StblBox
- func (s *StblBox) AddChild(box Box)
- func (s *StblBox) Encode(w io.Writer) error
- func (b *StblBox) EncodeSW(sw mp4ff.SliceWriter) error
- func (s *StblBox) GetChildren() []Box
- func (s *StblBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (s *StblBox) Size() uint64
- func (s *StblBox) Type() string
- type StcoBox
- func (b *StcoBox) Encode(w io.Writer) error
- func (b *StcoBox) EncodeSW(sw mp4ff.SliceWriter) error
- func (b *StcoBox) GetOffset(chunkNr int) (uint64, error)
- func (b *StcoBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (b *StcoBox) Size() uint64
- func (b *StcoBox) Type() string
- type SthdBox
- type StppBox
- type StscBox
- func (b *StscBox) ChunkNrFromSampleNr(sampleNr int) (chunkNr, firstSampleInChunk int, err error)
- func (b *StscBox) Encode(w io.Writer) error
- func (b *StscBox) EncodeSW(sw mp4ff.SliceWriter) error
- func (b *StscBox) GetChunk(chunkNr uint32) Chunk
- func (b *StscBox) GetContainingChunks(startSampleNr, endSampleNr uint32) ([]Chunk, error)
- func (b *StscBox) GetSampleDescriptionID(sampleNr int) uint32
- func (b *StscBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (b *StscBox) SetSingleSampleDescriptionID(sampleDescriptionID uint32)
- func (b *StscBox) Size() uint64
- func (b *StscBox) Type() string
- type StsdBox
- func (s *StsdBox) AddChild(box Box)
- func (s *StsdBox) Encode(w io.Writer) error
- func (s *StsdBox) EncodeSW(sw mp4ff.SliceWriter) error
- func (s *StsdBox) GetSampleDescription(index int) (Box, error)
- func (s *StsdBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (s *StsdBox) ReplaceChild(box Box)
- func (s *StsdBox) Size() uint64
- func (s *StsdBox) Type() string
- type StssBox
- func (b *StssBox) Encode(w io.Writer) error
- func (b *StssBox) EncodeSW(sw mp4ff.SliceWriter) error
- func (b *StssBox) EntryCount() uint32
- func (b *StssBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (b *StssBox) IsSyncSample(sampleNr uint32) (isSync bool)
- func (b *StssBox) Size() uint64
- func (b *StssBox) Type() string
- type StszBox
- func (b *StszBox) Encode(w io.Writer) error
- func (b *StszBox) EncodeSW(sw mp4ff.SliceWriter) error
- func (b *StszBox) GetNrSamples() uint32
- func (b *StszBox) GetSampleSize(i int) uint32
- func (b *StszBox) GetTotalSampleSize(startNr, endNr uint32) (uint64, error)
- func (b *StszBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (b *StszBox) Size() uint64
- func (b *StszBox) Type() string
- type SttgBox
- type SttsBox
- func (b *SttsBox) Encode(w io.Writer) error
- func (b *SttsBox) EncodeSW(sw mp4ff.SliceWriter) error
- func (b *SttsBox) GetDecodeTime(sampleNr uint32) (decTime uint64, dur uint32)
- func (b *SttsBox) GetDur(sampleNr uint32) (dur uint32)
- func (b *SttsBox) GetSampleNrAtTime(sampleStartTime uint64) (sampleNr uint32, err error)
- func (b *SttsBox) GetTimeCode(sample, timescale uint32) time.Duration
- func (b *SttsBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (b *SttsBox) Size() uint64
- func (b *SttsBox) Type() string
- type StypBox
- func (b *StypBox) CompatibleBrands() []string
- func (b *StypBox) Encode(w io.Writer) error
- func (b *StypBox) EncodeSW(sw mp4ff.SliceWriter) error
- func (b *StypBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (b *StypBox) MajorBrand() string
- func (b *StypBox) MinorVersion() uint32
- func (b *StypBox) Size() uint64
- func (b *StypBox) Type() string
- type SubSamplePattern
- type SubsBox
- type SubsEntry
- type SubsSample
- type TencBox
- type TfdtBox
- func (t *TfdtBox) Encode(w io.Writer) error
- func (t *TfdtBox) EncodeSW(sw mp4ff.SliceWriter) error
- func (t *TfdtBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) (err error)
- func (t *TfdtBox) SetBaseMediaDecodeTime(bTime uint64)
- func (t *TfdtBox) Size() uint64
- func (t *TfdtBox) Type() string
- type TfhdBox
- func (t *TfhdBox) DefaultBaseIfMoof() bool
- func (t *TfhdBox) DurationIsEmpty() bool
- func (t *TfhdBox) Encode(w io.Writer) error
- func (t *TfhdBox) EncodeSW(sw mp4ff.SliceWriter) error
- func (t *TfhdBox) HasBaseDataOffset() bool
- func (t *TfhdBox) HasDefaultSampleDuration() bool
- func (t *TfhdBox) HasDefaultSampleFlags() bool
- func (t *TfhdBox) HasDefaultSampleSize() bool
- func (t *TfhdBox) HasSampleDescriptionIndex() bool
- func (t *TfhdBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (t *TfhdBox) Size() uint64
- func (t *TfhdBox) Type() string
- type TfraBox
- type TfraEntry
- type TfrfData
- type TfxdData
- type TkhdBox
- type TopBoxInfo
- type TrafBox
- func (t *TrafBox) AddChild(b Box) error
- func (t *TrafBox) ContainsSencBox() (ok, parsed bool)
- func (t *TrafBox) Encode(w io.Writer) error
- func (b *TrafBox) EncodeSW(sw mp4ff.SliceWriter) error
- func (t *TrafBox) GetChildren() []Box
- func (t *TrafBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (t *TrafBox) OptimizeTfhdTrun() error
- func (t *TrafBox) ParseReadSenc(defaultIVSize byte, moofStartPos uint64) error
- func (t *TrafBox) RemoveEncryptionBoxes() uint64
- func (t *TrafBox) Size() uint64
- func (t *TrafBox) Type() string
- type TrakBox
- func (t *TrakBox) AddChild(box Box)
- func (t *TrakBox) Encode(w io.Writer) error
- func (b *TrakBox) EncodeSW(sw mp4ff.SliceWriter) error
- func (t *TrakBox) GetChildren() []Box
- func (t *TrakBox) GetNrSamples() uint32
- func (t *TrakBox) GetRangesForSampleInterval(startSampleNr, endSampleNr uint32) ([]DataRange, error)
- func (t *TrakBox) GetSampleData(startSampleNr, endSampleNr uint32) ([]Sample, error)
- func (t *TrakBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (t *TrakBox) SetAC3Descriptor(dac3 *Dac3Box) error
- func (t *TrakBox) SetEC3Descriptor(dec3 *Dec3Box) error
- func (t *TrakBox) SetStppDescriptor(namespace, schemaLocation, auxiliaryMimeTypes string) error
- func (t *TrakBox) SetWvttDescriptor(config string) error
- func (t *TrakBox) Size() uint64
- func (t *TrakBox) Type() string
- type TrefBox
- func (b *TrefBox) AddChild(box Box)
- func (b *TrefBox) Encode(w io.Writer) error
- func (b *TrefBox) EncodeSW(sw mp4ff.SliceWriter) error
- func (b *TrefBox) GetChildren() []Box
- func (b *TrefBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (b *TrefBox) Size() uint64
- func (b *TrefBox) Type() string
- type TrefTypeBox
- type TrepBox
- type TrexBox
- type TrunBox
- func (t *TrunBox) AddFullSample(s *FullSample)
- func (t *TrunBox) AddSample(s Sample)
- func (t *TrunBox) AddSampleDefaultValues(tfhd *TfhdBox, trex *TrexBox) (totalDur uint64)
- func (t *TrunBox) AddSamples(s []Sample)
- func (t *TrunBox) Duration(defaultSampleDuration uint32) uint64
- func (t *TrunBox) Encode(w io.Writer) error
- func (t *TrunBox) EncodeSW(sw mp4ff.SliceWriter) error
- func (t *TrunBox) FirstSampleFlags() (flags uint32, present bool)
- func (t *TrunBox) GetFullSamples(offsetInMdat uint32, baseDecodeTime uint64, mdat *MdatBox) []FullSample
- func (t *TrunBox) GetSampleInterval(startSampleNr, endSampleNr uint32, baseDecodeTime uint64, mdat *MdatBox, ...) (SampleInterval, error)
- func (t *TrunBox) GetSampleNrForRelativeTime(deltaTime uint64, defaultSampleDuration uint32) (uint32, error)
- func (t *TrunBox) GetSampleRange(startSampleNr, endSampleNr uint32) []Sample
- func (t *TrunBox) GetSamples() []Sample
- func (t *TrunBox) HasDataOffset() bool
- func (t *TrunBox) HasFirstSampleFlags() bool
- func (t *TrunBox) HasSampleCompositionTimeOffset() bool
- func (t *TrunBox) HasSampleDuration() bool
- func (t *TrunBox) HasSampleFlags() bool
- func (t *TrunBox) HasSampleSize() bool
- func (t *TrunBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (t *TrunBox) RemoveFirstSampleFlags()
- func (t *TrunBox) SampleCount() uint32
- func (t *TrunBox) SetFirstSampleFlags(flags uint32)
- func (t *TrunBox) Size() uint64
- func (t *TrunBox) SizeOfData() (totalSize uint64)
- func (t *TrunBox) Type() string
- type URLBox
- type UUID
- type UUIDBox
- type UdtaBox
- func (b *UdtaBox) AddChild(box Box)
- func (b *UdtaBox) Encode(w io.Writer) error
- func (b *UdtaBox) EncodeSW(sw mp4ff.SliceWriter) error
- func (b *UdtaBox) GetChildren() []Box
- func (b *UdtaBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (b *UdtaBox) Size() uint64
- func (b *UdtaBox) Type() string
- type UnknownBox
- type UnknownSampleGroupEntry
- type VisualSampleEntryBox
- func (b *VisualSampleEntryBox) AddChild(child Box)
- func (b *VisualSampleEntryBox) Encode(w io.Writer) error
- func (b *VisualSampleEntryBox) EncodeSW(sw mp4ff.SliceWriter) error
- func (b *VisualSampleEntryBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (b *VisualSampleEntryBox) RemoveEncryption() (*SinfBox, error)
- func (b *VisualSampleEntryBox) SetType(name string)
- func (b *VisualSampleEntryBox) Size() uint64
- func (b *VisualSampleEntryBox) Type() string
- type VlabBox
- type VmhdBox
- type VsidBox
- type VttCBox
- type VttaBox
- type VttcBox
- func (b *VttcBox) AddChild(child Box)
- func (b *VttcBox) Encode(w io.Writer) error
- func (b *VttcBox) EncodeSW(sw mp4ff.SliceWriter) error
- func (b *VttcBox) GetChildren() []Box
- func (b *VttcBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
- func (b *VttcBox) Size() uint64
- func (b *VttcBox) Type() string
- type VtteBox
- type WvttBox
Constants ¶
const ( // EncModeSegment - only encode boxes that are part of Init and MediaSegments EncModeSegment = EncFragFileMode(0) // EncModeBoxTree - encode all boxes in file tree EncModeBoxTree = EncFragFileMode(1) )
const ( // OptimizeNone - no optimization OptimizeNone = EncOptimize(0) // OptimizeTrun - optimize trun box by moving default values to tfhd OptimizeTrun = EncOptimize(1 << 0) )
const ( UUIDPlayReady = "9a04f079-9840-4286-ab92-e65be0885f95" UUIDWidevine = "edef8ba9-79d6-4ace-a3c8-27dcd51d21ed" UUIDFairPlay = "94CE86FB-07FF-4F43-ADB8-93D2FA968CA2" UUID_VCAS = "9a27dd82-fde2-4725-8cbc-4234aa06ec09" )
UUIDs for different DRM systems
const DefaultTrakID = 1
DefaultTrakID - trakID used when generating new fragmented content
const NonSyncSampleFlags uint32 = 0x00010000
NonSyncSampleFlags - flags for non-sync sample
const SyncSampleFlags uint32 = 0x02000000
SyncSampleFlags - flags for I-frame or other sync sample
const TrunDataOffsetPresentFlag uint32 = 0x01
const TrunFirstSampleFlagsPresentFlag uint32 = 0x04
const TrunSampleCompositionTimeOffsetPresentFlag uint32 = 0x800
const TrunSampleDurationPresentFlag uint32 = 0x100
const TrunSampleFlagsPresentFlag uint32 = 0x400
const TrunSampleSizePresentFlag uint32 = 0x200
const UseSubSampleEncryption = 0x2
UseSubSampleEncryption - flag for subsample encryption
Variables ¶
var AC3BitrateCodesKbps = []uint16{
32,
40,
48,
56,
64,
80,
96,
112,
128,
160,
192,
224,
256,
320,
384,
448,
512,
576,
640,
}
AC3BitrateCodesKbps - Bitrates in kbps ETSI TS 102 366 V1.4.1 Table F.4.1 (2017)
var AC3SampleRates = []int{48000, 44100, 32000}
AC3SampleRates - Sample rates as defined in ETSI TS 102 366 V1.4.1 (2017) section 4.4.1.3 Signaled in fscod - Sample rate code - 2 bits
var AC3acmodChannelTable = []string{
"L/R",
"C",
"L/R",
"L/C/R",
"L/R/Cs",
"L/C/R/Cs",
"L/R/Ls/Rs",
"L/C/R/Ls/Rs",
}
AX3acmodChanneTable - channel configurations from ETSI TS 102 366 V1.4.1 (2017) section 4.4.2.3A Signaled in acmod - audio coding mode - 3 bits
var CustomChannelMapLocations = map[string]uint16{
"L": 1 << 15,
"C": 1 << 14,
"R": 1 << 13,
"Ls": 1 << 12,
"Rs": 1 << 11,
"Lc/Rc": 1 << 10,
"Lrs/Rrs": 1 << 9,
"Cs": 1 << 8,
"Ts": 1 << 7,
"Lsd/Rsd": 1 << 6,
"Lw/Rw": 1 << 5,
"Vhl/Vhr": 1 << 4,
"Vhc": 1 << 3,
"Lts/Rts": 1 << 2,
"LFE2": 1 << 1,
"LFE": 1 << 0,
}
ETSI TS 102 366 V1.4.1 (2017) Table E.1.4 chanmap - Custom channel map - 16 bits
var EC3ChannelLocationBits = []string{
"Lc/Rc",
"Lrs/Rrs",
"Cs",
"Ts",
"Lsd/Rsd",
"Lw/Rw",
"Lvh/Rvh",
"Cvh",
"LFE2",
}
EC3ChannelLocationBits - channel location signal in 9bits Table F.6.1
Functions ¶
func ContainerInfo ¶
func ContainerInfo(c ContainerBox, w io.Writer, specificBoxLevels, indent, indentStep string) error
ContainerInfo - write container-box information
func DecryptBytesCTR ¶
DecryptBytesCTR - decrypt or encrypt sample using CTR mode, provided key, iv and sumsamplePattern
func DecryptSampleCenc ¶
func DecryptSampleCenc(sample []byte, key []byte, iv []byte, subSamplePatterns []SubSamplePattern) ([]byte, error)
DecryptSampleCenc - decrypt cenc-mode encrypted sample
func EncodeContainer ¶
func EncodeContainer(c ContainerBox, w io.Writer) error
EncodeContainer - marshal container c to w
func EncodeContainerSW ¶
func EncodeContainerSW(c ContainerBox, sw mp4ff.SliceWriter) error
EncodeContainerSW - marshal container c to sw
func EncodeHeader ¶
EncodeHeader - encode a box header to a writer
func EncodeHeaderSW ¶
func EncodeHeaderSW(b Box, sw mp4ff.SliceWriter) error
EncodeHeaderSW - encode a box header to a SliceWriter
func EncodeHeaderWithSize ¶
EncodeHeaderWithSize - encode a box header to a writer and allow for largeSize
func EncodeHeaderWithSizeSW ¶
func EncodeHeaderWithSizeSW(boxType string, boxSize uint64, largeSize bool, sw mp4ff.SliceWriter) error
EncodeHeaderWithSize - encode a box header to a writer and allow for largeSize
func GetChannelListFromACMod ¶
GetChannelListFromACMod - get list of channels from acmod byte
func GetVersion ¶
func GetVersion() string
GetVersion - get version and also commitHash and commitDate if inserted via Makefile
func IsSyncSampleFlags ¶
IsSyncSampleFlags - flags is set correctly for sync sample
func SetNonSyncSampleFlags ¶
SetNonSyncSampleFlags - return flags with nonsyncsample pattern
func SetSyncSampleFlags ¶
SetSyncSampleFlags - return flags with syncsample pattern
func WriteToFile ¶
func WriteToFile(boxStructure BoxStructure, filePath string) error
WriteToFile - write a box structure to a file at filePath
Types ¶
type AlstSampleGroupEntry ¶
type AlstSampleGroupEntry struct {
RollCount uint16
FirstOutputSample uint16
SampleOffset []uint32
NumOutputSamples []uint16
NumTotalSamples []uint16
}
AlstSampleGroupEntry - Alternative Startup Entry "alst"
ISO/IEC 14496-12 Ed. 6 2020 Section 10.3 - AlternativeStartupEntry
func (*AlstSampleGroupEntry) Encode ¶
func (s *AlstSampleGroupEntry) Encode(sw mp4ff.SliceWriter)
Encode SampleGroupEntry to SliceWriter
func (*AlstSampleGroupEntry) Info ¶
func (s *AlstSampleGroupEntry) Info(w io.Writer, specificBoxLevels, indent, indentStep string) (err error)
Info - write box info to w
func (*AlstSampleGroupEntry) Size ¶
func (s *AlstSampleGroupEntry) Size() uint64
Size of sample group entry
func (*AlstSampleGroupEntry) Type ¶
func (s *AlstSampleGroupEntry) Type() string
Type - GroupingType SampleGroupEntry (uint32 according to spec)
type AudioSampleEntryBox ¶
type AudioSampleEntryBox struct {
DataReferenceIndex uint16
ChannelCount uint16
SampleSize uint16
SampleRate uint16 // Integer part
Esds *EsdsBox
Dac3 *Dac3Box
Dec3 *Dec3Box
Sinf *SinfBox
Children []Box
// contains filtered or unexported fields
}
AudioSampleEntryBox according to ISO/IEC 14496-12
func CreateAudioSampleEntryBox ¶
func CreateAudioSampleEntryBox(name string, nrChannels, sampleSize, sampleRate uint16, child Box) *AudioSampleEntryBox
CreateAudioSampleEntryBox - Create new AudioSampleEntry such as mp4
func NewAudioSampleEntryBox ¶
func NewAudioSampleEntryBox(name string) *AudioSampleEntryBox
NewAudioSampleEntryBox - Create new empty mp4a box
func (*AudioSampleEntryBox) AddChild ¶
func (a *AudioSampleEntryBox) AddChild(child Box)
AddChild - add a child box (avcC normally, but clap and pasp could be part of visual entry)
func (*AudioSampleEntryBox) Encode ¶
func (a *AudioSampleEntryBox) Encode(w io.Writer) error
Encode - write box to w
func (*AudioSampleEntryBox) EncodeSW ¶
func (a *AudioSampleEntryBox) EncodeSW(sw mp4ff.SliceWriter) error
Encode - write box to sw
func (*AudioSampleEntryBox) Info ¶
func (a *AudioSampleEntryBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
Info - write box info to w
func (*AudioSampleEntryBox) RemoveEncryption ¶
func (a *AudioSampleEntryBox) RemoveEncryption() (*SinfBox, error)
RemoveEncryption - remove sinf box and set type to unencrypted type
func (*AudioSampleEntryBox) Size ¶
func (a *AudioSampleEntryBox) Size() uint64
Size - return calculated size
func (*AudioSampleEntryBox) Type ¶
func (a *AudioSampleEntryBox) Type() string
Type - return box type
type Box ¶
type Box interface {
// Type of box, normally 4 asccii characters, but is uint32 according to spec
Type() string
// Size of box including header and all children if any
Size() uint64
// Encode box to writer
Encode(w io.Writer) error
// Encode box to SliceWriter
EncodeSW(sw mp4ff.SliceWriter) error
// Info - write box details
// spedificBoxLevels is a comma-separated list box:level or all:level where level >= 0.
// Higher levels give more details. 0 is default
// indent is indent at this box level.
// indentStep is how much to indent at each level
Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
}
Box is the general interface to any ISOBMFF box or similar
func DecodeAudioSampleEntry ¶
DecodeAudioSampleEntry - decode mp4a... box
func DecodeAudioSampleEntrySR ¶
DecodeAudioSampleEntry - decode mp4a... box
func DecodeBoxLazyMdat ¶
func DecodeBoxLazyMdat(startPos uint64, r io.ReadSeeker) (Box, error)
DecodeBoxLazyMdat decodes a box but doesn't read mdat into memory
func DecodeBoxSR ¶
func DecodeBoxSR(startPos uint64, sr mp4ff.SliceReader) (Box, error)
DecodeBoxSR - decode a box from SliceReader
func DecodeBtrt ¶
DecodeBtrt - box-specific decode
func DecodeBtrtSR ¶
DecodeBtrtSR - box-specific decode
func DecodeCToo ¶
DecodeCToo - box-specific decode
func DecodeCTooSR ¶
DecodeCTooSR - box-specific decode
func DecodeCdat ¶
DecodeCdat - box-specific decode
func DecodeCdatSR ¶
DecodeCdat - box-specific decode
func DecodeClap ¶
DecodeClap - box-specific decode
func DecodeClapSR ¶
DecodeClapSR - box-specific decode
func DecodeCo64 ¶
DecodeCo64 - box-specific decode
func DecodeCo64SR ¶
DecodeCo64 - box-specific decode
func DecodeContainerChildren ¶
DecodeContainerChildren decodes a container box
func DecodeContainerChildrenSR ¶
func DecodeContainerChildrenSR(hdr BoxHeader, startPos, endPos uint64, sr mp4ff.SliceReader) ([]Box, error)
DecodeContainerChildren decodes a container box
func DecodeCslg ¶
DecodeCslg - box-specific decode
func DecodeCslgSR ¶
DecodeCslgSR - box-specific decode
func DecodeCtim ¶
DecodeCtim - box-specific decode
func DecodeCtimSR ¶
DecodeCtimSR - box-specific decode
func DecodeCtts ¶
DecodeCtts - box-specific decode
func DecodeCttsSR ¶
DecodeCttsSR - box-specific decode
func DecodeDac3 ¶
DecodeDac3 - box-specific decode
func DecodeDac3SR ¶
DecodeDac3SR - box-specific decode
func DecodeData ¶
DecodeData - decode Data (from mov_write_string_data_tag in movenc.c in ffmpeg)
func DecodeDataSR ¶
DecodeDataSR - decode Data (from mov_write_string_data_tag in movenc.c in ffmpeg)
func DecodeDec3 ¶
DecodeDec3 - box-specific decode
func DecodeDec3SR ¶
DecodeDec3SR - box-specific decode
func DecodeDinf ¶
DecodeDinf - box-specific decode
func DecodeDinfSR ¶
DecodeDinfSR - box-specific decode
func DecodeDref ¶
DecodeDref - box-specific decode
func DecodeDrefSR ¶
DecodeDrefSR - box-specific decode
func DecodeEdts ¶
DecodeEdts - box-specific decode
func DecodeEdtsSR ¶
DecodeEdtsSR - box-specific decode
func DecodeElng ¶
DecodeElng - box-specific decode
func DecodeElngSR ¶
DecodeElngSR - box-specific decode
func DecodeElst ¶
DecodeElst - box-specific decode
func DecodeElstSR ¶
DecodeElstSR - box-specific decode
func DecodeEmsg ¶
DecodeEmsg - box-specific decode
func DecodeEmsgSR ¶
DecodeEmsgSR - box-specific decode
func DecodeEsds ¶
DecodeEsds - box-specific decode
func DecodeEsdsSR ¶
DecodeEsdsSR - box-specific decode
func DecodeFree ¶
DecodeFree - box-specific decode
func DecodeFreeSR ¶
DecodeFreeSR - box-specific decode
func DecodeFrma ¶
DecodeFrma - box-specific decode
func DecodeFrmaSR ¶
DecodeFrmaSR - box-specific decode
func DecodeFtyp ¶
DecodeFtyp - box-specific decode
func DecodeFtypSR ¶
DecodeFtypSR - box-specific decode
func DecodeHdlr ¶
DecodeHdlr - box-specific decode
func DecodeHdlrSR ¶
DecodeHdlrSR - box-specific decode
func DecodeIden ¶
DecodeIden - box-specific decode
func DecodeIdenSR ¶
DecodeIdenSR - box-specific decode
func DecodeIlst ¶
DecodeIlst - box-specific decode
func DecodeIlstSR ¶
DecodeIlstSR - box-specific decode
func DecodeKind ¶
DecodeKind - box-specific decode
func DecodeKindSR ¶
DecodeKindSR - box-specific decode
func DecodeMdat ¶
DecodeMdat - box-specific decode
func DecodeMdatLazily ¶
DecodeMdatLazily - box-specific decode but Data is not in memory
func DecodeMdatSR ¶
DecodeMdatSR - box-specific decode
func DecodeMdhd ¶
DecodeMdhd - Decode box
func DecodeMdhdSR ¶
DecodeMdhd - Decode box
func DecodeMdia ¶
DecodeMdia - box-specific decode
func DecodeMdiaSR ¶
DecodeMdiaSR - box-specific decode
func DecodeMehd ¶
DecodeMehd - box-specific decode
func DecodeMehdSR ¶
DecodeMehdSR - box-specific decode
func DecodeMeta ¶
DecodeMeta - box-specific decode
func DecodeMetaSR ¶
DecodeMetaSR - box-specific decode
func DecodeMfhd ¶
DecodeMfhd - box-specific decode
func DecodeMfhdSR ¶
DecodeMfhdSR - box-specific decode
func DecodeMfra ¶
DecodeMfra - box-specific decode
func DecodeMfraSR ¶
DecodeMfraSR - box-specific decode
func DecodeMfro ¶
DecodeMfro - box-specific decode
func DecodeMfroSR ¶
DecodeMfroSR - box-specific decode
func DecodeMime ¶
DecodeMime - box-specific decode
func DecodeMimeSR ¶
DecodeMimeSR - box-specific decode
func DecodeMinf ¶
DecodeMinf - box-specific decode
func DecodeMinfSR ¶
DecodeMinfSR - box-specific decode
func DecodeMoof ¶
DecodeMoof - box-specific decode
func DecodeMoofSR ¶
DecodeMoofSR - box-specific decode
func DecodeMoov ¶
DecodeMoov - box-specific decode
func DecodeMoovSR ¶
DecodeMoovSR - box-specific decode
func DecodeMvex ¶
DecodeMvex - box-specific decode
func DecodeMvexSR ¶
DecodeMvex - box-specific decode
func DecodeMvhd ¶
DecodeMvhd - box-specific decode
func DecodeMvhdSR ¶
DecodeMvhdSR - box-specific decode
func DecodeNmhd ¶
DecodeNmhd - box-specific decode
func DecodeNmhdSR ¶
DecodeNmhdSR - box-specific decode
func DecodePasp ¶
DecodePasp - box-specific decode
func DecodePaspSR ¶
DecodePaspSR - box-specific decode
func DecodePayl ¶
DecodePayl - box-specific decode
func DecodePaylSR ¶
DecodePaylSR - box-specific decode
func DecodePrft ¶
DecodePrft - box-specific decode
func DecodePrftSR ¶
DecodePrftSR - box-specific decode
func DecodePssh ¶
DecodePssh - box-specific decode
func DecodePsshSR ¶
DecodePsshSR - box-specific decode
func DecodeSaio ¶
DecodeSaio - box-specific decode
func DecodeSaioSR ¶
DecodeSaioSR - box-specific decode
func DecodeSaiz ¶
DecodeSaiz - box-specific decode
func DecodeSaizSR ¶
DecodeSaizSR - box-specific decode
func DecodeSbgp ¶
DecodeSbgp - box-specific decode
func DecodeSbgpSR ¶
DecodeSbgpSR - box-specific decode
func DecodeSchi ¶
DecodeSchi - box-specific decode
func DecodeSchiSR ¶
DecodeSchiSR - box-specific decode
func DecodeSchm ¶
DecodeSchm - box-specific decode
func DecodeSchmSR ¶
DecodeSchmSR - box-specific decode
func DecodeSdtp ¶
DecodeSdtp - box-specific decode
func DecodeSdtpSR ¶
DecodeSdtpSR - box-specific decode
func DecodeSenc ¶
DecodeSenc - box-specific decode
func DecodeSencSR ¶
DecodeSencSR - box-specific decode
func DecodeSgpd ¶
DecodeSgpd - box-specific decode
func DecodeSgpdSR ¶
DecodeSgpdSR - box-specific decode
func DecodeSidx ¶
DecodeSidx - box-specific decode
func DecodeSidxSR ¶
DecodeSidxSR - box-specific decode
func DecodeSinf ¶
DecodeSinf - box-specific decode
func DecodeSinfSR ¶
DecodeSinfSR - box-specific decode
func DecodeSmhd ¶
DecodeSmhd - box-specific decode
func DecodeSmhdSR ¶
DecodeSmhdSR - box-specific decode
func DecodeStbl ¶
DecodeStbl - box-specific decode
func DecodeStblSR ¶
DecodeStblSR - box-specific decode
func DecodeStco ¶
DecodeStco - box-specific decode
func DecodeStcoSR ¶
DecodeStcoSR - box-specific decode
func DecodeSthd ¶
DecodeSthd - box-specific decode
func DecodeSthdSR ¶
DecodeSthdSR - box-specific decode
func DecodeStpp ¶
DecodeStpp - Decode XMLSubtitleSampleEntry (stpp)
func DecodeStppSR ¶
DecodeStppSR - Decode XMLSubtitleSampleEntry (stpp)
func DecodeStsc ¶
DecodeStsc - box-specific decode
func DecodeStscSR ¶
DecodeStscSR - box-specific decode
func DecodeStsd ¶
DecodeStsd - box-specific decode
func DecodeStsdSR ¶
DecodeStsdSR - box-specific decode
func DecodeStss ¶
DecodeStss - box-specific decode
func DecodeStssSR ¶
DecodeStssSR - box-specific decode
func DecodeStsz ¶
DecodeStsz - box-specific decode
func DecodeStszSR ¶
DecodeStszSR - box-specific decode
func DecodeSttg ¶
DecodeSttg - box-specific decode
func DecodeSttgSR ¶
DecodeSttgSR - box-specific decode
func DecodeStts ¶
DecodeStts - box-specific decode
func DecodeSttsSR ¶
DecodeSttsSR - box-specific decode
func DecodeStyp ¶
DecodeStyp - box-specific decode
func DecodeStypSR ¶
DecodeStypSR - box-specific decode
func DecodeSubs ¶
DecodeSubs - box-specific decode
func DecodeSubsSR ¶
DecodeSubsSR - box-specific decode
func DecodeTenc ¶
DecodeTenc - box-specific decode
func DecodeTencSR ¶
DecodeTencSR - box-specific decode
func DecodeTfdt ¶
DecodeTfdt - box-specific decode
func DecodeTfdtSR ¶
DecodeTfdtSR - box-specific decode
func DecodeTfhd ¶
DecodeTfhd - box-specific decode
func DecodeTfhdSR ¶
DecodeTfhdSR - box-specific decode
func DecodeTfra ¶
DecodeTfra - box-specific decode
func DecodeTfraSR ¶
DecodeTfraSR - box-specific decode
func DecodeTkhd ¶
DecodeTkhd - box-specific decode
func DecodeTkhdSR ¶
DecodeTkhdSR - box-specific decode
func DecodeTraf ¶
DecodeTraf - box-specific decode
func DecodeTrafSR ¶
DecodeTrafSR - box-specific decode
func DecodeTrak ¶
DecodeTrak - box-specific decode
func DecodeTrakSR ¶
DecodeTrakSR - box-specific decode
func DecodeTref ¶
DecodeTref - box-specific decode
func DecodeTrefSR ¶
DecodeTrefSR - box-specific decode
func DecodeTrefType ¶
DecodeTrefType - box-specific decode
func DecodeTrefTypeSR ¶
DecodeTrefTypeSR - box-specific decode
func DecodeTrep ¶
DecodeTrep - box-specific decode
func DecodeTrepSR ¶
DecodeTrepSR - box-specific decode
func DecodeTrex ¶
DecodeTrex - box-specific decode
func DecodeTrexSR ¶
DecodeTrexSR - box-specific decode
func DecodeTrun ¶
DecodeTrun - box-specific decode
func DecodeTrunSR ¶
DecodeTrun - box-specific decode
func DecodeURLBox ¶
DecodeURLBox - box-specific decode
func DecodeURLBoxSR ¶
DecodeURLBoxSR - box-specific decode
func DecodeUUIDBox ¶
DecodeUUIDBox - decode a UUID box including tfxd or tfrf
func DecodeUUIDBoxSR ¶
DecodeUUIDBoxSR - decode a UUID box including tfxd or tfrf
func DecodeUdta ¶
DecodeUdta - box-specific decode
func DecodeUdtaSR ¶
DecodeUdtaSR - box-specific decode
func DecodeUnknown ¶
DecodeUnknown - decode an unknown box
func DecodeUnknownSR ¶
DecodeUnknown - decode an unknown box
func DecodeVisualSampleEntry ¶
DecodeVisualSampleEntry - decode avc1/avc3/... box
func DecodeVisualSampleEntrySR ¶
DecodeVisualSampleEntrySR - decode avc1/avc3/hvc1/hev1... box
func DecodeVlab ¶
DecodeVlab - box-specific decode
func DecodeVlabSR ¶
DecodeVlabSR - box-specific decode
func DecodeVmhd ¶
DecodeVmhd - box-specific decode
func DecodeVmhdSR ¶
DecodeVmhdSR - box-specific decode
func DecodeVsid ¶
DecodeVsid - box-specific decode
func DecodeVsidSR ¶
DecodeVsidSR - box-specific decode
func DecodeVttC ¶
DecodeVttC - box-specific decode
func DecodeVttCSR ¶
DecodeVttCSR - box-specific decode
func DecodeVtta ¶
DecodeVtta - box-specific decode
func DecodeVttaSR ¶
DecodeVttaSR - box-specific decode
func DecodeVttc ¶
DecodeVttc - box-specific decode
func DecodeVttcSR ¶
DecodeVttcSR - box-specific decode
func DecodeVtte ¶
DecodeVtte - box-specific decode
func DecodeVtteSR ¶
DecodeVtteSR - box-specific decode
func DecodeWvtt ¶
DecodeWvtt - Decoder wvtt Sample Entry (wvtt)
func DecodeWvttSR ¶
DecodeWvttSR - Decoder wvtt Sample Entry (wvtt)
type BoxDecoder ¶
BoxDecoder is function signature of the Box Decode method
type BoxDecoderSR ¶
BoxDecoderSR is function signature of the Box DecodeSR method
type BoxHeader ¶
BoxHeader - 8 or 16 bytes depending on size
func DecodeHeader ¶
DecodeHeader decodes a box header (size + box type + possiible largeSize)
func DecodeHeaderSR ¶
func DecodeHeaderSR(sr mp4ff.SliceReader) (BoxHeader, error)
DecodeHeaderSR - decode a box header (size + box type + possible largeSize) from sr
type BoxStructure ¶
BoxStructure represent a box or similar entity such as a Segment
type BtrtBox ¶
BtrtBox - BitRateBox - ISO/IEC 14496-12 Section 8.5.2.2
func (*BtrtBox) EncodeSW ¶
func (b *BtrtBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type CTooBox ¶
type CTooBox struct {
Children []Box
}
CTooBox - ©too box defines the ffmpeg encoding tool information
func (*CTooBox) EncodeSW ¶
func (b *CTooBox) EncodeSW(sw mp4ff.SliceWriter) error
Encode - write minf container to sw
func (*CTooBox) GetChildren ¶
GetChildren - list of child boxes
type CdatBox ¶
type CdatBox struct {
Data []byte
}
CdatBox - Closed Captioning Sample Data according to QuickTime spec: https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFChap3/qtff3.html#//apple_ref/doc/uid/TP40000939-CH205-SW87
func (*CdatBox) EncodeSW ¶
func (b *CdatBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type ClapBox ¶
type ClapBox struct {
CleanApertureWidthN uint32
CleanApertureWidthD uint32
CleanApertureHeightN uint32
CleanApertureHeightD uint32
HorizOffN uint32
HorizOffD uint32
VertOffN uint32
VertOffD uint32
}
ClapBox - Clean Aperture Box, ISO/IEC 14496-12 2020 Sec. 12.1.4
func (*ClapBox) EncodeSW ¶
func (b *ClapBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type Co64Box ¶
Co64Box - Chunk Large Offset Box
Contained in : Sample Table box (stbl)
64-bit version of StcoBox
func (*Co64Box) EncodeSW ¶
func (b *Co64Box) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type ContainerBox ¶
type ContainerBox interface {
Type() string
Size() uint64
Encode(w io.Writer) error
EncodeSW(w mp4ff.SliceWriter) error
GetChildren() []Box
Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
}
ContainerBox is interface for ContainerBoxes
type CslgBox ¶
type CslgBox struct {
Version byte
Flags uint32
CompositionToDTSShift int64
LeastDecodeToDisplayDelta int64
GreatestDecodeToDisplayDelta int64
CompositionStartTime int64
CompositionEndTime int64
}
CslgBox - CompositionToDecodeBox -ISO/IEC 14496-12 2015 Sec. 8.6.1.4
Contained in: Sample Table Box (stbl) or Track Extension Properties Box (trep)
func (*CslgBox) EncodeSW ¶
func (b *CslgBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type CtimBox ¶
type CtimBox struct {
CueCurrentTime string
}
CtimBox - CueTimeBox (ctim) CueCurrentTime is current time indication (for split cues)
func (*CtimBox) EncodeSW ¶
func (b *CtimBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type CttsBox ¶
type CttsBox struct {
Version byte
Flags uint32
SampleCount []uint32
SampleOffset []int32 // int32 to handle version 1
}
CttsBox - Composition Time to Sample Box (ctts - optional)
Contained in: Sample Table Box (stbl)
func (*CttsBox) EncodeSW ¶
func (b *CttsBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
func (*CttsBox) GetCompositionTimeOffset ¶
GetCompositionTimeOffset - composition time offset for (one-based) sampleNr in track timescale
type Dac3Box ¶
Dac3Box - AC3SpecificBox from ETSI TS 102 366 V1.4.1 F.4 (2017)
func (*Dac3Box) BitrateBps ¶
func (*Dac3Box) ChannelInfo ¶
ChannelInfo - number of channels and channelmap according to E.1.3.1.8
func (*Dac3Box) EncodeSW ¶
func (b *Dac3Box) EncodeSW(sw mp4ff.SliceWriter) error
Encode - write box to sw
func (*Dac3Box) SamplingFrequency ¶
type DataBox ¶
type DataBox struct {
Data []byte
}
DataBox - data box used by ffmpeg for providing information.
func (*DataBox) EncodeSW ¶
func (b *DataBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type Dec3Box ¶
Dec3Box - AC3SpecificBox from ETSI TS 102 366 V1.4.1 F.4 (2017)
func (*Dec3Box) ChannelInfo ¶
func (*Dec3Box) EncodeSW ¶
func (b *Dec3Box) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - write box to sw
type DecFileMode ¶
type DecFileMode byte
DecFileMode - mode for decoding file
const ( // DecModeNormal - read Mdat data into memory during file decoding. DecModeNormal DecFileMode = iota // DecModeLazyMdat - do not read mdat data into memory. // Thus, decode process requires less memory and faster. DecModeLazyMdat )
type DinfBox ¶
DinfBox - Data Information Box (dinf - mandatory)
Contained in : Media Information Box (minf) or Meta Box (meta)
func (*DinfBox) EncodeSW ¶
func (d *DinfBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - write container using slice writer
func (*DinfBox) GetChildren ¶
GetChildren - list of child boxes
type DrefBox ¶
DrefBox - Data Reference Box (dref - mandatory)
Contained id: Data Information Box (dinf)
Defines the location of the media data. If the data for the track is located in the same file it contains nothing useful.
func CreateDref ¶
func CreateDref() *DrefBox
CreateDref - Create an DataReferenceBox for selfcontained content
func (*DrefBox) EncodeSW ¶
func (d *DrefBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - write dref box to w including children
type EC3Sub ¶
type EC3Sub struct {
FSCod byte
BSID byte
ASVC byte
BSMod byte
ACMod byte
LFEOn byte
NumDepSub byte
ChanLoc uint16
}
EC3Sub - Enhanced AC-3 substream information
type EdtsBox ¶
EdtsBox - Edit Box (edts - optional)
Contained in: Track Box ("trak")
The edit box maps the presentation timeline to the media-time line
func (*EdtsBox) EncodeSW ¶
func (b *EdtsBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - write edts container to sw
func (*EdtsBox) GetChildren ¶
GetChildren - list of child boxes
type ElngBox ¶
type ElngBox struct {
Language string
}
ElngBox - Extended Language Box
func CreateElng ¶
CreateElng - Create an Extended Language Box
func (*ElngBox) EncodeSW ¶
func (b *ElngBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type ElstBox ¶
ElstBox - Edit List Box (elst - optional)
Contained in : Edit Box (edts)
func (*ElstBox) EncodeSW ¶
func (b *ElstBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type EmsgBox ¶
type EmsgBox struct {
Version byte
Flags uint32
TimeScale uint32
PresentationTimeDelta uint32
PresentationTime uint64
EventDuration uint32
ID uint32
SchemeIDURI string
Value string
}
EmsgBox - DASHEventMessageBox as defined in ISO/IEC 23009-1
func (*EmsgBox) EncodeSW ¶
func (b *EmsgBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type EncOptimize ¶
type EncOptimize uint32
EncOptimize - encoder optimization mode
func (EncOptimize) String ¶
func (eo EncOptimize) String() string
type EsdsBox ¶
type EsdsBox struct {
Version byte
Flags uint32
EsDescrTag byte
EsID uint16
FlagsAndPriority byte
DecoderConfigDescrTag byte
ObjectType byte
StreamType byte
BufferSizeDB uint32
MaxBitrate uint32
AvgBitrate uint32
DecSpecificInfoTag byte
DecConfig []byte
SLConfigDescrTag byte
SLConfigValue byte
// contains filtered or unexported fields
}
EsdsBox as used for MPEG-audio, see ISO 14496-1 Section 7.2.6.6 for DecoderConfigDescriptor
func CreateEsdsBox ¶
CreateEsdsBox - Create an EsdsBox geiven decConfig
func (*EsdsBox) EncodeSW ¶
func (e *EsdsBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type File ¶
type File struct {
Ftyp *FtypBox
Moov *MoovBox
Mdat *MdatBox // Only used for non-fragmented files
Init *InitSegment // Init data (ftyp + moov for fragmented file)
Sidx *SidxBox // SidxBox for a DASH OnDemand file
Segments []*MediaSegment // Media segments
Children []Box // All top-level boxes in order
FragEncMode EncFragFileMode // Determine how fragmented files are encoded
EncOptimize EncOptimize // Bit field with optimizations being done at encoding
// contains filtered or unexported fields
}
File - an MPEG-4 file asset
A progressive MPEG-4 file contains three main boxes:
ftyp : the file type box moov : the movie box (meta-data) mdat : the media data (chunks and samples). Only used for pror
where mdat may come before moov. If fragmented, there are many more boxes and they are collected in the InitSegment, Segment and Segments structures. The sample metadata in thefragments in the Segments will be optimized unless EncodeVerbatim is set. To Encode the same data as Decoded, this flag must therefore be set. In all cases, Children contain all top-level boxes
func DecodeFile ¶
DecodeFile - parse and decode a file from reader r with optional file options. For example, the file options overwrite the default decode or encode mode.
func DecodeFileSR ¶
func DecodeFileSR(sr mp4ff.SliceReader, options ...Option) (*File, error)
DecodeFile - parse and decode a file from reader r with optional file options. For example, the file options overwrite the default decode or encode mode.
func ReadMP4File ¶
ReadMP4File - read an mp4 file from path
func (*File) AddMediaSegment ¶
func (f *File) AddMediaSegment(m *MediaSegment)
AddMediaSegment - add a mediasegment to file f
func (*File) ApplyOptions ¶
ApplyOptions - applies options for decoding or encoding a file
func (*File) CopySampleData ¶
func (f *File) CopySampleData(w io.Writer, rs io.ReadSeeker, trak *TrakBox, startSampleNr, endSampleNr uint32) error
CopySampleData - copy sample data from a track in a progressive mp4 file to w. Use rs if lazy read.
func (*File) DumpWithSampleData ¶
DumpWithSampleData - print information about file and its children boxes
func (*File) Encode ¶
Encode - encode a file to a Writer Fragmented files are encoded based on InitSegment and MediaSegments, unless EncodeVerbatim is set.
func (*File) EncodeSW ¶
func (f *File) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - encode a file to a SliceWriter Fragmented files are encoded based on InitSegment and MediaSegments, unless EncodeVerbatim is set.
func (*File) IsFragmented ¶
IsFragmented - is file made of multiple segments (Mp4 fragments)
func (*File) LastSegment ¶
func (f *File) LastSegment() *MediaSegment
LastSegment - Currently last segment
type Fragment ¶
type Fragment struct {
Prft *PrftBox
Moof *MoofBox
Mdat *MdatBox
Children []Box // All top-level boxes in order
EncOptimize EncOptimize // Bit field with optimizations being done at encoding
// contains filtered or unexported fields
}
Fragment - MP4 Fragment ([prft] + moof + mdat)
func CreateFragment ¶
CreateFragment - create single track empty fragment
func CreateMultiTrackFragment ¶
CreateMultiTrackFragment - create multi-track empty fragment without trun
func (*Fragment) AddFullSample ¶
func (f *Fragment) AddFullSample(s FullSample)
AddFullSample - add a full sample to the first (and only) trun of a track AddFullSampleToTrack is the more general function
func (*Fragment) AddFullSampleToTrack ¶
func (f *Fragment) AddFullSampleToTrack(s FullSample, trackID uint32) error
AddFullSampleToTrack - allows for adding samples to any track New trun boxes will be created if latest trun of fragment is not in this track
func (*Fragment) AddSample ¶
AddSample - add a sample to the first (and only) trun of a track AddSampleToTrack is the more general function
func (*Fragment) AddSampleInterval ¶
func (f *Fragment) AddSampleInterval(sItvl SampleInterval) error
AddSampleInterval - add SampleInterval for a fragment with only one track
func (*Fragment) AddSampleToTrack ¶
AddSampleToTrack - allows for adding samples to any track New trun boxes will be created if latest trun of fragment is not in this track baseMediaDecodeTime will be used only for first sample in a trun
func (*Fragment) AddSamples ¶
AddSamples - add a slice of Sample to the first (and only) trun of a track
func (*Fragment) DumpSampleData ¶
DumpSampleData - Get Sample data and print out
func (*Fragment) EncodeSW ¶
func (f *Fragment) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - write fragment via SliceWriter
func (*Fragment) GetChildren ¶
GetChildren - return children boxes
func (*Fragment) GetFullSamples ¶
func (f *Fragment) GetFullSamples(trex *TrexBox) ([]FullSample, error)
GetFullSamples - Get full samples including media and accumulated time
func (*Fragment) GetSampleInterval ¶
func (f *Fragment) GetSampleInterval(trex *TrexBox, startSampleNr, endSampleNr uint32) (SampleInterval, error)
GetSampleInterval - get SampleInterval for a fragment with only one track
func (*Fragment) GetSampleNrFromTime ¶
GetSampleNrFromTime - look up sample number from a specified time. Return error if no matching time
func (*Fragment) SetTrunDataOffsets ¶
func (f *Fragment) SetTrunDataOffsets()
SetTrunDataOffsets - set DataOffset in trun depending on size and writeOrder
type FreeBox ¶
type FreeBox struct {
Name string
// contains filtered or unexported fields
}
FreeBox - Free Space Box (free or skip)
func (*FreeBox) EncodeSW ¶
func (b *FreeBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type FrmaBox ¶
type FrmaBox struct {
DataFormat string // uint32 - original box type
}
FrmaBox - Original Format Box
func (*FrmaBox) EncodeSW ¶
func (b *FrmaBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type FtypBox ¶
type FtypBox struct {
// contains filtered or unexported fields
}
FtypBox - File Type Box (ftyp - mandatory in full file/init segment)
func (*FtypBox) CompatibleBrands ¶
CompatibleBrands - slice of compatible brands (4 chars each)
func (*FtypBox) EncodeSW ¶
func (b *FtypBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
func (*FtypBox) MajorBrand ¶
MajorBrand - major brand (4 chars)
type FullSample ¶
type FullSample struct {
Sample
DecodeTime uint64 // Absolute decode time (offset + accumulated sample Dur)
Data []byte // Sample data
}
FullSample - include accumulated time and data. Times in mdhd timescale
func (*FullSample) PresentationTime ¶
func (s *FullSample) PresentationTime() uint64
PresentationTime - DecodeTime displaced by composition time offset (possibly negative)
type HdlrBox ¶
type HdlrBox struct {
Version byte
Flags uint32
PreDefined uint32
HandlerType string
Name string // Null-terminated UTF-8 string according to ISO/IEC 14496-12 Sec. 8.4.3.3
LacksNullTermination bool // This should be true, but we allow false as well
}
HdlrBox - Handler Reference Box (hdlr - mandatory)
Contained in: Media Box (mdia) or Meta Box (meta)
This box describes the type of data contained in the trak. HandlerType can be : "vide" (video track), "soun" (audio track), "subt" (subtitle track) Other types are: "hint" (hint track), "meta" (timed Metadata track), "auxv" (auxiliary video track). clcp (Closed Captions (QuickTime))
func CreateHdlr ¶
CreateHdlr - create mediaType-specific hdlr box
func (*HdlrBox) EncodeSW ¶
func (b *HdlrBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type IdenBox ¶
type IdenBox struct {
CueID string
}
IdenBox - CueIDBox (iden)
func (*IdenBox) EncodeSW ¶
func (b *IdenBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type IlstBox ¶
type IlstBox struct {
Children []Box
}
IlstBox - iTunes Metadata Item List Atom (ilst) See https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/Metadata/Metadata.html
func (*IlstBox) EncodeSW ¶
func (b *IlstBox) EncodeSW(sw mp4ff.SliceWriter) error
Encode - write ilst container to sw
func (*IlstBox) GetChildren ¶
GetChildren - list of child boxes
type Informer ¶
type Informer interface {
// Info - write details via Info method
// spedificBoxLevels is a comma-separated list box:level or all:level where level >= 0.
// Higher levels give more details. 0 is default
// indent is indent at this box level.
// indentStep is how much to indent at each level
Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
}
Informer - write box, segment or file details
type InitSegment ¶
type InitSegment struct {
MediaType string
Ftyp *FtypBox
Moov *MoovBox
Children []Box // All top-level boxes in order
}
InitSegment - MP4/CMAF init segment
func CreateEmptyInit ¶
func CreateEmptyInit() *InitSegment
CreateEmptyInit - create an init segment for fragmented files
func (*InitSegment) AddChild ¶
func (s *InitSegment) AddChild(b Box)
AddChild - Add a top-level box to InitSegment
func (*InitSegment) AddEmptyTrack ¶
func (s *InitSegment) AddEmptyTrack(timeScale uint32, mediaType, language string)
AddEmptyTrack - add trak + trex box with appropriate trackID value
func (*InitSegment) Encode ¶
func (s *InitSegment) Encode(w io.Writer) error
Encode - encode an initsegment to a Writer
func (*InitSegment) EncodeSW ¶
func (s *InitSegment) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - encode an initsegment to a SliceWriter
func (*InitSegment) GetMediaType ¶
func (s *InitSegment) GetMediaType() string
GetMediaType - should return video or audio (at present)
type KindBox ¶
KindBox - Track Kind Box
func (*KindBox) EncodeSW ¶
func (b *KindBox) EncodeSW(sw mp4ff.SliceWriter) error
Encode - write box to w
type MdatBox ¶
type MdatBox struct {
StartPos uint64
Data []byte
DataParts [][]byte
LargeSize bool
// contains filtered or unexported fields
}
MdatBox - Media Data Box (mdat) The mdat box contains media chunks/samples. DataParts is to be able to gather output data without new allocations
func (*MdatBox) AddSampleData ¶
AddSampleData - a sample data to an mdat box
func (*MdatBox) AddSampleDataPart ¶
AddSampleDataPart - add a data part (for output)
func (*MdatBox) CopyData ¶
func (m *MdatBox) CopyData(start, size int64, rs io.ReadSeeker, w io.Writer) (nrWritten int64, err error)
CopyData - copy data range from mdat to w. The ReadSeeker is used for lazily loaded mdat case.
func (*MdatBox) DataLength ¶
DataLength - length of data stored in box either as one or multiple parts
func (*MdatBox) Encode ¶
Encode - write box to w. If m.lazyDataSize > 0, the mdat data needs to be written separately
func (*MdatBox) EncodeSW ¶
func (m *MdatBox) EncodeSW(sw mp4ff.SliceWriter) error
Encode - write box to sw. If m.lazyDataSize > 0, the mdat data needs to be written separately
func (*MdatBox) GetLazyDataSize ¶
GetLazyDataSize - size of the box if filled with data
func (*MdatBox) HeaderSize ¶
HeaderSize - 8 or 16 (bytes) depending o whether largeSize is used
func (*MdatBox) PayloadAbsoluteOffset ¶
PayloadAbsoluteOffset - position of mdat payload start (works after header)
func (*MdatBox) ReadData ¶
ReadData reads Mdat data specified by the start and size. Input argument start is the position relative to the start of a file. The ReadSeeker is used for lazily loaded mdat case.
func (*MdatBox) SetLazyDataSize ¶
SetLazyDataSize - set size of mdat lazy data so that the data can be written separately Don't put any data in m.Data in this mode.
type MdhdBox ¶
type MdhdBox struct {
Version byte // Only version 0
Flags uint32
CreationTime uint64 // Typically not set
ModificationTime uint64 // Typically not set
Timescale uint32 // Media timescale for this track
Duration uint64 // Trak duration, 0 for fragmented files
Language uint16 // Three-letter ISO-639-2/T language code
}
MdhdBox - Media Header Box (mdhd - mandatory)
Contained in : Media Box (mdia)
Timescale defines the timescale used for this track. Language is a ISO-639-2/T language code stored as 1bit padding + [3]int5
func (*MdhdBox) EncodeSW ¶
func (m *MdhdBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
func (*MdhdBox) GetLanguage ¶
GetLanguage - Get three-byte language string
func (*MdhdBox) SetLanguage ¶
SetLanguage - Set three-byte language string
type MdiaBox ¶
MdiaBox - Media Box (mdia)
Contained in : Track Box (trak) Contains all information about the media data.
func (*MdiaBox) EncodeSW ¶
func (m *MdiaBox) EncodeSW(sw mp4ff.SliceWriter) error
Encode - write mdia container via sw
func (*MdiaBox) GetChildren ¶
GetChildren - list of child boxes
type MediaSegment ¶
type MediaSegment struct {
Styp *StypBox
Sidx *SidxBox // Sidx for a segment
Fragments []*Fragment
EncOptimize EncOptimize
}
MediaSegment - MP4 Media Segment
func NewMediaSegment ¶
func NewMediaSegment() *MediaSegment
NewMediaSegment - create empty MediaSegment with CMAF styp box
func NewMediaSegmentWithoutStyp ¶
func NewMediaSegmentWithoutStyp() *MediaSegment
NewMediaSegmentWithoutStyp - create empty media segment with no styp box
func (*MediaSegment) AddFragment ¶
func (s *MediaSegment) AddFragment(f *Fragment)
AddFragment - Add a fragment to a MediaSegment
func (*MediaSegment) Encode ¶
func (s *MediaSegment) Encode(w io.Writer) error
Encode - Write MediaSegment via writer
func (*MediaSegment) EncodeSW ¶
func (s *MediaSegment) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - Write MediaSegment via SliceWriter
func (*MediaSegment) Fragmentify ¶
func (s *MediaSegment) Fragmentify(timescale uint64, trex *TrexBox, duration uint32) ([]*Fragment, error)
Fragmentify - Split into multiple fragments. Assume single mdat and trun for now
func (*MediaSegment) Info ¶
func (s *MediaSegment) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
Info - write box tree with indent for each level
func (*MediaSegment) LastFragment ¶
func (s *MediaSegment) LastFragment() *Fragment
LastFragment - Currently last fragment
func (*MediaSegment) Size ¶
func (s *MediaSegment) Size() uint64
Size - return size of media segment
type MehdBox ¶
MehdBox - Movie Extends Header Box Optional, provides overall duration of a fragmented movie
func (*MehdBox) EncodeSW ¶
func (b *MehdBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type MetaBox ¶
MetaBox - MetaBox meta ISO/IEC 14496-12 Ed. 6 2020 Section 8.11
func CreateMetaBox ¶
CreateMetaBox - Create a new MetaBox
func (*MetaBox) EncodeSW ¶
func (b *MetaBox) EncodeSW(sw mp4ff.SliceWriter) error
Encode - write minf container to sw
func (*MetaBox) GetChildren ¶
GetChildren - list of child boxes
type MfhdBox ¶
MfhdBox - Media Fragment Header Box (mfhd)
Contained in : Movie Fragment box (moof))
func (*MfhdBox) EncodeSW ¶
func (m *MfhdBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type MfraBox ¶
MfraBox - Movie Fragment Random Access Box (mfra) Container for TfraBox(es) that can be used to find sync samples
func (*MfraBox) EncodeSW ¶
func (m *MfraBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW- write mfra container via sw
func (*MfraBox) GetChildren ¶
GetChildren - list of child boxes
type MfroBox ¶
MfroBox - Movie Fragment Random Access Offset Box (mfro) Contained in : MfraBox (mfra)
func (*MfroBox) EncodeSW ¶
func (b *MfroBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type MimeBox ¶
type MimeBox struct {
Version byte
Flags uint32
ContentType string
LacksZeroTermination bool // Handle non-compliant case as well
}
MimeBox - MIME Box as defined in ISO/IEC 14496-12 2020 Section 12.3.3.2
func (*MimeBox) EncodeSW ¶
func (b *MimeBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type MinfBox ¶
type MinfBox struct {
Vmhd *VmhdBox
Smhd *SmhdBox
Sthd *SthdBox
Dinf *DinfBox
Stbl *StblBox
Children []Box
}
MinfBox - Media Information Box (minf - mandatory)
Contained in : Media Box (mdia)
func (*MinfBox) EncodeSW ¶
func (m *MinfBox) EncodeSW(sw mp4ff.SliceWriter) error
Encode - write minf container to sw
func (*MinfBox) GetChildren ¶
GetChildren - list of child boxes
type MoofBox ¶
type MoofBox struct {
Mfhd *MfhdBox
Traf *TrafBox // The first traf child box
Trafs []*TrafBox
Pssh *PsshBox
Psshs []*PsshBox
Children []Box
StartPos uint64
}
MoofBox - Movie Fragment Box (moof)
Contains all meta-data. To be able to stream a file, the moov box should be placed before the mdat box.
func (*MoofBox) EncodeSW ¶
func (m *MoofBox) EncodeSW(sw mp4ff.SliceWriter) error
Encode - write moof after updating trun dataoffset
func (*MoofBox) GetChildren ¶
GetChildren - list of child boxes
func (*MoofBox) RemovePsshs ¶
RemovePsshs - remove and return all psshs children boxes
type MoovBox ¶
type MoovBox struct {
Mvhd *MvhdBox
Trak *TrakBox // The first trak box
Traks []*TrakBox
Mvex *MvexBox
Pssh *PsshBox
Psshs []*PsshBox
Children []Box
StartPos uint64
}
MoovBox - Movie Box (moov - mandatory)
Contains all meta-data. To be able to stream a file, the moov box should be placed before the mdat box.
func (*MoovBox) EncodeSW ¶
func (m *MoovBox) EncodeSW(sw mp4ff.SliceWriter) error
Encode - write moov container to sw
func (*MoovBox) GetChildren ¶
GetChildren - list of child boxes
func (*MoovBox) RemovePsshs ¶
RemovePsshs - remove and return all psshs children boxes
type MvexBox ¶
MvexBox - MovieExtendsBox (mevx)
Contained in : Movie Box (moov)
Its presence signals a fragmented asset
func (*MvexBox) EncodeSW ¶
func (m *MvexBox) EncodeSW(sw mp4ff.SliceWriter) error
Encode - write mvex container to sw
func (*MvexBox) GetChildren ¶
GetChildren - list of child boxes
type MvhdBox ¶
type MvhdBox struct {
Version byte
Flags uint32
CreationTime uint64
ModificationTime uint64
Timescale uint32
Duration uint64
NextTrackID uint32
Rate Fixed32
Volume Fixed16
}
MvhdBox - Movie Header Box (mvhd - mandatory)
Contained in : Movie Box (‘moov’)
Contains all media information (duration, ...).
Duration is measured in "time units", and timescale defines the number of time units per second.
func (*MvhdBox) EncodeSW ¶
func (b *MvhdBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type NmhdBox ¶
NmhdBox - Null Media Header Box (nmhd - often used instead of sthd for subtitle tracks)
func (*NmhdBox) EncodeSW ¶
func (b *NmhdBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type Option ¶
type Option func(f *File)
Option is function signature of file options. The design follows functional options pattern.
func WithDecodeMode ¶
func WithDecodeMode(mode DecFileMode) Option
WithDecodeMode sets up DecFileMode
func WithEncodeMode ¶
func WithEncodeMode(mode EncFragFileMode) Option
WithEncodeMode sets up EncFragFileMode
type PaspBox ¶
PaspBox - Pixel Aspect Ratio Box, ISO/IEC 14496-12 2020 Sec. 12.1.4
func (*PaspBox) EncodeSW ¶
func (b *PaspBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type PaylBox ¶
type PaylBox struct {
CueText string
}
PaylBox - CuePayloadBox (payl)
func (*PaylBox) EncodeSW ¶
func (b *PaylBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type PrftBox ¶
PrftBox - Producer Reference Box (prft)
Contained in File before moof box
func CreatePrftBox ¶
CreatePrftBox - Create a new PrftBox
func (*PrftBox) EncodeSW ¶
func (b *PrftBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type PsshBox ¶
PsshBox - Protection System Specific Header Box Defined in ISO/IEC 23001-7 Secion 8.1
func (*PsshBox) EncodeSW ¶
func (b *PsshBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type RapSampleGroupEntry ¶
RapSampleGroupEntry - Random Access Point "rap "
ISO/IEC 14496-12 Ed. 6 2020 Section 10.4 - VisualRandomAccessEntry
func (*RapSampleGroupEntry) Encode ¶
func (s *RapSampleGroupEntry) Encode(sw mp4ff.SliceWriter)
Encode SampleGroupEntry to SliceWriter
func (*RapSampleGroupEntry) Info ¶
func (s *RapSampleGroupEntry) Info(w io.Writer, specificBoxLevels, indent, indentStep string) (err error)
Info - write box info to w
func (*RapSampleGroupEntry) Size ¶
func (s *RapSampleGroupEntry) Size() uint64
Size of sample group entry
func (*RapSampleGroupEntry) Type ¶
func (s *RapSampleGroupEntry) Type() string
Type - GroupingType SampleGroupEntry (uint32 according to spec)
type RollSampleGroupEntry ¶
type RollSampleGroupEntry struct {
RollDistance int16
}
RollSampleGroupEntry - Gradual Decoding Refresh "roll"
ISO/IEC 14496-12 Ed. 6 2020 Section 10.1
VisualRollRecoveryEntry / AudioRollRecoveryEntry / AudioPreRollEntry
func (*RollSampleGroupEntry) Encode ¶
func (s *RollSampleGroupEntry) Encode(sw mp4ff.SliceWriter)
Encode SampleGroupEntry to SliceWriter
func (*RollSampleGroupEntry) Info ¶
func (s *RollSampleGroupEntry) Info(w io.Writer, specificBoxLevels, indent, indentStep string) (err error)
Info - write box info to w
func (*RollSampleGroupEntry) Size ¶
func (s *RollSampleGroupEntry) Size() uint64
Size of sample group entry
func (*RollSampleGroupEntry) Type ¶
func (s *RollSampleGroupEntry) Type() string
Type - GroupingType SampleGroupEntry (uint32 according to spec)
type SaioBox ¶
type SaioBox struct {
Version byte
Flags uint32
AuxInfoType string // Used for Common Encryption Scheme (4-bytes uint32 according to spec)
AuxInfoTypeParameter uint32
Offset []int64
}
SaioBox - Sample Auxiliary Information Offsets Box (saiz) (in stbl or traf box)
func (*SaioBox) EncodeSW ¶
func (b *SaioBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type SaizBox ¶
type SaizBox struct {
Version byte
Flags uint32
AuxInfoType string // Used for Common Encryption Scheme (4-bytes uint32 according to spec)
AuxInfoTypeParameter uint32
SampleCount uint32
SampleInfo []byte
DefaultSampleInfoSize byte
}
SaizBox - Sample Auxiliary Information Sizes Box (saiz) (in stbl or traf box)
func (*SaizBox) EncodeSW ¶
func (b *SaizBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type Sample ¶
type Sample struct {
Flags uint32 // interpreted as SampleFlags
Dur uint32 // Sample duration in mdhd timescale
Size uint32 // Size of sample data
CompositionTimeOffset int32 // Signed composition time offset
}
Sample - sample as used in trun box (mdhd timescale)
type SampleFlags ¶
type SampleFlags struct {
IsLeading byte
SampleDependsOn byte
SampleIsDependedOn byte
SampleHasRedundancy byte
SamplePaddingValue byte
SampleIsNonSync bool
SampleDegradationPriority uint16
}
SampleFlags according to 14496-12 Sec. 8.8.3.1
func DecodeSampleFlags ¶
func DecodeSampleFlags(u uint32) SampleFlags
DecodeSampleFlags - decode a uint32 flags field
func (SampleFlags) Encode ¶
func (sf SampleFlags) Encode() uint32
Encode - convert sampleflags to uint32 bit pattern
func (SampleFlags) String ¶
func (sf SampleFlags) String() string
type SampleGroupEntry ¶
type SampleGroupEntry interface {
// Type - GroupingType SampleGroupEntry (uint32 according to spec)
Type() string // actually
// Size of SampleGroup Entry
Size() uint64
// Encode SampleGroupEntry to SliceWriter
Encode(sw mp4ff.SliceWriter)
// Info - description of content.
Info(w io.Writer, specificBoxLevels, indent, indentStep string) (err error)
}
SampleGroupEntry - like a box, but size and type are not in a header
func DecodeAlstSampleGroupEntry ¶
func DecodeAlstSampleGroupEntry(name string, length uint32, sr mp4ff.SliceReader) (SampleGroupEntry, error)
DecodeAlstSampleGroupEntry - decode ALST Sample Group Entry
func DecodeRapSampleGroupEntry ¶
func DecodeRapSampleGroupEntry(name string, length uint32, sr mp4ff.SliceReader) (SampleGroupEntry, error)
DecodeRapSampleGroupEntry - decode Rap Sample Sample Group Entry
func DecodeRollSampleGroupEntry ¶
func DecodeRollSampleGroupEntry(name string, length uint32, sr mp4ff.SliceReader) (SampleGroupEntry, error)
DecodeRollSampleGroupEntry - decode Roll Sample Group Entry
func DecodeSeigSampleGroupEntry ¶
func DecodeSeigSampleGroupEntry(name string, length uint32, sr mp4ff.SliceReader) (SampleGroupEntry, error)
DecodeSeigSampleGroupEntry - decode Common Encryption Sample Group Entry
func DecodeUnknownSampleGroupEntry ¶
func DecodeUnknownSampleGroupEntry(name string, length uint32, sr mp4ff.SliceReader) (SampleGroupEntry, error)
DecodeUnknownSampleGroupEntry - decode an unknown sample group entry
type SampleGroupEntryDecoder ¶
type SampleGroupEntryDecoder func(name string, length uint32, sr mp4ff.SliceReader) (SampleGroupEntry, error)
SampleGroupEntryDecoder is function signature of the SampleGroupEntry Decode method
type SampleInterval ¶
type SampleInterval struct {
FirstDecodeTime uint64
Samples []Sample
OffsetInMdat uint32 // Offset relative start of mdat box
Size uint32 // total size of all samples in interval
Data []byte // If set, should be relevant mdat range
}
SampleInterval - an interval of samples including reference to or concatenated binary media data
type SbgpBox ¶
type SbgpBox struct {
Version byte
Flags uint32
GroupingType string // uint32, but takes values such as seig
GroupingTypeParameter uint32
SampleCounts []uint32
GroupDescriptionIndices []uint32 // Starts at 65537 inside fragment, see Section 8.9.4
}
SbgpBox - Sample To Group Box, ISO/IEC 14496-12 6'th edition 2020 Section 8.9.2
func (*SbgpBox) EncodeSW ¶
func (b *SbgpBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type SchiBox ¶
SchiBox - Schema Information Box
func (*SchiBox) EncodeSW ¶
func (b *SchiBox) EncodeSW(sw mp4ff.SliceWriter) error
Encode - write minf container to sw
func (*SchiBox) GetChildren ¶
GetChildren - list of child boxes
type SchmBox ¶
type SchmBox struct {
Version byte
Flags uint32
SchemeType string // 4CC represented as uint32
SchemeVersion uint32
SchemeURI string // Absolute null-terminated URL
}
SchmBox - Scheme Type Box
func (*SchmBox) EncodeSW ¶
func (b *SchmBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type SdtpBox ¶
SdtpBox - Sample Dependency Box (sdtp - optional)
ISO/IEC 14496-12 Ed. 6 2020 Section 8.6.4 Contained in Sample Table Box (stbl)
Table to determine whether a sample depends or is depended on by other samples
func CreateSdtpBox ¶
CreateSdtpBox - create a new SdtpBox
func (*SdtpBox) EncodeSW ¶
func (b *SdtpBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type SdtpEntry ¶
type SdtpEntry uint8
SdtpEntry (uint8)
ISO/IEC 14496-12 Ed. 6 2020 Section 8.6.4.2
func NewSdtpEntry ¶
NewSdtpEntry - make new SdtpEntry from 2-bit parameters
func (SdtpEntry) IsLeading ¶
IsLeading (bits 0-1) 0: Leading unknown 1: Has dependency before referenced I-picture (not decodable) 2: Not a leading sample 3: Has no dependency before referenced I-picture (decodable)
func (SdtpEntry) SampleDependsOn ¶
SampleDependsOn (bits 2-3) 0: Dependency is unknown 1: Depends on others (not an I-picture) 2: Does not depend on others (I-picture) 3: Reservced
func (SdtpEntry) SampleHasRedundancy ¶
SampleHasRedundancy (bits 6-7) 0: Redundant coding unknown 1: Redundant coding in this sample 2: No redundant coding in this sample 3: Reserved
func (SdtpEntry) SampleIsDependedOn ¶
SampleIsDependedOn (bits 4-5) 0: Dependency unknown 1: Other samples may depend on this (not disposable) 2: No other samples depend on this (disposable) 3: Reserved
type SeigSampleGroupEntry ¶
type SeigSampleGroupEntry struct {
CryptByteBlock byte
SkipByteBlock byte
IsProtected byte
PerSampleIVSize byte
KID UUID
// ConstantIVSize byte given by len(ConstantIV)
ConstantIV []byte
}
SeigSampleGroupEntry - CencSampleEncryptionInformationGroupEntry as defined in CEF ISO/IEC 23001-7 3rd edition 2016
func (*SeigSampleGroupEntry) ConstantIVSize ¶
func (s *SeigSampleGroupEntry) ConstantIVSize() byte
ConstantIVSize - non-zero if protected and perSampleIVSize == 0
func (*SeigSampleGroupEntry) Encode ¶
func (s *SeigSampleGroupEntry) Encode(sw mp4ff.SliceWriter)
Encode SampleGroupEntry to SliceWriter
func (*SeigSampleGroupEntry) Info ¶
func (s *SeigSampleGroupEntry) Info(w io.Writer, specificBoxLevels, indent, indentStep string) (err error)
Info - write box info to w
func (*SeigSampleGroupEntry) Size ¶
func (s *SeigSampleGroupEntry) Size() uint64
Size of SampleGroup Entry
func (*SeigSampleGroupEntry) Type ¶
func (s *SeigSampleGroupEntry) Type() string
Type - GroupingType SampleGroupEntry (uint32 according to spec)
type SencBox ¶
type SencBox struct {
Version byte
Flags uint32
SampleCount uint32
StartPos uint64
IVs []InitializationVector // 8 or 16 bytes if present
SubSamples [][]SubSamplePattern
// contains filtered or unexported fields
}
SencBox - Sample Encryption Box (senc) (in trak or traf box) Should only be decoded after saio and saiz provide relevant offset and sizes Here we make a two-step decode, with first step reading, and other parsing. See ISO/IEC 23001-7 Section 7.2 and CMAF specification Full Box + SampleCount
func (*SencBox) AddSample ¶
func (s *SencBox) AddSample(sample SencSample) error
AddSample - add a senc sample with possible IV and subsamples
func (*SencBox) EncodeSW ¶
func (s *SencBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
func (*SencBox) GetPerSampleIVSize ¶
GetPerSampleIVSize - return perSampleIVSize
func (*SencBox) ParseReadBox ¶
ParseReadBox - second phase when perSampleIVSize should be known from tenc or sgpd boxes if perSampleIVSize is 0, we try to find the appropriate error given data length
type SencSample ¶
type SencSample struct {
IV InitializationVector // 0,8,16 byte length
SubSamples []SubSamplePattern
}
SencSample - sample in SencBox
type SgpdBox ¶
type SgpdBox struct {
Version byte
Flags uint32
GroupingType string // uint32, but takes values such as seig
DefaultLength uint32
DefaultGroupDescriptionIndex uint32
DescriptionLengths []uint32
SampleGroupEntries []SampleGroupEntry
}
SgpdBox - Sample Group Description Box, ISO/IEC 14496-12 6'th edition 2020 Section 8.9.3 Version 0 is deprecated
func (*SgpdBox) EncodeSW ¶
func (b *SgpdBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type SidxBox ¶
type SidxBox struct {
Version byte
Flags uint32
ReferenceID uint32
Timescale uint32
EarliestPresentationTime uint64
FirstOffset uint64
SidxRefs []SidxRef
}
SidxBox - SegmentIndexBox
func CreateSidx ¶
CreateSidx - Create a new TfdtBox with baseMediaDecodeTime
func (*SidxBox) EncodeSW ¶
func (b *SidxBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type SidxRef ¶
type SidxRef struct {
ReferencedSize uint32
SubSegmentDuration uint32
SAPDeltaTime uint32
ReferenceType uint8 // 1-bit
StartsWithSAP uint8 // 1-bit
SAPType uint8
}
SidxRef - reference as used inside SidxBox
type SinfBox ¶
type SinfBox struct {
Frma *FrmaBox // Mandatory
Schm *SchmBox // Optional
Schi *SchiBox // Optional
Children []Box
}
SinfBox - Protection Scheme Information Box according to ISO/IEC 23001-7
func (*SinfBox) EncodeSW ¶
func (b *SinfBox) EncodeSW(sw mp4ff.SliceWriter) error
Encode - write minf container to sw
func (*SinfBox) GetChildren ¶
GetChildren - list of child boxes
type SmhdBox ¶
SmhdBox - Sound Media Header Box (smhd - mandatory for sound tracks)
Contained in : Media Information Box (minf)
func CreateSmhd ¶
func CreateSmhd() *SmhdBox
CreateSmhd - Create Sound Media Header Box (all is zero)
func (*SmhdBox) EncodeSW ¶
func (b *SmhdBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type StblBox ¶
type StblBox struct {
// Same order as in Table 1 in ISO/IEC 14496-12 Ed.6 2020
Stsd *StsdBox
Stts *SttsBox
Ctts *CttsBox
Stsc *StscBox
Stsz *StszBox
Stss *StssBox
Stco *StcoBox
Co64 *Co64Box
Sdtp *SdtpBox
Sbgp *SbgpBox // The first
Sbgps []*SbgpBox // All
Sgpd *SgpdBox // The first
Sgpds []*SgpdBox // All
Subs *SubsBox
Saio *SaioBox
Saiz *SaizBox
Children []Box
}
StblBox - Sample Table Box (stbl - mandatory)
Contained in : Media Information Box (minf)
The table contains all information relevant to data samples (times, chunks, sizes, ...)
func (*StblBox) EncodeSW ¶
func (b *StblBox) EncodeSW(sw mp4ff.SliceWriter) error
Encode - write stbl container to sw
func (*StblBox) GetChildren ¶
GetChildren - list of child boxes
type StcoBox ¶
StcoBox - Chunk Offset Box (stco - mandatory)
Contained in : Sample Table box (stbl)
The table contains the offsets (starting at the beginning of the file) for each chunk of data for the current track. A chunk contains samples, the table defining the allocation of samples to each chunk is stsc.
func (*StcoBox) EncodeSW ¶
func (b *StcoBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type SthdBox ¶
SthdBox - Subtitle Media Header Box (sthd - for subtitle tracks)
func (*SthdBox) EncodeSW ¶
func (b *SthdBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type StppBox ¶
type StppBox struct {
Namespace string // Mandatory
SchemaLocation string // Optional
AuxiliaryMimeTypes string // Required if auxiliary types present
Btrt *BtrtBox // Optional
Children []Box
DataReferenceIndex uint16
}
StppBox - XMLSubtitleSampleEntryr Box (stpp)
Contained in : Media Information Box (minf)
func NewStppBox ¶
NewStppBox - Create new stpp box namespace, schemaLocation and auxiliaryMimeType are space-separated utf8-lists without zero-termination schemaLocation and auxiliaryMimeTypes are optional
func (*StppBox) AddChild ¶
AddChild - add a child box (avcC normally, but clap and pasp could be part of visual entry)
func (*StppBox) EncodeSW ¶
func (b *StppBox) EncodeSW(sw mp4ff.SliceWriter) error
Encode - write box to w
type StscBox ¶
type StscBox struct {
Version byte
Flags uint32
FirstChunk []uint32
SamplesPerChunk []uint32
SampleDescriptionID []uint32
// contains filtered or unexported fields
}
StscBox - Sample To Chunk Box (stsc - mandatory)
A chunk contains samples. This table defines to which chunk a sample is associated. Each entry is defined by :
- first chunk : all chunks starting at this index up to the next first chunk have the same sample count/description
- samples per chunk : number of samples in the chunk
- sample description id : description (see the sample description box - stsd) this value is most often the same for all samples, so it is stored as a single value if possible
func (*StscBox) ChunkNrFromSampleNr ¶
ChunkNrFromSampleNr - get chunk number from sampleNr (one-based)
func (*StscBox) EncodeSW ¶
func (b *StscBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
func (*StscBox) GetContainingChunks ¶
GetContainingChunks - get chunks containing the sample interval
func (*StscBox) GetSampleDescriptionID ¶
GetSampleDescriptionID - get the sample description ID from common or individual values
func (*StscBox) SetSingleSampleDescriptionID ¶
SetSingleSampleDescriptionID - use this for efficiency if all samples have same sample description
type StsdBox ¶
type StsdBox struct {
Version byte
Flags uint32
SampleCount uint32
AvcX *VisualSampleEntryBox
HvcX *VisualSampleEntryBox
Mp4a *AudioSampleEntryBox
AC3 *AudioSampleEntryBox
EC3 *AudioSampleEntryBox
Wvtt *WvttBox
Children []Box
}
StsdBox - Sample Description Box (stsd - manatory) See ISO/IEC 14496-12 Section 8.5.2.2 Full Box + SampleCount All Children are sampleEntries
func (*StsdBox) EncodeSW ¶
func (s *StsdBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode of stsd - not a usual container
func (*StsdBox) GetSampleDescription ¶
GetSampleDescription - get one of multiple descriptions
func (*StsdBox) ReplaceChild ¶
ReplaceChild - Replace a child box with one of the same type
type StssBox ¶
StssBox - Sync Sample Box (stss - optional)
Contained in : Sample Table box (stbl)
This lists all sync samples (key frames for video tracks) in the data. If absent, all samples are sync samples.
func (*StssBox) EncodeSW ¶
func (b *StssBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
func (*StssBox) EntryCount ¶
EntryCount - number of sync samples
func (*StssBox) IsSyncSample ¶
IsSyncSample - check if sample (one-based) sampleNr is a sync sample
type StszBox ¶
type StszBox struct {
Version byte
Flags uint32
SampleUniformSize uint32
SampleNumber uint32
SampleSize []uint32
}
StszBox - Sample Size Box (stsz - mandatory)
Contained in : Sample Table box (stbl)
For each track, either stsz of the more compact stz2 must be present. stz2 variant is not supported.
This table lists the size of each sample. If all samples have the same size, it can be defined in the SampleUniformSize attribute.
func (*StszBox) EncodeSW ¶
func (b *StszBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
func (*StszBox) GetNrSamples ¶
GetNrSamples - get number of sampples
func (*StszBox) GetSampleSize ¶
GetSampleSize returns the size (in bytes) of a sample
func (*StszBox) GetTotalSampleSize ¶
GetTotalSampleSize - get total size of a range [startNr, endNr] of samples
type SttgBox ¶
type SttgBox struct {
Settings string
}
SttgBox - CueSettingsBox (sttg)
func (*SttgBox) EncodeSW ¶
func (b *SttgBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type SttsBox ¶
SttsBox - Decoding Time to Sample Box (stts - mandatory)
This table contains the duration in time units for each sample.
- SampleCount : the number of consecutive samples having the same duration
- SampleTimeDelta : duration in time units
func (*SttsBox) EncodeSW ¶
func (b *SttsBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
func (*SttsBox) GetDecodeTime ¶
GetDecodeTime - decode time and duration for (one-based) sampleNr in track timescale
func (*SttsBox) GetSampleNrAtTime ¶
GetSampleNrAtTime - get sample number at or as soon as possible after time Time is calculated by summing up durations of previous samples
func (*SttsBox) GetTimeCode ¶
GetTimeCode - return the timecode (duration since the beginning of the media) of the beginning of a sample
type StypBox ¶
type StypBox struct {
// contains filtered or unexported fields
}
StypBox - Segment Type Box (styp)
func (*StypBox) CompatibleBrands ¶
CompatibleBrands - slice of compatible brands (4 chars each)
func (*StypBox) EncodeSW ¶
func (b *StypBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
func (*StypBox) MajorBrand ¶
MajorBrand - major brand (4 chars)
type SubSamplePattern ¶
SubSamplePattern - pattern of subsample encryption
type SubsBox ¶
SubsBox - SubSampleInformationBox
func (*SubsBox) EncodeSW ¶
func (b *SubsBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type SubsEntry ¶
type SubsEntry struct {
SampleDelta uint32
SubSamples []SubsSample
}
SubsEntry - entry in SubsBox
type SubsSample ¶
type SubsSample struct {
SubsampleSize uint32
CodecSpecificParameters uint32
SubsamplePriority uint8
Discardable uint8
}
SubsSample - sample in SubsEntry
type TencBox ¶
type TencBox struct {
Version byte
Flags uint32
DefaultCryptByteBlock byte
DefaultSkipByteBlock byte
DefaultIsProtected byte
DefaultPerSampleIVSize byte
DefaultKID UUID
// DefaultConstantIVSize byte given by len(DefaultConstantIV)
DefaultConstantIV []byte
}
TencBox - Track Encryption Box Defined in ISO/IEC 23001-7 Secion 8.2
func (*TencBox) EncodeSW ¶
func (b *TencBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type TfdtBox ¶
TfdtBox - Track Fragment Decode Time (tfdt)
Contained in : Track Fragment box (traf)
func CreateTfdt ¶
CreateTfdt - Create a new TfdtBox with baseMediaDecodeTime
func (*TfdtBox) EncodeSW ¶
func (t *TfdtBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
func (*TfdtBox) SetBaseMediaDecodeTime ¶
SetBaseMediaDecodeTime - Set time of TfdtBox
type TfhdBox ¶
type TfhdBox struct {
Version byte
Flags uint32
TrackID uint32
BaseDataOffset uint64
SampleDescriptionIndex uint32
DefaultSampleDuration uint32
DefaultSampleSize uint32
DefaultSampleFlags uint32
}
TfhdBox - Track Fragment Header Box (tfhd)
Contained in : Track Fragment box (traf))
func CreateTfhd ¶
CreateTfhd - Create a new TfdtBox with baseMediaDecodeTime
func (*TfhdBox) DefaultBaseIfMoof ¶
DefaultBaseIfMoof - interpreted flags value
func (*TfhdBox) DurationIsEmpty ¶
DurationIsEmpty - interpreted flags value
func (*TfhdBox) EncodeSW ¶
func (t *TfhdBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
func (*TfhdBox) HasBaseDataOffset ¶
HasBaseDataOffset - interpreted flags value
func (*TfhdBox) HasDefaultSampleDuration ¶
HasDefaultSampleDuration - interpreted flags value
func (*TfhdBox) HasDefaultSampleFlags ¶
HasDefaultSampleFlags - interpreted flags value
func (*TfhdBox) HasDefaultSampleSize ¶
HasDefaultSampleSize - interpreted flags value
func (*TfhdBox) HasSampleDescriptionIndex ¶
HasSampleDescriptionIndex - interpreted flags value
type TfraBox ¶
type TfraBox struct {
Version byte
Flags uint32
TrackID uint32
LengthSizeOfTrafNum byte
LengthSizeOfTrunNum byte
LengthSizeOfSampleNum byte
Entries []TfraEntry
}
TfraBox - Track Fragment Random Access Box (tfra) Contained it MfraBox (mfra)
func (*TfraBox) EncodeSW ¶
func (b *TfraBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type TfraEntry ¶
type TfraEntry struct {
Time int64
MoofOffset int64
TrafNumber uint32
TrunNumber uint32
SampleDelta uint32
}
TfraEntry - reference as used inside TfraBox
type TfrfData ¶
type TfrfData struct {
Version byte
Flags uint32
FragmentCount byte
FragmentAbsoluteTimes []uint64
FragmentAbsoluteDurations []uint64
}
TfrfData - MSS TfrfBox data after UUID part Defined in MSS-SSTR v20180912 section 2.2.4.5
type TfxdData ¶
type TfxdData struct {
Version byte
Flags uint32
FragmentAbsoluteTime uint64
FragmentAbsoluteDuration uint64
}
TfxdData - MSS TfxdBox data after UUID part Defined in MSS-SSTR v20180912 section 2.2.4.4
type TkhdBox ¶
type TkhdBox struct {
Version byte
Flags uint32
CreationTime uint64
ModificationTime uint64
TrackID uint32
Duration uint64
Layer int16
AlternateGroup int16 // should be int16
Volume Fixed16
Width, Height Fixed32
}
TkhdBox - Track Header Box (tkhd - mandatory)
This box describes the track. Duration is measured in time units (according to the time scale defined in the movie header box). Duration is 0 for fragmented files.
Volume (relevant for audio tracks) is a fixed point number (8 bits + 8 bits). Full volume is 1.0. Width and Height (relevant for video tracks) are fixed point numbers (16 bits + 16 bits). Video pixels are not necessarily square.
func (*TkhdBox) EncodeSW ¶
func (b *TkhdBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type TopBoxInfo ¶
type TopBoxInfo struct {
// Type - box type
Type string
// Size - box size
Size uint64
// StartPos - where in file does box start
StartPos uint64
}
TopBoxInfo - information about a top-level box
func GetTopBoxInfoList ¶
func GetTopBoxInfoList(rs io.ReadSeeker, stopBoxType string) ([]TopBoxInfo, error)
GetTopBoxInfoList - get top boxes until stopBoxType or end of file
type TrafBox ¶
type TrafBox struct {
Tfhd *TfhdBox
Tfdt *TfdtBox
Saiz *SaizBox
Saio *SaioBox
Sbgp *SbgpBox
Sgpd *SgpdBox
Senc *SencBox
Trun *TrunBox // The first TrunBox
Truns []*TrunBox
Children []Box
}
TrafBox - Track Fragment Box (traf)
Contained in : Movie Fragment Box (moof)
func (*TrafBox) ContainsSencBox ¶
ContainsSencBox - is there a senc box in traf and is it parsed If not parsed, call ParseReadSenc to parse it
func (*TrafBox) EncodeSW ¶
func (b *TrafBox) EncodeSW(sw mp4ff.SliceWriter) error
Encode - write minf container to sw
func (*TrafBox) GetChildren ¶
GetChildren - list of child boxes
func (*TrafBox) OptimizeTfhdTrun ¶
OptimizeTfhdTrun - optimize trun by default values in tfhd box Only look at first trun, even if there is more than one Don't optimize again, if already done so that no data is present
func (*TrafBox) ParseReadSenc ¶
func (*TrafBox) RemoveEncryptionBoxes ¶
RemoveEncryptionBoxes - remove encryption boxes and return number of bytes removed
type TrakBox ¶
TrakBox - Track Box (tkhd - mandatory)
Contained in : Movie Box (moov)
A media file can contain one or more tracks.
func CreateEmptyTrak ¶
CreateEmptyTrak - create a full trak-tree for an empty (fragmented) track with no samples or stsd content
func (*TrakBox) EncodeSW ¶
func (b *TrakBox) EncodeSW(sw mp4ff.SliceWriter) error
Encode - write trak container to sw
func (*TrakBox) GetChildren ¶
GetChildren - list of child boxes
func (*TrakBox) GetNrSamples ¶
GetNrSamples - get number of samples for this track defined in the parent moov box.
func (*TrakBox) GetRangesForSampleInterval ¶
func (t *TrakBox) GetRangesForSampleInterval(startSampleNr, endSampleNr uint32) ([]DataRange, error)
GetRangesForSampleInterval - get ranges inside file for sample range [startSampleNr, endSampleNr]
func (*TrakBox) GetSampleData ¶
GetSampleData - get sample metadata for a specific interval of samples defined in moov. If going outside the range of available samples, an error is returned.
func (*TrakBox) SetAC3Descriptor ¶
SetAC3Descriptor - Modify a TrakBox by adding AC-3 SampleDescriptor
func (*TrakBox) SetEC3Descriptor ¶
SetEC3Descriptor - Modify a TrakBox by adding EC-3 SampleDescriptor
func (*TrakBox) SetStppDescriptor ¶
SetStppDescriptor - add stpp box with utf8-lists namespace, schemaLocation and auxiliaryMimeType The utf8-lists have space-separated items, but no zero-termination
func (*TrakBox) SetWvttDescriptor ¶
SetWvttDescriptor - Set wvtt descriptor with a vttC box. config should start with WEBVTT or be empty.
type TrefBox ¶
type TrefBox struct {
Children []Box
}
TrefBox - // TrackReferenceBox - ISO/IEC 14496-12 Ed. 9 Sec. 8.3
func (*TrefBox) EncodeSW ¶
func (b *TrefBox) EncodeSW(sw mp4ff.SliceWriter) error
Encode - write minf container to sw
func (*TrefBox) GetChildren ¶
GetChildren - list of child boxes
type TrefTypeBox ¶
TrefTypeBox - TrackReferenceTypeBox - ISO/IEC 14496-12 Ed. 9 Sec. 8.3 Name can be one of hint, cdsc, font, hind, vdep, vplx, subt (ISO/IEC 14496-12) dpnd, ipir, mpod, sync (ISO/IEC 14496-14)
func (*TrefTypeBox) Encode ¶
func (t *TrefTypeBox) Encode(w io.Writer) error
Encode - write box to w
func (*TrefTypeBox) EncodeSW ¶
func (b *TrefTypeBox) EncodeSW(sw mp4ff.SliceWriter) error
Encode - write box to sw
type TrepBox ¶
TrepBox - Track Extension Properties Box (trep) Contained in mvex
func (*TrepBox) EncodeSW ¶
func (b *TrepBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW- box-specific encode of stsd - not a usual container
type TrexBox ¶
type TrexBox struct {
Version byte
Flags uint32
TrackID uint32
DefaultSampleDescriptionIndex uint32
DefaultSampleDuration uint32
DefaultSampleSize uint32
DefaultSampleFlags uint32
}
TrexBox - Track Extends Box
Contained in : Mvex Box (mvex)
func CreateTrex ¶
CreateTrex - create trex box with trackID
func (*TrexBox) EncodeSW ¶
func (b *TrexBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type TrunBox ¶
type TrunBox struct {
Version byte
Flags uint32
DataOffset int32
Samples []Sample
// contains filtered or unexported fields
}
TrunBox - Track Fragment Run Box (trun)
Contained in : Track Fragmnet Box (traf)
func CreateTrun ¶
CreateTrun - create a TrunBox for filling up with samples
func (*TrunBox) AddFullSample ¶
func (t *TrunBox) AddFullSample(s *FullSample)
AddFullSample - add Sample part of FullSample
func (*TrunBox) AddSampleDefaultValues ¶
AddSampleDefaultValues - add values from tfhd and trex boxes if needed Return total duration
func (*TrunBox) AddSamples ¶
AddSamples - add a a slice of Sample
func (*TrunBox) Duration ¶
Duration - calculate total duration of all samples given defaultSampleDuration
func (*TrunBox) EncodeSW ¶
func (t *TrunBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
func (*TrunBox) FirstSampleFlags ¶
FirstSampleFlags - return firstSampleFlags and indicator if present
func (*TrunBox) GetFullSamples ¶
func (t *TrunBox) GetFullSamples(offsetInMdat uint32, baseDecodeTime uint64, mdat *MdatBox) []FullSample
GetFullSamples - get all sample data including accumulated time and binary media data offsetInMdat is offset in mdat data (data normally starts 8 or 16 bytes after start of mdat box) baseDecodeTime is decodeTime in tfdt in track timescale (timescale in mfhd) To fill missing individual values from tfhd and trex defaults, call trun.AddSampleDefaultValues() before this call
func (*TrunBox) GetSampleInterval ¶
func (t *TrunBox) GetSampleInterval(startSampleNr, endSampleNr uint32, baseDecodeTime uint64, mdat *MdatBox, offsetInMdat uint32) (SampleInterval, error)
GetSampleInterval - get sample interval [startSampleNr, endSampleNr] (1-based and inclusive) This includes mdat data (if not lazy), in which case only offsetInMdat is given. baseDecodeTime is decodeTime in tfdt in track timescale (timescale from mfhd). To fill missing individual values from tfhd and trex defaults, call AddSampleDefaultValues() before this call.
func (*TrunBox) GetSampleNrForRelativeTime ¶
func (t *TrunBox) GetSampleNrForRelativeTime(deltaTime uint64, defaultSampleDuration uint32) (uint32, error)
GetSampleNrForRelativeTime - get sample number for exact relative time (calculated from summing durations)
func (*TrunBox) GetSampleRange ¶
GetSampleRange - get a one-based range of samples To fill missing individual values from tfhd and trex defaults, call AddSampleDefaultValues() before this call
func (*TrunBox) GetSamples ¶
GetSamples - get all trun sample data To fill missing individual values from tfhd and trex defaults, call AddSampleDefaultValues() before this call
func (*TrunBox) HasDataOffset ¶
HasDataOffset - interpreted dataOffsetPresent flag
func (*TrunBox) HasFirstSampleFlags ¶
HasFirstSampleFlags - interpreted firstSampleFlagsPresent flag
func (*TrunBox) HasSampleCompositionTimeOffset ¶
HasSampleCompositionTimeOffset - interpreted sampleCompositionTimeOffset flag
func (*TrunBox) HasSampleDuration ¶
HasSampleDuration - interpreted sampleDurationPresent flag
func (*TrunBox) HasSampleFlags ¶
HasSampleFlags - interpreted sampleFlagsPresent flag
func (*TrunBox) HasSampleSize ¶
HasSampleSize - interpreted sampleSizePresent flag
func (*TrunBox) RemoveFirstSampleFlags ¶
func (t *TrunBox) RemoveFirstSampleFlags()
RemoveFirstSampleFlags - remove firstSampleFlags and its indicator
func (*TrunBox) SampleCount ¶
SampleCount - return how many samples are defined
func (*TrunBox) SetFirstSampleFlags ¶
SetFirstSampleFlags - set firstSampleFlags and bit indicating its presence
func (*TrunBox) SizeOfData ¶
SizeOfData - size of mediasamples in bytes
type URLBox ¶
URLBox - DataEntryUrlBox ('url ')
Contained in : DrefBox (dref
func (*URLBox) EncodeSW ¶
func (b *URLBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type UUIDBox ¶
type UUIDBox struct {
PIFF PiffData
SubType string
Tfrf *TfrfData
Tfxd *TfxdData
UUID string // 16 bytes
}
UUIDBox - Used as container for MSS boxes tfxd and tfrf
func (*UUIDBox) EncodeSW ¶
func (b *UUIDBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type UdtaBox ¶
type UdtaBox struct {
Children []Box
}
UdtaBox - User Data Box is a container for User Data
Contained in : moov, trak, moof, or traf
func (*UdtaBox) EncodeSW ¶
func (b *UdtaBox) EncodeSW(sw mp4ff.SliceWriter) error
Encode - write udta container to sw
func (*UdtaBox) GetChildren ¶
GetChildren - list of child boxes
type UnknownBox ¶
type UnknownBox struct {
// contains filtered or unexported fields
}
UnknownBox - box that we don't know how to parse
func (*UnknownBox) EncodeSW ¶
func (b *UnknownBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type UnknownSampleGroupEntry ¶
UnknownSampleGroupEntry - unknown or not implemented SampleGroupEntry
func (*UnknownSampleGroupEntry) Encode ¶
func (s *UnknownSampleGroupEntry) Encode(sw mp4ff.SliceWriter)
Encode SampleGroupEntry to SliceWriter
func (*UnknownSampleGroupEntry) Info ¶
func (s *UnknownSampleGroupEntry) Info(w io.Writer, specificBoxLevels, indent, indentStep string) (err error)
Info - write box info to w
func (*UnknownSampleGroupEntry) Size ¶
func (s *UnknownSampleGroupEntry) Size() uint64
Size of SampleGroup Entry
func (*UnknownSampleGroupEntry) Type ¶
func (s *UnknownSampleGroupEntry) Type() string
Type - GroupingType SampleGroupEntry (uint32 according to spec)
type VisualSampleEntryBox ¶
type VisualSampleEntryBox struct {
DataReferenceIndex uint16
Width uint16
Height uint16
Horizresolution uint32
Vertresolution uint32
FrameCount uint16
CompressorName string
Btrt *BtrtBox
Clap *ClapBox
Pasp *PaspBox
Sinf *SinfBox
Children []Box
// contains filtered or unexported fields
}
VisualSampleEntryBox - Video Sample Description box (avc1/avc3)
func CreateVisualSampleEntryBox ¶
func CreateVisualSampleEntryBox(name string, width, height uint16, sampleEntry Box) *VisualSampleEntryBox
CreateVisualSampleEntryBox - Create new VisualSampleEntry such as avc1, avc3, hev1, hvc1
func NewVisualSampleEntryBox ¶
func NewVisualSampleEntryBox(name string) *VisualSampleEntryBox
NewVisualSampleEntryBox - Create new empty avc1 or avc3 box
func (*VisualSampleEntryBox) AddChild ¶
func (b *VisualSampleEntryBox) AddChild(child Box)
AddChild - add a child box (avcC normally, but clap and pasp could be part of visual entry)
func (*VisualSampleEntryBox) Encode ¶
func (b *VisualSampleEntryBox) Encode(w io.Writer) error
Encode - write box to w
func (*VisualSampleEntryBox) EncodeSW ¶
func (b *VisualSampleEntryBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - write box to sw
func (*VisualSampleEntryBox) Info ¶
func (b *VisualSampleEntryBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error
Info - write specific box information
func (*VisualSampleEntryBox) RemoveEncryption ¶
func (b *VisualSampleEntryBox) RemoveEncryption() (*SinfBox, error)
RemoveEncryption - remove sinf box and set type to unencrypted type
func (*VisualSampleEntryBox) SetType ¶
func (b *VisualSampleEntryBox) SetType(name string)
SetType - set the type (name) of the box
func (*VisualSampleEntryBox) Size ¶
func (b *VisualSampleEntryBox) Size() uint64
Size - return calculated size
func (*VisualSampleEntryBox) Type ¶
func (b *VisualSampleEntryBox) Type() string
Type - return box type
type VlabBox ¶
type VlabBox struct {
SourceLabel string
}
VlabBox - WebVTTSourceLabelBox (vlab)
func (*VlabBox) EncodeSW ¶
func (b *VlabBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type VmhdBox ¶
VmhdBox - Video Media Header Box (vhmd - mandatory for video tracks)
Contained in : Media Information Box (minf)
func (*VmhdBox) EncodeSW ¶
func (b *VmhdBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type VsidBox ¶
type VsidBox struct {
SourceID uint32
}
VsidBox - CueSourceIDBox (vsid)
func (*VsidBox) EncodeSW ¶
func (b *VsidBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type VttCBox ¶
type VttCBox struct {
Config string
}
VttCBox - WebVTTConfigurationBox (vttC)
func (*VttCBox) EncodeSW ¶
func (b *VttCBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type VttaBox ¶
type VttaBox struct {
CueAdditionalText string
}
VttaBox - VTTAdditionalTextBox (vtta) (corresponds to NOTE in WebVTT)
func (*VttaBox) EncodeSW ¶
func (b *VttaBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type VttcBox ¶
type VttcBox struct {
Vsid *VsidBox
Iden *IdenBox
Ctim *CtimBox
Sttg *SttgBox
Payl *PaylBox
Children []Box
}
VttcBox - VTTCueBox (vttc)
func (*VttcBox) EncodeSW ¶
func (b *VttcBox) EncodeSW(sw mp4ff.SliceWriter) error
Encode - write vttc container to sw
func (*VttcBox) GetChildren ¶
GetChildren - list of child boxes
type VtteBox ¶
type VtteBox struct {
}
VtteBox - VTTEmptyBox (vtte)
func (*VtteBox) EncodeSW ¶
func (b *VtteBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - box-specific encode to slicewriter
type WvttBox ¶
type WvttBox struct {
VttC *VttCBox
Vlab *VlabBox
Btrt *BtrtBox
Children []Box
DataReferenceIndex uint16
}
WvttBox - WVTTSampleEntry (wvtt) Extends PlainTextSampleEntry which extends SampleEntry
func (*WvttBox) EncodeSW ¶
func (b *WvttBox) EncodeSW(sw mp4ff.SliceWriter) error
EncodeSW - write box to w
Source Files
¶
- audiosamplentry.go
- box.go
- boxsr.go
- btrt.go
- clap.go
- co64.go
- container.go
- cslg.go
- ctts.go
- dac3.go
- dec3.go
- dref.go
- elst.go
- emsg.go
- esds.go
- ffmpeg.go
- file.go
- fragment.go
- free.go
- ftyp.go
- hdlr.go
- ilst.go
- initsegment.go
- mdat.go
- mdhd.go
- mediasegment.go
- mehd.go
- meta.go
- mfra.go
- mfro.go
- minf.go
- moof.go
- moov.go
- mvex.go
- mvhd.go
- nmhd.go
- pasp.go
- prft.go
- pssh.go
- saio.go
- saiz.go
- sample.go
- sampleflags.go
- samplegroupentries.go
- sbgp.go
- sdtp.go
- senc.go
- sgpd.go
- sidx.go
- smhd.go
- stbl.go
- stco.go
- sthd.go
- stpp.go
- stsc.go
- stsd.go
- stss.go
- stsz.go
- stts.go
- styp.go
- subs.go
- tenc.go
- tfdt.go
- tfhd.go
- tfra.go
- tkhd.go
- topboxinfo.go
- traf.go
- trak.go
- tref.go
- trep.go
- trex.go
- trun.go
- url.go
- uuid.go
- visualsampleentry.go
- wvtt.go