ffmpeg

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 23, 2025 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetVideoDuration

func GetVideoDuration(inputFilePath string) (int64, error)

GetVideoDuration gets the duration of the video file. The duration is rounded off to the nearest integer in seconds.

func MakeDASH

func MakeDASH(inputFilePath string, outputFolderPath string, mpdFileName string) error

MakeDASH creates a DASH stream from an input file and saves it to an output folder. The input file should be .mp4 format. If the input file is not.mp4 format, it will be converted to.mp4 format first. If the fileName is not provided, the output file will be named "output.mpd" automatically.

func OtherToMP4

func OtherToMP4(input string, output string) error

OtherToMP4 converts other video format to mp4 format using ffmpeg

Types

type FFProbeCommander

type FFProbeCommander interface {

	// ShowEntries displays the specified entries of the input file.
	ShowEntries(inputFilePath string, entries ...string) *FFprobe
	SetOutputFormat(inputFilePath string, outputFormat string) *FFprobe
	// contains filtered or unexported methods
}

type FFmpeg

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

func NewFFmpeg

func NewFFmpeg() *FFmpeg

func (*FFmpeg) AddGlobalArgs

func (f *FFmpeg) AddGlobalArgs(args ...string) *FFmpeg

func (*FFmpeg) AddInputInfo

func (f *FFmpeg) AddInputInfo(inputFilePath string, args ...string) *FFmpeg

func (*FFmpeg) AddOutputInfo

func (f *FFmpeg) AddOutputInfo(outputFilePath string, args ...string) *FFmpeg

func (FFmpeg) BuildCommand

func (f FFmpeg) BuildCommand() string

func (FFmpeg) Run

func (f FFmpeg) Run() error

func (FFmpeg) RunCombinedOutput

func (f FFmpeg) RunCombinedOutput() ([]byte, error)

func (*FFmpeg) SetAudioCodec

func (f *FFmpeg) SetAudioCodec(outputFilePath string, codec string) *FFmpeg

func (*FFmpeg) SetCopyCodec

func (f *FFmpeg) SetCopyCodec(outputFilePath string) *FFmpeg

func (*FFmpeg) SetFormatDash

func (f *FFmpeg) SetFormatDash(outputFilePath string) *FFmpeg

func (*FFmpeg) SetLogLevel

func (f *FFmpeg) SetLogLevel(level string) *FFmpeg

func (*FFmpeg) SetSegmentTime

func (f *FFmpeg) SetSegmentTime(outputFilePath string, duration float64) *FFmpeg

func (*FFmpeg) SetVideoCodec

func (f *FFmpeg) SetVideoCodec(outputFilePath string, codec string) *FFmpeg

func (*FFmpeg) ShowCommand

func (f *FFmpeg) ShowCommand() *FFmpeg

type FFmpegCommander

type FFmpegCommander interface {
	SetSegmentTime(outputFilePath string, duration float64) *FFmpeg
	SetFormatDash(outputFilePath string) *FFmpeg
	// contains filtered or unexported methods
}

type FFprobe

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

func NewFFprobe

func NewFFprobe() *FFprobe

func (*FFprobe) AddGlobalArgs

func (f *FFprobe) AddGlobalArgs(args ...string) *FFprobe

func (*FFprobe) AddInputInfo

func (f *FFprobe) AddInputInfo(inputFilePath string, args ...string) *FFprobe

func (*FFprobe) AddOutputInfo

func (f *FFprobe) AddOutputInfo(outputFilePath string, args ...string) *FFprobe

func (FFprobe) BuildCommand

func (f FFprobe) BuildCommand() string

func (FFprobe) Run

func (f FFprobe) Run() error

func (FFprobe) RunCombinedOutput

func (f FFprobe) RunCombinedOutput() ([]byte, error)

func (*FFprobe) SetAudioCodec

func (f *FFprobe) SetAudioCodec(outputFilePath string, codec string) *FFprobe

func (*FFprobe) SetLogLevel

func (f *FFprobe) SetLogLevel(level string) *FFprobe

func (*FFprobe) SetOutputFormat

func (f *FFprobe) SetOutputFormat(inputFilePath string, outputFormat string) *FFprobe

func (*FFprobe) SetVideoCodec

func (f *FFprobe) SetVideoCodec(outputFilePath string, codec string) *FFprobe

func (*FFprobe) ShowCommand

func (f *FFprobe) ShowCommand() *FFprobe

func (*FFprobe) ShowEntries

func (f *FFprobe) ShowEntries(inputFilePath string, entries ...string) *FFprobe

Jump to

Keyboard shortcuts

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