metadata

package
v0.0.0-...-f2ba6e3 Latest Latest
Warning

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

Go to latest
Published: May 12, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FFProbe

func FFProbe(path string, info os.FileInfo) error

FFProbe runs the FFProbe utility on the given file. It attempts to load the metadata from the metadata REST API

based on the filename

Movie filenames should follow the

func ParseDir

func ParseDir(dir string)

ParseDir walks the given directory in search of video files. Each video file encountered is saved to the metadata database

Types

type Format

type Format struct {
	FileName       string     `json:"filename"`
	NbStreams      int        `json:"nb_streams"`
	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_scrore"`
	Tags           FormatTags `json:"tags"`
}

Format contains information about a single file

type FormatTags

type FormatTags struct {
	Title string `json:"title"`
}

FormatTags gives extra info about the file format

type Metadata

type Metadata struct {
	Streams []Stream `json:"streams"`
	Format  Format   `json:"format"`
}

Metadata contains the results from running FFProbe on a single file

type MovieDBInfo

type MovieDBInfo struct {
	RowID   int    `json:"id"`
	URL     string `json:"url"`
	Poster  string `json:"poster"`
	Rating  string `json:"rating"`
	Summary string `json:"summary"`
	Title   string `json:"title"`
	Year    string `json:"year"`
}

MovieDBInfo represents a single movie returned from the Movie Metadata API

type Stream

type Stream struct {
	Index     int    `json:"index"`
	CodecName string `json:"codec_name"`
	Profile   string `json:"profile"`
	CodecType string `json:"codec_type"`
}

Stream contains information about a single stream

Jump to

Keyboard shortcuts

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