Documentation
¶
Overview ¶
Package video2dvd provides APIs for preparing DVD-compatible media and orchestrating DVD-Video directory creation from MP4 and WebM media.
The package itself does not start external processes. It includes in-process encoder and authorer implementations for creating menu-less DVD-Video output.
Index ¶
- Constants
- Variables
- func AVCConfigToAnnexB(config []byte) ([]byte, error)
- func AVCNALLengthSize(config []byte) (int, error)
- func AVCParameterSets(config []byte) ([][]byte, [][]byte, error)
- func AVCToAnnexB(sample []byte, nalLengthSize int) ([]byte, error)
- func BuildDVDNAVPack(info DVDNAVPackInfo) ([]byte, error)
- func DecodeMP4Audio(ctx context.Context, path string, trackIndex *int, ...) (err error)
- func DecodeMP4Video(ctx context.Context, path string, trackIndex *int, ...) error
- func DecodeWebMAudio(ctx context.Context, path string, trackIndex *int, ...) error
- func DecodeWebMVideo(ctx context.Context, path string, trackIndex *int, ...) (err error)
- func MuxDVDTitleVOB(ctx context.Context, title EncodedTitle, workDir string, dst io.Writer) error
- func PrepareMP4AudioForDVD(ctx context.Context, path string, trackIndex *int, dst io.Writer) error
- func PrepareMP4VideoForDVD(ctx context.Context, path string, trackIndex *int, profile Profile, ...) error
- func PrepareWebMAudioForDVD(ctx context.Context, path string, trackIndex *int, dst io.Writer) error
- func PrepareWebMVideoForDVD(ctx context.Context, path string, trackIndex *int, profile Profile, ...) error
- func WriteDVDISO(ctx context.Context, videoTSDir, outputISO string) error
- func WriteDVDISOWithOptions(ctx context.Context, videoTSDir, outputISO string, options DVDImageOptions) error
- func WriteDVDLPCM(dst io.Writer, chunk PCMChunk) error
- func WriteDVDNAVPack(dst io.Writer, info DVDNAVPackInfo) error
- type AspectRatio
- type Authorer
- type Converter
- func (c *Converter) Convert(ctx context.Context, inputs []string, outputDir string, options Options) error
- func (c *Converter) ConvertISO(ctx context.Context, inputs []string, outputISO string, options Options) error
- func (c *Converter) ConvertSources(ctx context.Context, inputs []MediaInput, outputDir string, options Options) error
- func (c *Converter) ConvertSourcesISO(ctx context.Context, inputs []MediaInput, outputISO string, options Options) error
- type DVDFrameRateConverter
- type DVDImageOptions
- type DVDLPCMPacketWriter
- type DVDNAVButton
- type DVDNAVPackInfo
- type DecodedVideoFrame
- type EncodedTitle
- type Encoder
- type FitMode
- type InProcessAuthorer
- type InProcessEncoder
- type MP4Info
- type MPEG2VideoEncoder
- type MPEG2VideoInfo
- type MPEGProgramStreamWriter
- type MediaInput
- type Options
- type PCMChunk
- type Profile
- type SampleHandler
- type SampleInfo
- type StreamEncoder
- type TrackInfo
- type TrackKind
- type VideoStandard
Constants ¶
const ( VideoCodecMPEG2 = "mpeg2video" AudioCodecAC3 = "ac3" AudioCodecLPCM = "lpcm" AudioCodecMPEG1Layer2 = "mp2" )
const DVD5CapacityBytes int64 = 4_700_000_000
const (
DVDVOBSectorSize = 2048
)
Variables ¶
var ( ErrNoInputs = errors.New("video2dvd: at least one input file is required") ErrOutputExists = errors.New("video2dvd: output path already exists") ErrInvalidProfile = errors.New("video2dvd: invalid DVD profile") ErrDiscCapacity = errors.New("video2dvd: authored DVD exceeds configured capacity") )
var ErrInvalidAVC = errors.New("video2dvd: invalid AVC sample or configuration")
var ErrInvalidMP4 = errors.New("video2dvd: invalid or unsupported MP4 container")
Functions ¶
func AVCConfigToAnnexB ¶
AVCConfigToAnnexB writes the SPS and PPS units from avcC in Annex-B form.
func AVCNALLengthSize ¶
AVCNALLengthSize returns the size of the NAL unit length field stored in an avcC decoder configuration record.
func AVCParameterSets ¶
AVCParameterSets returns the SPS and PPS NAL units in an avcC record.
func AVCToAnnexB ¶
AVCToAnnexB converts one length-prefixed AVC access unit from MP4 into Annex-B NAL units. nalLengthSize must come from the track's avcC record.
func BuildDVDNAVPack ¶
func BuildDVDNAVPack(info DVDNAVPackInfo) ([]byte, error)
BuildDVDNAVPack builds one 2048-byte DVD navigation pack containing the MPEG-2 pack and system headers, followed by PCI and DSI private-stream-2 packets. It is a pack primitive; callers still need to arrange VOBUs and generate the corresponding IFO navigation tables.
func DecodeMP4Audio ¶
func DecodeMP4Audio(ctx context.Context, path string, trackIndex *int, handler func(PCMChunk) error) (err error)
DecodeMP4Audio decodes an AAC-LC or AC-3 MP4 audio track to 48 kHz stereo S16 PCM. trackIndex selects the zero-based trak; nil selects a supported track. Audio payloads and edit-list timing are validated by the decoder.
func DecodeMP4Video ¶
func DecodeMP4Video(ctx context.Context, path string, trackIndex *int, handler func(DecodedVideoFrame) error) error
DecodeMP4Video decodes one progressive 8-bit 4:2:0 H.264 track. trackIndex is a zero-based trak index; nil selects the first H.264 video track. Frames are delivered in presentation order and own their pixel buffers.
func DecodeWebMAudio ¶
func DecodeWebMAudio(ctx context.Context, path string, trackIndex *int, handler func(PCMChunk) error) error
DecodeWebMAudio sends 48 kHz stereo Opus PCM chunks from a WebM file. The selected stream index is zero-based in the container track list.
func DecodeWebMVideo ¶
func DecodeWebMVideo(ctx context.Context, path string, trackIndex *int, handler func(DecodedVideoFrame) error) (err error)
DecodeWebMVideo sends owned 8-bit YUV 4:2:0 frames from a WebM video track to handler. VP9 Profile 0 and Profile 2 use the stateful go-vp9 decoder so reference frames, hidden frames, superframes, and resolution changes are processed consistently. VP8/AV1 use the bundled pure-Go media pipeline.
func MuxDVDTitleVOB ¶
MuxDVDTitleVOB combines one MPEG-2 elementary stream and one raw DVD LPCM stream into VOBUs with NAV packs and fixed-size MPEG program-stream sectors. The result does not include IFO/BUP files or complete DVD navigation tables.
func PrepareMP4AudioForDVD ¶
PrepareMP4AudioForDVD decodes the selected AAC-LC or AC-3 track to 48 kHz stereo and writes big-endian 16-bit DVD LPCM audio essence. The destination is not a VOB audio PES stream; an authorer still needs to packetize it and add the DVD LPCM private-stream headers.
func PrepareMP4VideoForDVD ¶
func PrepareMP4VideoForDVD( ctx context.Context, path string, trackIndex *int, profile Profile, sourceAspectNumerator, sourceAspectDenominator int, mode FitMode, handler func(DecodedVideoFrame) error, ) error
PrepareMP4VideoForDVD decodes an MP4 H.264 track, fits frames to the DVD raster, and converts the presentation timestamps to the selected DVD frame rate. Source display aspect ratio must be supplied by the caller because some MP4 files use non-square pixels or rotation metadata not represented by the decoded frame dimensions. The handler receives owned DVD-raster frames.
func PrepareWebMAudioForDVD ¶
PrepareWebMAudioForDVD decodes an Opus track to 48 kHz stereo and writes DVD LPCM audio essence. AV1/Opus decoding and WebM demuxing use pure-Go packages.
func PrepareWebMVideoForDVD ¶
func PrepareWebMVideoForDVD( ctx context.Context, path string, trackIndex *int, profile Profile, sourceAspectNumerator, sourceAspectDenominator int, mode FitMode, handler func(DecodedVideoFrame) error, ) error
PrepareWebMVideoForDVD decodes WebM VP9 (including 10/12-bit VP9 Profile 2), VP8, or AV1 video, converts frames to 8-bit YUV 4:2:0, and prepares the DVD raster and frame rate. High-bit-depth VP9 is reduced to 8-bit for DVD.
func WriteDVDISO ¶
WriteDVDISO writes an authored VIDEO_TS directory as a DVD-Video UDF bridge image. It creates an ISO 9660 view and a UDF 1.02 view over the same file extents, and publishes outputISO only after the image has been completed.
func WriteDVDISOWithOptions ¶
func WriteDVDISOWithOptions(ctx context.Context, videoTSDir, outputISO string, options DVDImageOptions) error
WriteDVDISOWithOptions is WriteDVDISO with a volume identifier and capacity limit. The image is assembled in-process and does not invoke external tools.
func WriteDVDLPCM ¶
WriteDVDLPCM writes the audio essence for a DVD 48 kHz, 16-bit, two-channel LPCM stream. Samples are signed PCM values interleaved left/right and are written big-endian as required by DVD LPCM. A DVD muxer must still wrap this essence in private_stream_1 PES packets and add each packet's LPCM headers.
func WriteDVDNAVPack ¶
func WriteDVDNAVPack(dst io.Writer, info DVDNAVPackInfo) error
WriteDVDNAVPack writes one fixed-size navigation pack without closing dst.
Types ¶
type AspectRatio ¶
type AspectRatio uint8
AspectRatio is the display aspect ratio signaled in the MPEG-2 stream.
const ( AspectRatio4x3 AspectRatio = iota + 1 AspectRatio16x9 )
type Authorer ¶
type Authorer interface {
Author(ctx context.Context, titles []EncodedTitle, outputDir string, profile Profile) error
}
Authorer creates a DVD-Video directory (including VIDEO_TS.IFO/BUP and VOB files) from the encoded titles. outputDir is an empty directory. Implementors should honor context cancellation. Converter passes absolute elementary-stream paths in titles.
type Converter ¶
type Converter struct {
// contains filtered or unexported fields
}
Converter coordinates encoding and DVD authoring. It stages all files beside the destination and publishes the result with a directory rename only after authoring succeeds.
func New ¶
New constructs a Converter with the supplied encoding and authoring backends. It does not select defaults or invoke external commands.
func (*Converter) Convert ¶
func (c *Converter) Convert(ctx context.Context, inputs []string, outputDir string, options Options) error
Convert turns inputs into a DVD-Video directory at outputDir. outputDir must not already exist; it will contain a VIDEO_TS subdirectory on success.
func (*Converter) ConvertISO ¶
func (c *Converter) ConvertISO(ctx context.Context, inputs []string, outputISO string, options Options) error
ConvertISO converts inputs into a DVD-Video UDF bridge ISO image. The image contains both ISO 9660 and UDF 1.02 directory views over the same VIDEO_TS file extents and is published only after authoring and image creation succeed.
func (*Converter) ConvertSources ¶
func (c *Converter) ConvertSources(ctx context.Context, inputs []MediaInput, outputDir string, options Options) error
ConvertSources creates a DVD-Video directory from video sources and optional independent audio sources. Each MediaInput becomes one DVD title.
func (*Converter) ConvertSourcesISO ¶
func (c *Converter) ConvertSourcesISO(ctx context.Context, inputs []MediaInput, outputISO string, options Options) error
ConvertSourcesISO creates a DVD-Video UDF bridge image from media sources.
type DVDFrameRateConverter ¶
type DVDFrameRateConverter struct {
// contains filtered or unexported fields
}
DVDFrameRateConverter maps timestamped decoded frames to the standard DVD output rate: 30000/1001 fps for NTSC and 25 fps for PAL. It holds the most recent source frame and repeats or drops frames as needed. Input PTS values must be in presentation order and each frame must carry a positive Duration.
func NewDVDFrameRateConverter ¶
func NewDVDFrameRateConverter(profile Profile, handler func(DecodedVideoFrame) error) (*DVDFrameRateConverter, error)
NewDVDFrameRateConverter creates a streaming DVD frame-rate converter.
func (*DVDFrameRateConverter) Finish ¶
func (c *DVDFrameRateConverter) Finish() error
Finish emits output timestamps covered by the final input frame and closes the converter. It may be called only once.
func (*DVDFrameRateConverter) Push ¶
func (c *DVDFrameRateConverter) Push(frame DecodedVideoFrame) error
Push adds one decoded frame. Output is emitted as soon as the next input frame establishes that no earlier source frame can be selected for that output timestamp.
type DVDImageOptions ¶
type DVDImageOptions struct {
// VolumeID is the ISO 9660 volume identifier. Empty selects VIDEO2DVD.
VolumeID string
// DiscCapacityBytes is the maximum image size. Zero selects DVD5 capacity.
DiscCapacityBytes int64
}
DVDImageOptions configures a UDF 1.02 / ISO 9660 DVD-Video image.
type DVDLPCMPacketWriter ¶
type DVDLPCMPacketWriter struct {
// contains filtered or unexported fields
}
DVDLPCMPacketWriter packetizes 48 kHz, 16-bit stereo PCM into DVD LPCM private_stream_1 PES packets and writes them as 2048-byte program-stream sectors. It does not add NAV packs or DVD navigation files.
func NewDVDLPCMPacketWriter ¶
func NewDVDLPCMPacketWriter(dst io.Writer, streamNumber uint8) (*DVDLPCMPacketWriter, error)
NewDVDLPCMPacketWriter creates a writer for LPCM audio stream 0 through 7.
func (*DVDLPCMPacketWriter) Close ¶
func (w *DVDLPCMPacketWriter) Close() error
Close pads a final partial 80-sample LPCM frame with silence and flushes it. It does not close the destination writer.
func (*DVDLPCMPacketWriter) WriteChunk ¶
func (w *DVDLPCMPacketWriter) WriteChunk(chunk PCMChunk) error
WriteChunk adds contiguous interleaved stereo samples. Chunk timestamps must continue the same 48 kHz sample timeline.
type DVDNAVButton ¶
type DVDNAVButton struct {
XStart, YStart int
XEnd, YEnd int
Up, Down uint8
Left, Right uint8
Command [8]byte
}
DVDNAVButton describes one rectangular menu button. Coordinates use the DVD 720x480/576 display raster and commands are eight-byte DVD VM words.
type DVDNAVPackInfo ¶
type DVDNAVPackInfo struct {
SCRBase uint64
LogicalBlockNumber uint32
VOBUEndAddress uint32
FirstReferenceEndAddress uint32
SecondReferenceEndAddress uint32
ThirdReferenceEndAddress uint32
VOBID uint16
CellID uint8
StartPTM uint32
EndPTM uint32
CellElapsedTime [4]byte
// ButtonDisplayType is the DVD highlight group display mask: bit 0 is
// widescreen, bit 1 letterbox, and bit 2 pan-and-scan.
ButtonDisplayType uint8
Buttons []DVDNAVButton
}
DVDNAVPackInfo contains the navigation fields associated with one VOBU. Sector addresses are relative to the beginning of the VOB file. Reference end addresses are relative to the NAV pack, as required by DSI_GI.
type DecodedVideoFrame ¶
type DecodedVideoFrame struct {
PTS time.Duration
Duration time.Duration
Width int
Height int
Y []byte
U []byte
V []byte
}
DecodedVideoFrame is an owned, planar 8-bit YUV 4:2:0 frame. Chroma planes have half the luma width and height. PTS and Duration use the MP4 media timeline; edit-list offsets are not applied.
func FitVideoFrame ¶
func FitVideoFrame(frame DecodedVideoFrame, profile Profile, sourceAspectNumerator, sourceAspectDenominator int, mode FitMode) (DecodedVideoFrame, error)
FitVideoFrame converts an owned planar YUV 4:2:0 frame to the raster and display aspect ratio described by profile. sourceAspectNumerator and sourceAspectDenominator describe the source's displayed aspect ratio, such as 16 and 9. The output uses bilinear scaling and even chroma-aligned edges.
For FitLetterbox, unused pixels are set to studio-range black. For FitCrop, the source is center-cropped. The input frame is not modified.
type EncodedTitle ¶
type EncodedTitle struct {
VideoPath string
AudioPath string
VideoCodec string
AudioCodec string
Aspect AspectRatio
Width int
Height int
FrameRateNumerator int
FrameRateDenominator int
Duration time.Duration
}
EncodedTitle describes DVD-compatible elementary streams produced for one input. Relative paths are resolved from the work directory passed to Encoder.Encode. Both streams must be non-empty files inside that directory. Video is MPEG-2; audio must be AC-3, LPCM, or MPEG-1 Layer II. The authorer may use the duration and frame rate to build navigation data.
type Encoder ¶
type Encoder interface {
Encode(ctx context.Context, inputPath, workDir string, profile Profile) (EncodedTitle, error)
}
Encoder decodes and encodes one input file into DVD-compatible elementary streams. Implementations should honor context cancellation and keep generated files inside workDir. It is called once for each input, in input order.
type FitMode ¶
type FitMode uint8
FitMode controls how FitVideoFrame places source pixels in the DVD raster.
type InProcessAuthorer ¶
type InProcessAuthorer struct{}
InProcessAuthorer writes a DVD-Video title set with an automatically generated title menu. Each encoded title is one DVD title and one chapter.
func NewInProcessAuthorer ¶
func NewInProcessAuthorer() *InProcessAuthorer
NewInProcessAuthorer returns the built-in IFO/BUP and VOB authorer.
func (*InProcessAuthorer) Author ¶
func (a *InProcessAuthorer) Author(ctx context.Context, titles []EncodedTitle, outputDir string, profile Profile) error
Author writes a title set for every encoded title. The output directory must be empty. VTS numbers and title order match the input order.
type InProcessEncoder ¶
type InProcessEncoder struct{}
InProcessEncoder is a built-in Encoder that uses only Go code. Its current MPEG-2 video coder uses I pictures and P-picture macroblock skips with a simple intra quantizer and no motion estimation; use it as an experimental backend rather than a quality transcoder. It converts MP4 AAC-LC/AC-3 and WebM Opus audio to LPCM and creates silent LPCM when the input has no audio track.
func NewInProcessEncoder ¶
func NewInProcessEncoder() *InProcessEncoder
NewInProcessEncoder returns the built-in Encoder implementation.
func (*InProcessEncoder) Encode ¶
func (e *InProcessEncoder) Encode(ctx context.Context, inputPath, workDir string, profile Profile) (EncodedTitle, error)
Encode turns one MP4 or WebM into DVD-compatible elementary streams in workDir.
func (*InProcessEncoder) EncodeStreams ¶
func (e *InProcessEncoder) EncodeStreams(ctx context.Context, input MediaInput, workDir string, profile Profile) (EncodedTitle, error)
EncodeStreams encodes one DVD title from independent video/audio files or selected tracks in a shared file.
type MP4Info ¶
MP4Info contains basic movie and track metadata read from the MP4 box tables.
func DemuxMP4 ¶
func DemuxMP4(path string, handler SampleHandler) (MP4Info, error)
DemuxMP4 reports every compressed sample from a non-fragmented MP4 in track order. It does not decode samples or convert H.264 length prefixes to Annex B.
func ProbeMP4 ¶
ProbeMP4 reads container metadata without decoding the media. It supports regular, non-fragmented MP4 files with a moov box and returns the first sample description for each track.
func ProbeMP4Reader ¶
ProbeMP4Reader is the ReaderAt form of ProbeMP4. size is the total length of the file. The reader is not closed or retained.
func ProbeMedia ¶
ProbeMedia selects the built-in MP4 or WebM metadata reader from the file signature and extension. WebM VP9, AV1, and Opus inputs can then use the corresponding DVD preparation functions.
type MPEG2VideoEncoder ¶
type MPEG2VideoEncoder struct {
// contains filtered or unexported fields
}
MPEG2VideoEncoder writes a DVD-raster MPEG-2 elementary stream from planar YUV 4:2:0 frames. It emits closed GOPs containing I pictures and P pictures. P pictures use half-sample forward motion vectors and quantized DCT residuals.
The writer does not close dst. Call Close after the final frame to write the MPEG sequence-end code.
func NewMPEG2VideoEncoder ¶
func NewMPEG2VideoEncoder(dst io.Writer, profile Profile) (*MPEG2VideoEncoder, error)
NewMPEG2VideoEncoder prepares an encoder for NTSC or PAL full-raster DVD frames. It writes the sequence header with the first GOP.
func (*MPEG2VideoEncoder) Close ¶
func (e *MPEG2VideoEncoder) Close() error
Close finishes the elementary stream. It does not close the destination.
func (*MPEG2VideoEncoder) WriteFrame ¶
func (e *MPEG2VideoEncoder) WriteFrame(frame DecodedVideoFrame) error
WriteFrame encodes one full-resolution planar YUV 4:2:0 frame. Frames must already be fitted and timestamp-resampled to the selected DVD profile.
type MPEG2VideoInfo ¶
type MPEG2VideoInfo struct {
Width int
Height int
Aspect AspectRatio
FrameRateNumerator int
FrameRateDenominator int
Profile string
Level string
}
MPEG2VideoInfo describes the first MPEG-2 sequence in an elementary stream.
func ProbeMPEG2Video ¶
func ProbeMPEG2Video(path string) (MPEG2VideoInfo, error)
ProbeMPEG2Video parses sequence and sequence-extension headers without decoding picture data. It accepts Main Profile at Main Level streams used by DVD-Video and rejects MPEG-1 streams.
type MPEGProgramStreamWriter ¶
type MPEGProgramStreamWriter struct {
// contains filtered or unexported fields
}
MPEGProgramStreamWriter packetizes PES data into 2048-byte MPEG-2 program stream sectors. It is a muxing primitive, not a complete DVD-Video authorer: DVD NAV packs, system/navigation tables, LPCM substream headers, and IFO/BUP files must be supplied by a higher layer.
func NewMPEGProgramStreamWriter ¶
func NewMPEGProgramStreamWriter(dst io.Writer) (*MPEGProgramStreamWriter, error)
NewMPEGProgramStreamWriter creates a sector writer with a 1.15 MB/s declared program mux rate. PES packets must be submitted in nondecreasing PTS order.
func (*MPEGProgramStreamWriter) Close ¶
func (w *MPEGProgramStreamWriter) Close() error
Close writes the MPEG program_end_code in its own fixed-size pack. It does not close the destination writer.
type MediaInput ¶
type MediaInput struct {
VideoPath string
AudioPath string
VideoTrackIndex *int
AudioTrackIndex *int
AudioOffset time.Duration
}
MediaInput identifies the video and optional audio source for one DVD title. When AudioPath is empty, audio is read from VideoPath. Track indexes are zero-based container track indexes; nil selects the first supported track. AudioOffset shifts decoded audio on the video timeline. Positive values add silence before the audio; negative values trim audio that starts before the video.
type Options ¶
type Options struct {
Standard VideoStandard
Aspect AspectRatio
DiscCapacityBytes int64
MenuTitle string
MenuBackgroundLuma uint8
MenuTextLuma uint8
VideoBitrate int
}
Options controls conversion and DVD authoring. The zero value selects NTSC, 16:9, and the full-resolution DVD raster for that standard.
type PCMChunk ¶
PCMChunk contains interleaved signed 16-bit PCM in DVD's 48 kHz rate. The decoder outputs stereo by default, suitable for later LPCM multiplexing.
type Profile ¶
type Profile struct {
Standard VideoStandard
Aspect AspectRatio
FrameWidth int
FrameHeight int
DiscCapacityBytes int64
// MenuTitle and menu luma values customize the generated title menu.
MenuTitle string
MenuBackgroundLuma uint8
MenuTextLuma uint8
VideoBitrate int
}
Profile describes the DVD-compatible video target requested from Encoder.
type SampleHandler ¶
type SampleHandler func(track TrackInfo, sample SampleInfo, data io.Reader) error
SampleHandler receives compressed samples in track order. The Reader is limited to the current sample and becomes invalid after the callback returns.
type SampleInfo ¶
type SampleInfo struct {
SampleNumber int
Offset int64
Size uint32
DTS int64
PTS int64
Duration uint32
KeyFrame bool
DescriptionIndex uint32
}
SampleInfo describes one compressed MP4 sample. DTS, PTS, and Duration are expressed in the track's TimeScale. SampleNumber is one-based.
type StreamEncoder ¶
type StreamEncoder interface {
EncodeStreams(ctx context.Context, input MediaInput, workDir string, profile Profile) (EncodedTitle, error)
}
StreamEncoder optionally accepts independent video and audio sources. Converter uses it when available; legacy Encoder implementations continue to work for single-file inputs without explicit track selection or offsets.
type TrackInfo ¶
type TrackInfo struct {
Index int
Kind TrackKind
Codec string
CodecConfig []byte
NALLengthSize int
Width int
Height int
PixelAspectHorizontal uint32
PixelAspectVertical uint32
SampleRate int
Channels int
Duration time.Duration
DefaultDuration time.Duration
TimeScale uint32
}
TrackInfo contains container-level metadata. Codec is the MP4 sample-entry code or the WebM codec name. CodecConfig contains codec-specific setup data. PixelAspectHorizontal and PixelAspectVertical describe the displayed pixel shape; zero means square pixels or no pixel aspect metadata was present.
type VideoStandard ¶
type VideoStandard uint8
VideoStandard selects the DVD video raster and frame-rate family.
const ( VideoStandardNTSC VideoStandard = iota + 1 VideoStandardPAL )
Source Files
¶
- aac_config.go
- aac_fallback.go
- avc.go
- builtin_encoder.go
- decode.go
- demux.go
- dvd_author.go
- dvd_image.go
- dvd_lpcm.go
- dvd_lpcm_packet.go
- dvd_menu.go
- dvd_nav.go
- dvd_title_mux.go
- frame_rate.go
- mpeg2_encode.go
- mpeg2_probe.go
- pcm_window.go
- prepare_audio.go
- prepare_video.go
- probe.go
- program_stream.go
- video2dvd.go
- video_fit.go
- webm.go