
GoAV:基于Golang的FFmpeg绑定库
5星
- 浏览量: 0
- 大小:None
- 文件类型:ZIP
简介:
GoAV是一款用Golang编写的FFmpeg接口绑定库,它简化了在Go项目中使用FFmpeg进行音视频处理的工作流程。
FFmpeg的Golang绑定提供了与ffmpeg视频音频操作库全面集成的功能。
使用方法如下:
导入github.com/giorgisiugo/av的相关包。
在main函数中进行以下操作:
```go
filename := sample.mp4
// 注册所有格式和编解码器
avformat.AVRegisterAll()
ctx := avformat.AvformatAllocContext()
// 打开视频文件
if avformat.AVFormatOpenInput(&ctx, filename, nil, nil) != 0 {
println(Error: Couldnt open file.)
return
}
```
全部评论 (0)
还没有任何评论哟~


