utils

package
v0.0.0-...-c4ee7f1 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2021 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalcScale

func CalcScale(w int, h int, dw int) string

CalcScale returns an ffmpeg video filter

func ClampPreset

func ClampPreset(w int, h int, dw int, dh int) bool

ClampPreset checks if the video fits the specified dimensions

func ParseFramerate

func ParseFramerate(fr string) float64

ParseFramerate converts an ffmpeg framerate string to a float32

func Rclone

func Rclone(subCommand string, arguments []string) string

Rclone executes an rclone subprocess given the inputs

Types

type GlobalVars

type GlobalVars struct {
	TidalPath        string `json="tidalPath"`
	TidalTmpPath     string `json="tidalTmpPath"`
	RcloneConfigPath string `json="rcloneConfigPath"`
}

GlobalVars are used to set sane application defaults

func Config

func Config() GlobalVars

Config contains the neccesary defaults for the application

type Preset

type Preset struct {
	Name string `json:"name"`
	Cmd  string `json:"cmd"`
}

Preset is a struct containing transcoder commands

type Presets

type Presets []Preset

Presets is an array of presets

func CalculatePresets

func CalculatePresets(inputPath string) Presets

CalculatePresets returns a json list of availible presets

func GetPresets

func GetPresets(v Video) Presets

GetPresets returns consumable presets

type Response

type Response struct {
	Presets []Preset `json:"presets"`
}

Response is what goes back to the caller

type Video

type Video struct {
	// contains filtered or unexported fields
}

Video is a slim ffprobe struct

func GetMetadata

func GetMetadata(url string) Video

GetMetadata uses ffprobe to return video metadata

Jump to

Keyboard shortcuts

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