transcoder

package
v0.90.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2022 License: Apache-2.0, MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Transcoder

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

Transcoder Main struct

func (*Transcoder) CreateInputPipe

func (t *Transcoder) CreateInputPipe() (*io.PipeWriter, error)

CreateInputPipe creates an input pipe for the transcoding process

func (*Transcoder) CreateOutputPipe

func (t *Transcoder) CreateOutputPipe(containerFormat string) (*io.PipeReader, error)

CreateOutputPipe creates an output pipe for the transcoding process

func (Transcoder) FFmpegExec

func (t Transcoder) FFmpegExec() string

FFmpegExec Get FFmpeg Bin path

func (Transcoder) FFprobeExec

func (t Transcoder) FFprobeExec() string

FFprobeExec Get FFprobe Bin path

func (Transcoder) GetCommand

func (t Transcoder) GetCommand() []string

GetCommand Build and get command

func (*Transcoder) GetMetadata

func (t *Transcoder) GetMetadata(inputPath string) error

Initialize Init the transcoding process

func (*Transcoder) GetMetadataByPipe

func (t *Transcoder) GetMetadataByPipe(r io.Reader) error

Initialize Init the transcoding process

func (*Transcoder) Initialize

func (t *Transcoder) Initialize(inputPath string, outputPath string) error

Initialize Init the transcoding process

func (*Transcoder) InitializeEmptyTranscoder

func (t *Transcoder) InitializeEmptyTranscoder() error

InitializeEmptyTranscoder initializes the fields necessary for a blank transcoder

func (Transcoder) MediaFile

func (t Transcoder) MediaFile() *models.Mediafile

MediaFile Get the ttranscoding media file.

func (Transcoder) Output

func (t Transcoder) Output() <-chan models.Progress

Output Returns the transcoding progress channel

func (Transcoder) Process

func (t Transcoder) Process() *exec.Cmd

Process Get transcoding process

func (*Transcoder) Run

func (t *Transcoder) Run(progress bool) <-chan error

Run Starts the transcoding process

func (*Transcoder) SetConfiguration

func (t *Transcoder) SetConfiguration(v ffmpeg.Configuration)

SetConfiguration Set the transcoding configuration

func (*Transcoder) SetInputPath

func (t *Transcoder) SetInputPath(inputPath string) error

SetInputPath sets the input path for transcoding

func (*Transcoder) SetMediaFile

func (t *Transcoder) SetMediaFile(v *models.Mediafile)

SetMediaFile Set the media file

func (*Transcoder) SetOutputPath

func (t *Transcoder) SetOutputPath(inputPath string) error

SetOutputPath sets the output path for transcoding

func (*Transcoder) SetProcess

func (t *Transcoder) SetProcess(cmd *exec.Cmd)

SetProcess Set the transcoding process

func (*Transcoder) SetProcessStderrPipe

func (t *Transcoder) SetProcessStderrPipe(v io.ReadCloser)

SetProcessStderrPipe Set the STDERR pipe

func (*Transcoder) SetProcessStdinPipe

func (t *Transcoder) SetProcessStdinPipe(v io.WriteCloser)

SetProcessStdinPipe Set the STDIN pipe

func (*Transcoder) SetWhiteListProtocols

func (t *Transcoder) SetWhiteListProtocols(availableProtocols []string)

func (*Transcoder) Stop

func (t *Transcoder) Stop() error

Stop Ends the transcoding process

Jump to

Keyboard shortcuts

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