vidtool

package
v0.0.0-...-4f448d1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CutFrameFromVideo

func CutFrameFromVideo(videoPath string, time int) (*bytes.Buffer, error)

Types

type FormatInfo

type FormatInfo struct {
	Size     string `json:"size"`
	Duration string `json:"duration"`
}

type Stream

type Stream struct {
	Codec              string
	CodecLongName      string
	Width              int
	Height             int
	DisplayAspectRatio string
	Bitrate            string
	DurationSec        int
	Duration           string
	FrameRate          float64
	PixelFormat        string
}

type StreamInfo

type StreamInfo struct {
	Type               string `json:"codec_type"`
	Codec              string `json:"codec_name"`
	CodecLongName      string `json:"codec_long_name"`
	Width              int    `json:"width"`
	Height             int    `json:"height"`
	DisplayAspectRatio string `json:"display_aspect_ratio"`
	ExpBitrate         string `json:"bit_rate"`
	ExpDuration        string `json:"duration"`
	ExpRFrameRate      string `json:"r_frame_rate"`
	PixelFormat        string `json:"pix_fmt"`
}

func (*StreamInfo) AsStream

func (s *StreamInfo) AsStream() *Stream

type VideoInfo

type VideoInfo struct {
	StreamInfos []StreamInfo `json:"streams"`
	FormatInfo  `json:"format"`
	FileName    string `json:"-"`
}

func GetVideoInfo

func GetVideoInfo(file string) (*VideoInfo, error)

func (*VideoInfo) FormatSize

func (v *VideoInfo) FormatSize() map[string]string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL