Documentation ¶
Overview ¶
Package fmp4 contains a fMP4 reader and writer.
Index ¶
- func BoxTypeIpcm() gomp4.BoxType
- func BoxTypePcmC() gomp4.BoxType
- type Codec
- type CodecAC3
- type CodecAV1
- type CodecH264
- type CodecH265
- type CodecLPCM
- type CodecMJPEG
- type CodecMPEG1Audio
- type CodecMPEG1Video
- type CodecMPEG4Audio
- type CodecMPEG4Video
- type CodecOpus
- type CodecVP9
- type Init
- type InitTrack
- type Part
- type PartSample
- type PartTrack
- type Parts
- type PcmC
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoxTypeIpcm ¶ added in v1.5.0
func BoxTypePcmC ¶ added in v1.5.0
Types ¶
type Codec ¶
type Codec interface { IsVideo() bool // contains filtered or unexported methods }
Codec is a fMP4 codec.
type CodecAC3 ¶ added in v1.4.0
type CodecAC3 struct { SampleRate int ChannelCount int Fscod uint8 Bsid uint8 Bsmod uint8 Acmod uint8 LfeOn bool BitRateCode uint8 }
CodecAC3 is the AC-3 codec.
type CodecMJPEG ¶ added in v1.4.0
CodecMJPEG is the M-JPEG codec.
func (CodecMJPEG) IsVideo ¶ added in v1.4.0
func (CodecMJPEG) IsVideo() bool
IsVideo implements Codec.
type CodecMPEG1Audio ¶ added in v1.3.0
CodecMPEG1Audio is a MPEG-1 Audio codec.
func (CodecMPEG1Audio) IsVideo ¶ added in v1.3.0
func (CodecMPEG1Audio) IsVideo() bool
IsVideo implements Codec.
type CodecMPEG1Video ¶ added in v1.3.0
type CodecMPEG1Video struct {
Config []byte
}
CodecMPEG1Video is a MPEG-1 Video codec.
func (CodecMPEG1Video) IsVideo ¶ added in v1.3.0
func (CodecMPEG1Video) IsVideo() bool
IsVideo implements Codec.
type CodecMPEG4Audio ¶
type CodecMPEG4Audio struct {
mpeg4audio.Config
}
CodecMPEG4Audio is a MPEG-4 Audio codec.
type CodecMPEG4Video ¶ added in v1.3.0
type CodecMPEG4Video struct {
Config []byte
}
CodecMPEG4Video is a MPEG-4 Video codec.
func (CodecMPEG4Video) IsVideo ¶ added in v1.3.0
func (CodecMPEG4Video) IsVideo() bool
IsVideo implements Codec.
type CodecVP9 ¶
type CodecVP9 struct { Width int Height int Profile uint8 BitDepth uint8 ChromaSubsampling uint8 ColorRange bool }
CodecVP9 is the VP9 codec.
type Init ¶
type Init struct {
Tracks []*InitTrack
}
Init is a fMP4 initialization block.
type PartSample ¶
PartSample is a sample of a PartTrack.
func NewPartSampleAV1 ¶
func NewPartSampleAV1(sequenceHeaderPresent bool, tu [][]byte) (*PartSample, error)
NewPartSampleAV1 creates a sample with AV1 data.
func NewPartSampleH26x ¶
func NewPartSampleH26x(ptsOffset int32, randomAccessPresent bool, au [][]byte) (*PartSample, error)
NewPartSampleH26x creates a sample with H26x data.
func (PartSample) GetAV1 ¶
func (ps PartSample) GetAV1() ([][]byte, error)
GetAV1 gets AV1 data from the sample.
func (PartSample) GetH26x ¶
func (ps PartSample) GetH26x() ([][]byte, error)
GetH26x gets H26x data from the sample.
type PartTrack ¶
type PartTrack struct { ID int BaseTime uint64 Samples []*PartSample }
PartTrack is a track of Part.
Source Files ¶
- boxes.go
- codec.go
- codec_ac3.go
- codec_av1.go
- codec_h264.go
- codec_h265.go
- codec_lpcm.go
- codec_mjpeg.go
- codec_mpeg1_audio.go
- codec_mpeg1_video.go
- codec_mpeg4_audio.go
- codec_mpeg4_video.go
- codec_opus.go
- codec_vp9.go
- fmp4.go
- init.go
- init_track.go
- mp4_writer.go
- part.go
- part_sample.go
- part_track.go
- parts.go