Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Lib mapping ExecCommand = glts.ExecCommand ExecCommandProgress = glts.ExecCommandProgress )
Functions ¶
func FFmpegCutMedia ¶
func FFmpegCutMedia(in, out string, timeSec int, cutAtEnd, overwrite bool, progress ...func(items map[string]string)) error
FFmpegCutMedia if 'cutAtEnd' = true, 'timeSec' will be deleted at the start, otherwise the time will be deleted at the end. A 'progress' function is optionally available to retrieve realtime information (shell stdout) while current operation.
Types ¶
type FFmpegMetadata ¶
type FFmpegMetadata struct { Filename string Streams []Stream `json:"streams"` Format format `json:"format"` }
FFmpegMetadata structure to hold media information provided by ffprobe.
func FFmpegMetadataNew ¶
func FFmpegMetadataNew(filename string) (*FFmpegMetadata, error)
FFmpegMetadataNew create a new structure to hold media information
type Stream ¶
type Stream struct { ID string `json:"id"` CodecName string `json:"codec_name"` CodecLongName string `json:"codec_long_name"` Profile string `json:"profile"` CodecType string `json:"codec_type"` CodecTimeBase string `json:"codec_time_base"` CodecTagString string `json:"codec_tag_string"` CodecTag string `json:"codec_tag"` Width int `json:"width"` Height int `json:"height"` CodedWidth int `json:"coded_width"` CodedHeight int `json:"coded_height"` HasBFrames int `json:"has_b_frames"` SampleAspectRatio string `json:"sample_aspect_ratio"` DisplayAspectRatio string `json:"display_aspect_ratio"` PixFmt string `json:"pix_fmt"` Level int `json:"level"` ChromaLocation string `json:"chroma_location"` Refs int `json:"refs"` QuarterSample string `json:"quarter_sample"` DivxPacked string `json:"divx_packed"` RFrameRrate string `json:"r_frame_rate"` AvgFrameRate string `json:"avg_frame_rate"` TimeBase string `json:"time_base"` DurationTs int `json:"duration_ts"` Duration string `json:"duration"` Disposition disposition `json:"disposition"` BitRate string `json:"bit_rate"` Tags streamTags `json:"tags"` }
Click to show internal directories.
Click to hide internal directories.