mpcutils

package
v0.0.0-...-41adc92 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

MPC Utils has many utilities to process videos and images

Index

Constants

This section is empty.

Variables

View Source
var DefaultSteps int = 30 // Default number of steps to navigate through the video, this changes the total of screenshots that will be taken

Functions

func CheckErr

func CheckErr(err error)

checkErr checks and show errors

func ConfigFolder

func ConfigFolder() (configPath string)

HomeFolder finds home Folder for every OS

func CopyFile

func CopyFile(source string, destination string) (err error)

CopyFile copies files

func DownloadImage

func DownloadImage(url string, path string) error

DownloadImage downloads an image and saves it locally

func Exists

func Exists(file string) bool

Exists checks if file exists

func FileMD5

func FileMD5(source string) (md5sum string, err error)

get MD5 checksum of file

func GetLocalIP

func GetLocalIP() string

GetLocalIP gets the IP of LAN

func HomeFolder

func HomeFolder() (home string)

HomeFolder finds home Folder for every OS

func IsDir

func IsDir(file string) bool

IsDir checks if path is a directory

func IsVideo

func IsVideo(file string) (is bool, name string, extension string)

IsVideo checks if file has supported video extension

func MD5SumString

func MD5SumString(name string) string

Gets MD5 sum of a string

func ParseDate

func ParseDate(date string) (parsedDate time.Time, err error)

Parse Date parses multiple date formats

func SaveScreenshot

func SaveScreenshot(video string, time string, target string) (err error)

SaveScreenshot saves video screenshot as jpg file using ffmpeg

Types

type VideoInfo

type VideoInfo struct {
	Width    int
	Height   int
	Duration int
	Step     int
}

func FFProbe

func FFProbe(file string) (videoInfo VideoInfo, err error)

FFProbe gets video information using the ffprobe binary

Jump to

Keyboard shortcuts

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