Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var VideoCodecs = map[string]string{
"h264": "libx264",
"h265": "libx265",
}
VideoCodecs currently supported video codecs
Functions ¶
func Transform ¶
func Transform(input *TransformInput) error
Transform applies the specified transformations on the video file
Types ¶
type InspectInput ¶
type InspectInput struct { Filename string ExtractThumbnail bool ThumbnailTimeOffset string ThumbnailWidth int64 ThumbnailHeight int64 }
InspectInput the input used to extract the media information
type InspectOutput ¶
type InspectOutput struct { Duration float64 `json:"duration"` Size struct { Bytes float64 `json:"bytes"` Human string `json:"human"` } `json:"size"` BitRate int64 `json:"bit_rate"` Thumbnail string `json:"thumbnail,omitempty"` Streams []*StreamMeta `json:"streams"` }
InspectOutput represents a media file info
func Inspect ¶
func Inspect(input *InspectInput) (*InspectOutput, error)
Inspect returns a media file information
func (*InspectOutput) String ¶
func (info *InspectOutput) String() string
type StreamMeta ¶
type StreamMeta struct { Index int64 `json:"index"` Type string `json:"type"` Codec string `json:"codec"` Width int64 `json:"width,omitempty"` Height int64 `json:"height,omitempty"` AspectRatio string `json:"aspect_ratio,omitempty"` StartTime float64 `json:"start_time"` Duration float64 `json:"duration"` BitRate int64 `json:"bit_rate"` FramesCount int64 `json:"frames_count,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` }
StreamMeta represents a stream in a media file
Click to show internal directories.
Click to hide internal directories.