 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- func New(cfg *Config) transcoder.Transcoder
- type Config
- type Disposition
- func (d Disposition) GetCleanEffects() int
- func (d Disposition) GetComment() int
- func (d Disposition) GetDefault() int
- func (d Disposition) GetDub() int
- func (d Disposition) GetForced() int
- func (d Disposition) GetHearingImpaired() int
- func (d Disposition) GetKaraoke() int
- func (d Disposition) GetLyrics() int
- func (d Disposition) GetOriginal() int
- func (d Disposition) GetVisualImpaired() int
 
- type Format
- func (f Format) GetBitRate() string
- func (f Format) GetDuration() string
- func (f Format) GetFilename() string
- func (f Format) GetFormatLongName() string
- func (f Format) GetFormatName() string
- func (f Format) GetNbPrograms() int
- func (f Format) GetNbStreams() int
- func (f Format) GetProbeScore() int
- func (f Format) GetSize() string
- func (f Format) GetTags() transcoder.Tags
 
- type Metadata
- type Options
- type Progress
- type Streams
- func (s Streams) GetAvgFrameRate() string
- func (s Streams) GetBitRate() string
- func (s Streams) GetChromaLocation() string
- func (s Streams) GetCodecLongName() string
- func (s Streams) GetCodecName() string
- func (s Streams) GetCodecTag() string
- func (s Streams) GetCodecTagString() string
- func (s Streams) GetCodecTimeBase() string
- func (s Streams) GetCodecType() string
- func (s Streams) GetCodedHeight() int
- func (s Streams) GetCodedWidth() int
- func (s Streams) GetDisplayAspectRatio() string
- func (s Streams) GetDisposition() transcoder.Disposition
- func (s Streams) GetDivxPacked() string
- func (s Streams) GetDuration() string
- func (s Streams) GetDurationTs() int
- func (s Streams) GetHasBFrames() int
- func (s Streams) GetHeight() int
- func (s Streams) GetID() string
- func (s Streams) GetIndex() int
- func (s Streams) GetLevel() int
- func (s Streams) GetPixFmt() string
- func (s Streams) GetProfile() string
- func (s Streams) GetQuarterSample() string
- func (s Streams) GetRFrameRrate() string
- func (s Streams) GetRefs() int
- func (s Streams) GetSampleAspectRatio() string
- func (s Streams) GetTimeBase() string
- func (s Streams) GetWidth() int
 
- type Tags
- type Transcoder
- func (t *Transcoder) GetMetadata() (transcoder.Metadata, error)
- func (t *Transcoder) Input(arg string) transcoder.Transcoder
- func (t *Transcoder) InputPipe(w *io.WriteCloser, r *io.ReadCloser) transcoder.Transcoder
- func (t *Transcoder) Output(arg string) transcoder.Transcoder
- func (t *Transcoder) OutputPipe(w *io.WriteCloser, r *io.ReadCloser) transcoder.Transcoder
- func (t *Transcoder) Start(opts transcoder.Options) (<-chan transcoder.Progress, error)
- func (t *Transcoder) WithAdditionalOptions(opts transcoder.Options) transcoder.Transcoder
- func (t *Transcoder) WithContext(ctx *context.Context) transcoder.Transcoder
- func (t *Transcoder) WithOptions(opts transcoder.Options) transcoder.Transcoder
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Disposition ¶
type Disposition struct {
	Default         int `json:"default"`
	Dub             int `json:"dub"`
	Original        int `json:"original"`
	Comment         int `json:"comment"`
	Lyrics          int `json:"lyrics"`
	Karaoke         int `json:"karaoke"`
	Forced          int `json:"forced"`
	HearingImpaired int `json:"hearing_impaired"`
	VisualImpaired  int `json:"visual_impaired"`
	CleanEffects    int `json:"clean_effects"`
}
    Disposition ...
func (Disposition) GetHearingImpaired ¶
func (d Disposition) GetHearingImpaired() int
GetHearingImpaired ...
func (Disposition) GetVisualImpaired ¶
func (d Disposition) GetVisualImpaired() int
GetVisualImpaired ...
type Format ¶
type Format struct {
	Filename       string
	NbStreams      int    `json:"nb_streams"`
	NbPrograms     int    `json:"nb_programs"`
	FormatName     string `json:"format_name"`
	FormatLongName string `json:"format_long_name"`
	Duration       string `json:"duration"`
	Size           string `json:"size"`
	BitRate        string `json:"bit_rate"`
	ProbeScore     int    `json:"probe_score"`
	Tags           Tags   `json:"tags"`
}
    Format ...
type Metadata ¶
Metadata ...
func (Metadata) GetStreams ¶
func (m Metadata) GetStreams() (streams []transcoder.Streams)
GetStreams ...
type Options ¶
type Options struct {
	Aspect                *string           `flag:"-aspect"`
	Resolution            *string           `flag:"-s"`
	VideoBitRate          *string           `flag:"-b:v"`
	VideoBitRateTolerance *int              `flag:"-bt"`
	VideoMaxBitRate       *int              `flag:"-maxrate"`
	VideoMinBitrate       *int              `flag:"-minrate"`
	VideoCodec            *string           `flag:"-c:v"`
	Vframes               *int              `flag:"-vframes"`
	FrameRate             *int              `flag:"-r"`
	AudioRate             *int              `flag:"-ar"`
	KeyframeInterval      *int              `flag:"-g"`
	AudioCodec            *string           `flag:"-c:a"`
	AudioBitrate          *string           `flag:"-ab"`
	AudioChannels         *int              `flag:"-ac"`
	AudioVariableBitrate  *bool             `flag:"-q:a"`
	BufferSize            *int              `flag:"-bufsize"`
	Threadset             *bool             `flag:"-threads"`
	Threads               *int              `flag:"-threads"`
	Preset                *string           `flag:"-preset"`
	Tune                  *string           `flag:"-tune"`
	AudioProfile          *string           `flag:"-profile:a"`
	VideoProfile          *string           `flag:"-profile:v"`
	Target                *string           `flag:"-target"`
	Duration              *string           `flag:"-t"`
	Qscale                *uint32           `flag:"-qscale"`
	Crf                   *uint32           `flag:"-crf"`
	Strict                *int              `flag:"-strict"`
	MuxDelay              *string           `flag:"-muxdelay"`
	SeekTime              *string           `flag:"-ss"`
	SeekUsingTimestamp    *bool             `flag:"-seek_timestamp"`
	MovFlags              *string           `flag:"-movflags"`
	HideBanner            *bool             `flag:"-hide_banner"`
	OutputFormat          *string           `flag:"-f"`
	CopyTs                *bool             `flag:"-copyts"`
	NativeFramerateInput  *bool             `flag:"-re"`
	InputInitialOffset    *string           `flag:"-itsoffset"`
	RtmpLive              *string           `flag:"-rtmp_live"`
	HlsPlaylistType       *string           `flag:"-hls_playlist_type"`
	HlsListSize           *int              `flag:"-hls_list_size"`
	HlsSegmentDuration    *int              `flag:"-hls_time"`
	HlsMasterPlaylistName *string           `flag:"-master_pl_name"`
	HlsSegmentFilename    *string           `flag:"-hls_segment_filename"`
	HTTPMethod            *string           `flag:"-method"`
	HTTPKeepAlive         *bool             `flag:"-multiple_requests"`
	Hwaccel               *string           `flag:"-hwaccel"`
	StreamIds             map[string]string `flag:"-streamid"`
	VideoFilter           *string           `flag:"-vf"`
	AudioFilter           *string           `flag:"-af"`
	SkipVideo             *bool             `flag:"-vn"`
	SkipAudio             *bool             `flag:"-an"`
	CompressionLevel      *int              `flag:"-compression_level"`
	MapMetadata           *string           `flag:"-map_metadata"`
	Metadata              map[string]string `flag:"-metadata"`
	EncryptionKey         *string           `flag:"-hls_key_info_file"`
	Bframe                *int              `flag:"-bf"`
	PixFmt                *string           `flag:"-pix_fmt"`
	WhiteListProtocols    []string          `flag:"-protocol_whitelist"`
	Overwrite             *bool             `flag:"-y"`
	ExtraArgs             map[string]interface{}
}
    Options defines allowed FFmpeg arguments
type Progress ¶
type Progress struct {
	FramesProcessed string
	CurrentTime     string
	CurrentBitrate  string
	Progress        float64
	Speed           string
}
    Progress ...
func (Progress) GetCurrentBitrate ¶
GetCurrentBitrate ...
func (Progress) GetFramesProcessed ¶
GetFramesProcessed ...
type Streams ¶
type Streams struct {
	Index              int
	ID                 string      `json:"id"`
	CodecName          string      `json:"codec_name"`
	CodecLongName      string      `json:"codec_long_name"`
	Profile            string      `json:"profile"`
	CodecType          string      `json:"codec_type"`
	CodecTimeBase      string      `json:"codec_time_base"`
	CodecTagString     string      `json:"codec_tag_string"`
	CodecTag           string      `json:"codec_tag"`
	Width              int         `json:"width"`
	Height             int         `json:"height"`
	CodedWidth         int         `json:"coded_width"`
	CodedHeight        int         `json:"coded_height"`
	HasBFrames         int         `json:"has_b_frames"`
	SampleAspectRatio  string      `json:"sample_aspect_ratio"`
	DisplayAspectRatio string      `json:"display_aspect_ratio"`
	PixFmt             string      `json:"pix_fmt"`
	Level              int         `json:"level"`
	ChromaLocation     string      `json:"chroma_location"`
	Refs               int         `json:"refs"`
	QuarterSample      string      `json:"quarter_sample"`
	DivxPacked         string      `json:"divx_packed"`
	RFrameRrate        string      `json:"r_frame_rate"`
	AvgFrameRate       string      `json:"avg_frame_rate"`
	TimeBase           string      `json:"time_base"`
	DurationTs         int         `json:"duration_ts"`
	Duration           string      `json:"duration"`
	Disposition        Disposition `json:"disposition"`
	BitRate            string      `json:"bit_rate"`
}
    Streams ...
func (Streams) GetChromaLocation ¶
GetChromaLocation ...
func (Streams) GetCodecTagString ¶
GetCodecTagString ...
func (Streams) GetDisplayAspectRatio ¶
GetDisplayAspectRatio ...
func (Streams) GetDisposition ¶
func (s Streams) GetDisposition() transcoder.Disposition
GetDisposition ...
func (Streams) GetSampleAspectRatio ¶
GetSampleAspectRatio ...
type Transcoder ¶
type Transcoder struct {
	// contains filtered or unexported fields
}
    Transcoder ...
func (*Transcoder) GetMetadata ¶
func (t *Transcoder) GetMetadata() (transcoder.Metadata, error)
GetMetadata Returns metadata for the specified input file
func (*Transcoder) InputPipe ¶
func (t *Transcoder) InputPipe(w *io.WriteCloser, r *io.ReadCloser) transcoder.Transcoder
InputPipe ...
func (*Transcoder) Output ¶
func (t *Transcoder) Output(arg string) transcoder.Transcoder
Output ...
func (*Transcoder) OutputPipe ¶
func (t *Transcoder) OutputPipe(w *io.WriteCloser, r *io.ReadCloser) transcoder.Transcoder
OutputPipe ...
func (*Transcoder) Start ¶
func (t *Transcoder) Start(opts transcoder.Options) (<-chan transcoder.Progress, error)
Start ...
func (*Transcoder) WithAdditionalOptions ¶
func (t *Transcoder) WithAdditionalOptions(opts transcoder.Options) transcoder.Transcoder
WithAdditionalOptions Appends an additional options object
func (*Transcoder) WithContext ¶
func (t *Transcoder) WithContext(ctx *context.Context) transcoder.Transcoder
WithContext is to be used on a Transcoder *before Starting* to pass in a context.Context object that can be used to kill a running transcoder process. Usage of this method is optional
func (*Transcoder) WithOptions ¶
func (t *Transcoder) WithOptions(opts transcoder.Options) transcoder.Transcoder
WithOptions Sets the options object