Documentation ¶
Index ¶
- func DebugImage(scene Scene, fps int)
- func EDL(scene Scene) []byte
- func M3U(scene Scene, filename string) []byte
- func NewReader(ctx context.Context, r io.Reader) io.Reader
- func ProfileAndTrace() (stopCpuFunc func(), stopTraceFunc func(), err error)
- type Config
- type HashExtractor
- type HashFunc
- type Metadata
- type Scene
- type Similarity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DebugImage ¶
func ProfileAndTrace ¶
func ProfileAndTrace() (stopCpuFunc func(), stopTraceFunc func(), err error)
Types ¶
type Config ¶
type HashExtractor ¶
type HashExtractor struct { HashFunc HashFunc FPS int WorkerCount int // contains filtered or unexported fields }
func NewExtractor ¶
func NewExtractor(f *HashFunc, fps int, workers int) *HashExtractor
type HashFunc ¶
type HashFunc func(image.Image) (*goimagehash.ImageHash, error)
var ( HashDifference HashFunc = goimagehash.DifferenceHash HashPerception HashFunc = goimagehash.PerceptionHash HashAverage HashFunc = goimagehash.AverageHash )
type Metadata ¶
type Metadata struct { Filename string Width int `json:"width"` Height int `json:"height"` PixelFormat string `json:"pix_fmt"` FrameRate float64 Duration time.Duration }
func ExtractMetadata ¶
func (*Metadata) UnmarshalJSON ¶
type Scene ¶
type Scene struct { Start time.Duration End time.Duration Similarity Similarity }
func FindLongestScene ¶
func FindLongestScene(source, target []*goimagehash.ImageHash, tolerance int, duration time.Duration) (Scene, error)
FindLongestScene returns the longest matching scene between two TODO Return hash frames of the intro in the scene
type Similarity ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.