ffmpeg

package
v2.6.1 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2026 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const OpenError = "Error opening input:"

OpenError ffmpeg 打开文件失败

View Source
const (

	// ReleasePage ffmpeg 发布页地址
	ReleasePage = "https://github.tbedu.top/https://github.com/AmbitiousJun/ffmpeg-release/releases/latest/download"
)

Variables

This section is empty.

Functions

func AutoDownloadExec

func AutoDownloadExec(parentPath string) error

AutoDownloadExec 自动根据系统架构下载对应版本的 ffmpeg 到数据目录下

下载失败只会进行日志输出, 不会影响到程序运行

func ExecPath

func ExecPath() string

func ExtractMusicCover

func ExtractMusicCover(path string) ([]byte, error)

ExtractMusicCover 解析音乐海报

func GenSilentMP3Bytes

func GenSilentMP3Bytes(durationSec float64) ([]byte, error)

GenSilentMP3Bytes 使用 ffmpeg 生成静音 MP3 并返回字节内容

Types

type Info

type Info struct {
	Duration time.Duration
}

Info 记录文件元信息

func InspectInfo

func InspectInfo(path string) (Info, error)

InspectInfo 检查指定路径文件的元信息

type Music

type Music struct {
	Info
	Album   string // 专辑
	Artist  string // 艺术家
	Comment string // 备注
	Date    string // 发布日期
	Lyrics  string // 歌词
	Title   string // 标题
	Track   string // 轨道 (track/tracktotal)
	Disc    string // 光盘 (disc/disctotal)
	Genre   string // 流派
}

Music 记录音乐元信息

func InspectMusic

func InspectMusic(path string) (Music, error)

InspectMusic 检查指定音乐文件的元信息

Jump to

Keyboard shortcuts

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