Golang bindings for FFmpeg (This repository is no longer maintained)
Golang bindings for FFmpeg (This repository is no longer maintained)
This repository is no longer maintained.
Golang binding for FFmpeg
A comprehensive binding to the ffmpeg video/audio manipulation library.
import "github.com/giorgisio/goav/avformat"
func main() {
filename := "sample.mp4"
// Register all formats and codecs
avformat.AvRegisterAll()
ctx := avformat.AvformatAllocContext()
// Open video file
if avformat.AvformatOpenInput(&ctx, filename, nil, nil) != 0 {
log.Println("Error: Couldn't open file.")
return
}
// Retrieve stream information
if ctx.AvformatFindStreamInfo(nil) < 0 {
log.Println("Error: Couldn't find stream information.")
// Close input file and free context
ctx.AvformatCloseInput()
return
}
//...
}avcodec corresponds to the ffmpeg library: libavcodec [provides implementation of a wider range of codecs]avformat corresponds to the ffmpeg library: libavformat [implements streaming protocols, container formats and basic I/O access]avutil corresponds to the ffmpeg library: libavutil [includes hashers, decompressors and miscellaneous utility functions]avfilter corresponds to the ffmpeg library: libavfilter [provides a mean to alter decoded Audio and Video through chain of filters]avdevice corresponds to the ffmpeg library: libavdevice [provides an abstraction to access capture and playback devices]swresample corresponds to the ffmpeg library: libswresample [implements audio mixing and resampling routines]swscale corresponds to the ffmpeg library: libswscale [implements color conversion and scaling routines]…go get github.com/giorgisio/goav
Coding examples are available in the examples/ directory.
This library is under the MIT License
No open issues yet, or sync has not completed.