v117f

package module
v0.0.0-...-caafbf8 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetVideoLength

func GetVideoLength(inVideoPath string) (int, error)

This checks the length of the video using the frames itself It doesn't check against the audio data embedded in it

func MakeV117

func MakeV117(inFramesLaptopDirectory, inFramesMobileDirectory, inAudioFile string,
	meta map[string]string, tmpVideoDirectory, outFilePath string) error

MakeV117 is good for videos with a lot of stills eg. lyrics videos with a single background. the inFramesDirectory must contain png files numbered from 1.png upwards the framerate must be stored in the **meta** as a string

func ReadAudio

func ReadAudio(inVideoPath string) ([]byte, error)

The audio is []bytes but it should contain 'mp3' audio

func ReadLaptopFrames

func ReadLaptopFrames(inVideoPath string, seconds int) ([]*image.Image, error)

Read frames for 1 seconds, starting from the 'seconds' parameter 'seconds' parameter starts from 0

func ReadMobileFrames

func ReadMobileFrames(inVideoPath string, seconds int) ([]*image.Image, error)

Read frames for 1 seconds, starting from the 'seconds' parameter 'seconds' parameter starts from 0

func UpdateMeta

func UpdateMeta(inVideoPath string, meta map[string]string, tmpVideoDirectory, outFilePath string) error

the framerate must be stored in the **meta** as a string

Types

type MakeVideoLumpTemp

type MakeVideoLumpTemp struct {
	UniqueFrames                []UniqueFrameDetails
	FramesPointerToUniqueFrames map[int]int
}

type UniqueFrameDetails

type UniqueFrameDetails struct {
	Hash             string
	FirstFrameNumber int
	Size             int
}

type VideoHeader

type VideoHeader struct {
	Meta               map[string]string
	LaptopUniqueFrames [][]int
	LaptopFrames       map[int]int
	MobileUniqueFrames [][]int
	MobileFrames       map[int]int
	AudioSize          int
	LaptopVideoSize    int
	MobileVideoSize    int
}

func ReadHeaderFromVideo

func ReadHeaderFromVideo(inVideoPath string) (VideoHeader, error)

Jump to

Keyboard shortcuts

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