Versions in this module Expand all Collapse all v0 v0.0.1 Nov 27, 2023 Changes in this version + const FFLogDebug + const FFLogError + const FFLogFatal + const FFLogInfo + const FFLogPanic + const FFLogQuiet + const FFLogTrace + const FFLogVerbose + const FFLogWarning + const GOPIntraOnly + const GOPInvalid + const PixelFormatNV12 + const PixelFormatNV21 + const PixelFormatNone + const PixelFormatUYVY422 + const PixelFormatYUV420P + const PixelFormatYUV420P10BE + const PixelFormatYUV420P10LE + const PixelFormatYUV420P12BE + const PixelFormatYUV420P12LE + const PixelFormatYUV420P16BE + const PixelFormatYUV420P16LE + const PixelFormatYUV422P + const PixelFormatYUV422P10BE + const PixelFormatYUV422P10LE + const PixelFormatYUV422P12BE + const PixelFormatYUV422P12LE + const PixelFormatYUV422P16BE + const PixelFormatYUV422P16LE + const PixelFormatYUV444P + const PixelFormatYUV444P10BE + const PixelFormatYUV444P10LE + const PixelFormatYUV444P12BE + const PixelFormatYUV444P12LE + const PixelFormatYUV444P16BE + const PixelFormatYUV444P16LE + const PixelFormatYUYV422 + const SceneClassification + var AccelerationNameLookup = map[Acceleration]string + var DSceneAdultSoccer = SceneClassificationProfile + var DSceneViolence = SceneClassificationProfile + var DetectorClassIDLookup = map[string]int + var EncoderProfileLookup = map[string]Profile + var ErrCodecName = fmt.Errorf("unknown codec name") + var ErrDNNInitialize = errors.New("DetectorInitializationError") + var ErrEmptyData = errors.New("EmptyData") + var ErrProfName = fmt.Errorf("unknown VideoProfile profile name") + var ErrSignCompare = errors.New("InvalidSignData") + var ErrTranscoderClipConfig = errors.New("TranscoderInvalidClipConfig") + var ErrTranscoderDev = errors.New("TranscoderIncompatibleDevices") + var ErrTranscoderFmt = errors.New("TranscoderUnrecognizedFormat") + var ErrTranscoderGOP = errors.New("TranscoderInvalidGOP") + var ErrTranscoderHw = errors.New("TranscoderInvalidHardware") + var ErrTranscoderInp = errors.New("TranscoderInvalidInput") + var ErrTranscoderPixelformat = errors.New("TranscoderInvalidPixelformat") + var ErrTranscoderPrf = errors.New("TranscoderUnrecognizedProfile") + var ErrTranscoderRes = errors.New("TranscoderInvalidResolution") + var ErrTranscoderStp = errors.New("TranscoderStopped") + var ErrTranscoderVid = errors.New("TranscoderInvalidVideo") + var ErrVideoCompare = errors.New("InvalidVideoData") + var ErrorMap = error_map() + var ExtensionFormats = map[string]Format + var FfEncoderLookup = map[Acceleration]map[VideoCodec]string + var FfmpegNameToVideoCodec = map[string]VideoCodec + var FormatExtensions = map[Format]string + var LogTranscodeErrors = true + var NonRetryableErrs = non_retryable_errs() + var P144p25fps16x9 = VideoProfile + var P144p30fps16x9 = VideoProfile + var P240p25fps16x9 = VideoProfile + var P240p30fps16x9 = VideoProfile + var P240p30fps4x3 = VideoProfile + var P360p25fps16x9 = VideoProfile + var P360p30fps16x9 = VideoProfile + var P360p30fps4x3 = VideoProfile + var P576p25fps16x9 = VideoProfile + var P576p30fps16x9 = VideoProfile + var P720p25fps16x9 = VideoProfile + var P720p30fps16x9 = VideoProfile + var P720p30fps4x3 = VideoProfile + var P720p60fps16x9 = VideoProfile + var ProfileParameters = map[Profile]string + var SceneClassificationProfileLookup = map[string]SceneClassificationProfile + var VideoCodecName = map[VideoCodec]string + var VideoProfileLookup = map[string]VideoProfile + func CompareSignatureByBuffer(data1 []byte, data2 []byte) (bool, error) + func CompareSignatureByPath(fname1 string, fname2 string) (bool, error) + func CompareVideoByBuffer(data1 []byte, data2 []byte) (bool, error) + func CompareVideoByPath(fname1 string, fname2 string) (bool, error) + func DefaultProfileName(width int, height int, bitrate int) string + func FfmpegGetLogLevel() int + func FfmpegSetLogLevel(level int) + func GetCodecInfo(fname string) (CodecStatus, MediaFormatInfo, error) + func GetCodecInfoBytes(data []byte) (CodecStatus, MediaFormatInfo, error) + func HasZeroVideoFrameBytes(data []byte) (bool, error) + func InitFFmpeg() + func InitFFmpegWithLogLevel(level LogLevel) + func RTMPToHLS(localRTMPUrl string, outM3U8 string, tmpl string, seglen_secs string, ...) error + func Strerror(errnum int) string + func Transcode(input string, workDir string, ps []VideoProfile) error + func Transcode2(input *TranscodeOptionsIn, ps []TranscodeOptions) error + func VideoProfileResolution(p VideoProfile) (int, int, error) + func VideoProfileToVariantParams(p VideoProfile) m3u8.VariantParams + type Acceleration int + const Amd + const Netint + const Nvidia + const Software + type ByName []VideoProfile + func (a ByName) Len() int + func (a ByName) Less(i, j int) bool + func (a ByName) Swap(i, j int) + type ChromaSubsampling int + const ChromaSubsampling420 + const ChromaSubsampling422 + const ChromaSubsampling444 + type CodecStatus int + const CodecStatusInternalError + const CodecStatusMissing + const CodecStatusNeedsBypass + const CodecStatusOk + type CodingSizeLimit struct + HeightMax int + HeightMin int + WidthMax int + WidthMin int + func (l *CodingSizeLimit) Clamp(p *VideoProfile, format MediaFormatInfo) error + type ColorDepthBits int + const ColorDepth10Bit + const ColorDepth12Bit + const ColorDepth16Bit + const ColorDepth8Bit + type ComponentOptions struct + Name string + Opts map[string]string + type DetectData interface + Type func() DetectorType + type DetectorClass struct + ID int + Name string + type DetectorProfile interface + Type func() DetectorType + type DetectorType int + type Format int + const FormatMP4 + const FormatMPEGTS + const FormatNone + type JsonProfile struct + Bitrate int + ChromaFormat ChromaSubsampling + ColorDepth ColorDepthBits + Encoder string + FPS uint + FPSDen uint + GOP string + Height int + Name string + Profile string + Quality uint + Width int + type LogLevel C.enum_LPMSLogLevel + type MediaFormatInfo struct + Acodec string + Height int + PixFormat PixelFormat + Vcodec string + Width int + func (f *MediaFormatInfo) ScaledHeight(width int) int + func (f *MediaFormatInfo) ScaledWidth(height int) int + type MediaInfo struct + DetectData DetectData + Frames int + Pixels int64 + type PixelFormat struct + RawValue int + func (pixelFormat PixelFormat) Properties() (ChromaSubsampling, ColorDepthBits, error) + type Profile int + const ProfileH264Baseline + const ProfileH264ConstrainedHigh + const ProfileH264High + const ProfileH264Main + const ProfileNone + func EncoderProfileNameToValue(profile string) (Profile, error) + type SceneClassificationData map[int]float64 + func (scd SceneClassificationData) Type() DetectorType + type SceneClassificationProfile struct + Classes []DetectorClass + Input string + ModelPath string + Output string + SampleRate uint + func (p *SceneClassificationProfile) Type() DetectorType + type Size struct + H int + W int + func (s *Size) Valid(l *CodingSizeLimit) bool + type TranscodeOptions struct + Accel Acceleration + AudioEncoder ComponentOptions + CalcSign bool + Detector DetectorProfile + Device string + From time.Duration + Muxer ComponentOptions + Oname string + Profile VideoProfile + To time.Duration + VideoEncoder ComponentOptions + type TranscodeOptionsIn struct + Accel Acceleration + Device string + Fname string + Transmuxing bool + type TranscodeResults struct + Decoded MediaInfo + Encoded []MediaInfo + func Transcode3(input *TranscodeOptionsIn, ps []TranscodeOptions) (*TranscodeResults, error) + type Transcoder struct + func NewTranscoder() *Transcoder + func NewTranscoderWithDetector(detector DetectorProfile, deviceid string) (*Transcoder, error) + func (t *Transcoder) Discontinuity() + func (t *Transcoder) StopTranscoder() + func (t *Transcoder) Transcode(input *TranscodeOptionsIn, ps []TranscodeOptions) (*TranscodeResults, error) + type VideoCodec int + const H264 + const H265 + const VP8 + const VP9 + func CodecNameToValue(encoder string) (VideoCodec, error) + type VideoProfile struct + AspectRatio string + Bitrate string + ChromaFormat ChromaSubsampling + ColorDepth ColorDepthBits + Encoder VideoCodec + Format Format + Framerate uint + FramerateDen uint + GOP time.Duration + Name string + Profile Profile + Quality uint + Resolution string + func ParseProfiles(injson []byte) ([]VideoProfile, error) + func ParseProfilesFromJsonProfileArray(profiles []JsonProfile) ([]VideoProfile, error)