Documentation
¶
Index ¶
- Variables
- func ReEncode(tracker Int64Tracker, options ReEncodeOptions, output string) error
- func ReEncodeArgv(tracker Int64Tracker, throttle string, args ...string) error
- func Thumb(input string, timestamp time.Duration, output string, dim Dimensions) error
- func VideoDuration(to_probe string) (time.Duration, error)
- type Codec
- type CodecFlags
- type Dimensions
- type ETA
- type ETAAverage
- type ETAProgress
- type Int64Tracker
- type ReEncodeOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var AttachmentCodec = &enum_codec_type{"A", "Attachment Codec"}
View Source
var AudioCodec = &enum_codec_type{"A", "Audio Codec"}
View Source
var CodecLUT = func(input []Codec) map[string]Codec { output := map[string]Codec{} for _, codec := range input { output[codec.Name] = codec } return output }(Codecs)
View Source
var Codecs = func() []Codec { cmd := exec.Command(ffmpeg_filepath, "-codecs") var o bytes.Buffer cmd.Stdout = &o var e bytes.Buffer cmd.Stderr = &e run_res := blame.O0(cmd.Run()) if run_res != nil { panic(run_res.WithAdditionalContext(e.String())) } o_s := o.String() header_and_body := strings.Split(o_s, "-------\n") body := header_and_body[1] lines := strings.Split(strings.TrimSpace(body), "\n") output := []Codec{} for _, line := range lines { l := nanolex.New(line) if pp, _ := l.Peek(-1); pp == ' ' { l.Read() } flags := l.ReadUntil(' ') l.ReadUntilNot(' ') name := l.ReadUntil(' ') l.ReadUntilNot(' ') description := l.ReadUntilEOF() codec := Codec{} codec.Flags = codec_flags_from(flags) codec.Name = name codec.Description = description output = append(output, codec) } return output }()
View Source
var DataCodec = &enum_codec_type{"D", "Data Codec"}
View Source
var Presets = []string{"ultrafast", "superfast", "veryfast", "faster", "fast", "medium", "slow", "slower", "veryslow"}
TODO get this list dynamically
View Source
var SubtitleCodec = &enum_codec_type{"S", "Subtitle Codec"}
View Source
var VideoCodec = &enum_codec_type{"V", "Video Codec"}
Functions ¶
func ReEncode ¶
func ReEncode(tracker Int64Tracker, options ReEncodeOptions, output string) error
func ReEncodeArgv ¶
func ReEncodeArgv(tracker Int64Tracker, throttle string, args ...string) error
Types ¶
type Codec ¶
type Codec struct {
Flags CodecFlags
Name string
Description string
}
type CodecFlags ¶
type CodecFlags struct {
DecodingSupported bool
EncodingSupported bool
Type *enum_codec_type
IntraFrameOnly bool
Lossy bool
Losslss bool
}
both Lossy and Losslss can be true simultaneously because of individual codec config options
func (CodecFlags) MarshalJSON ¶
func (c CodecFlags) MarshalJSON() ([]byte, error)
func (CodecFlags) UnmarshalJSON ¶
func (c CodecFlags) UnmarshalJSON(b []byte) error
type Dimensions ¶
type ETA ¶
type ETA struct {
Average ETAAverage
Progress ETAProgress
}
type ETAAverage ¶
type Int64Tracker ¶
Click to show internal directories.
Click to hide internal directories.