animeutl

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: MulanPSL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckMkvMVCode

func CheckMkvMVCode(fileName string) error

CheckMkvMVCode 检查编码对不对

func CheckMkvMVList

func CheckMkvMVList(mvNameList []string) ([]string, error)

func GetProbeCode

func GetProbeCode(fileName string) (string, string, error)

Types

type AudioCodeType

type AudioCodeType string
const (
	AudioCodeTypeFLAC   AudioCodeType = "FLAC"
	AudioCodeTypeAAC    AudioCodeType = "AAC"
	AudioCodeTypeOPUS   AudioCodeType = "OPUS"
	AudioCodeTypeTrueHD AudioCodeType = "TrueHD"
	AudioCodeTypeDTS    AudioCodeType = "DTS"
	AudioCodeTypeAC3    AudioCodeType = "AC3"
	AudioCodeTypeALAC   AudioCodeType = "ALAC"
)

type MVType

type MVType string
const (
	MVTypeED MVType = "ED"
	MVTypeOP MVType = "OP"
	MVTypeMV MVType = "MV"
	MVTypePV MVType = "PV"
	MVTypeCM MVType = "CM"
	MVTypeSP MVType = "SP"
)

type MkvMVNameInfo

type MkvMVNameInfo struct {
	FullName        string
	AnimeName       string
	MVType          MVType
	Number          *int64
	NumberLength    int
	SubNumber       *int64
	SubNumberLength int
	//Season    *int
	//Episode   *int
	SongName     string
	Source       string
	VideoCodeStr string
	AudioCodeStr string
}

func GetMkvMVNameInfo

func GetMkvMVNameInfo(name string) (*MkvMVNameInfo, error)

GetMkvMVNameInfo 根据名字获取信息

func (*MkvMVNameInfo) GetNumber

func (mv *MkvMVNameInfo) GetNumber() int64

func (*MkvMVNameInfo) GetSubNumber

func (mv *MkvMVNameInfo) GetSubNumber() int64

type ProbeResult

type ProbeResult struct {
	Streams []struct {
		CodecName     string `json:"codec_name"`
		CodecLongName string `json:"codec_long_name"`
		CodecType     string `json:"codec_type"`
		Height        int    `json:"height"`
		Width         int    `json:"width"`
		AvgFrameRate  string `json:"avg_frame_rate"`
		Duration      string `json:"duration"`
		Tags          struct {
			Mimetype string `json:"mimetype"`
			DURATION string `json:"DURATION"`
		} `json:"tags"`
	} `json:"streams"`
	Chapters []struct {
		Id int64 `json:"id"`
	} `json:"chapters"`
	Format struct {
		Duration string `json:"duration"`
	} `json:"format"`
}

func GetProbe

func GetProbe(fileName string) (*ProbeResult, error)

GetProbe 获取视频编码信息

func (*ProbeResult) GetVideoDuration

func (p *ProbeResult) GetVideoDuration() (float64, error)

func (*ProbeResult) GetVideoFrameRate

func (p *ProbeResult) GetVideoFrameRate() string

type VideoCodeType

type VideoCodeType string
const (
	VideoCodeTypeHEVC VideoCodeType = "HEVC"
	VideoCodeTypeAVC  VideoCodeType = "AVC"
	VideoCodeTypeVP9  VideoCodeType = "VP9"
	VideoCodeTypeAV1  VideoCodeType = "AV1"
)

type VideoFpsType

type VideoFpsType string
const (
	VideoFpsTypeNormal VideoFpsType = ""
	VideoFpsType60     VideoFpsType = "60FPS"
)

type VideoResolutionType

type VideoResolutionType string
const (
	VideoResolutionTypeNormal VideoResolutionType = ""
	VideoResolutionType2K     VideoResolutionType = "2K"
	VideoResolutionType4K     VideoResolutionType = "4K"
)

Jump to

Keyboard shortcuts

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