transcoder

package
v0.25.1 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ScreenshotOutputTypeImage2 = ScreenshotOutputType{
								// contains filtered or unexported fields
	}
	ScreenshotOutputTypeBMP = ScreenshotOutputType{
							// contains filtered or unexported fields
	}
)
View Source
var ErrUnsupportedFormat = errors.New("unsupported image format")

Functions

func ImageThumbnail

func ImageThumbnail(input string, options ImageThumbnailOptions) ffmpeg.Args

func ScreenshotFrame

func ScreenshotFrame(input string, frame int, options ScreenshotOptions) ffmpeg.Args

ScreenshotFrame uses the select filter to get a single frame from the video. It is very slow and should only be used for files with very small duration in secs / frame count.

func ScreenshotTime

func ScreenshotTime(input string, t float64, options ScreenshotOptions) ffmpeg.Args

func Splice

func Splice(concatFile string, options SpliceOptions) ffmpeg.Args

func Transcode

func Transcode(input string, options TranscodeOptions) ffmpeg.Args

Types

type ImageThumbnailOptions

type ImageThumbnailOptions struct {
	InputFormat   ffmpeg.ImageFormat
	OutputFormat  ffmpeg.ImageFormat
	OutputPath    string
	MaxDimensions int
	Quality       int
}

type ScreenshotOptions

type ScreenshotOptions struct {
	OutputPath string
	OutputType ScreenshotOutputType

	// Quality is the quality scale. See https://ffmpeg.org/ffmpeg.html#Main-options
	Quality int

	Width int

	// Verbosity is the logging verbosity. Defaults to LogLevelError if not set.
	Verbosity ffmpeg.LogLevel

	UseSelectFilter bool
}

type ScreenshotOutputType

type ScreenshotOutputType struct {
	// contains filtered or unexported fields
}

func (ScreenshotOutputType) Args

func (t ScreenshotOutputType) Args() []string

type SpliceOptions

type SpliceOptions struct {
	OutputPath string
	Format     ffmpeg.Format

	VideoCodec ffmpeg.VideoCodec
	VideoArgs  ffmpeg.Args

	AudioCodec ffmpeg.AudioCodec
	AudioArgs  ffmpeg.Args

	// Verbosity is the logging verbosity. Defaults to LogLevelError if not set.
	Verbosity ffmpeg.LogLevel
}

type TranscodeOptions

type TranscodeOptions struct {
	OutputPath string
	Format     ffmpeg.Format

	VideoCodec ffmpeg.VideoCodec
	VideoArgs  ffmpeg.Args

	AudioCodec ffmpeg.AudioCodec
	AudioArgs  ffmpeg.Args

	// if XError is true, then ffmpeg will fail on warnings
	XError bool

	StartTime float64
	SlowSeek  bool
	Duration  float64

	// Verbosity is the logging verbosity. Defaults to LogLevelError if not set.
	Verbosity ffmpeg.LogLevel

	// arguments added before the input argument
	ExtraInputArgs []string
	// arguments added before the output argument
	ExtraOutputArgs []string
}

Jump to

Keyboard shortcuts

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