golibav

package module
v0.0.0-...-1776ede Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2019 License: MIT Imports: 0 Imported by: 0

README

go-libav

License GoDoc Build Status Coverage

Go language bindings for ffmpeg libraries.

This is still a work in progress. This package still lacks a lot of the libav's functionality. Please expect many additions/changes in the future.

Why

I am aware of other Go language bindings for ffmpeg. The reason I decided to build go-libav was because I wanted to have:

  • A more Object-Oriented Programming approach.
  • A more Go-like approach to error handling.
  • Easier garbage collection.

Installation

First, install ffmpeg 3.x libraries on your system.

If you need ffmpeg2.x support, use ffmpeg2 branch (deprecated).

Then, open the terminal and install the following packages:

go get -u github.com/mgr9525/go-libav/avcodec
go get -u github.com/mgr9525/go-libav/avfilter
go get -u github.com/mgr9525/go-libav/avformat
go get -u github.com/mgr9525/go-libav/avutil

Documentation

For advanced usage, make sure to check the following documentation:

Examples

Please check here for examples.

FFmpeg versions

This library supports multiple versions of FFmpeg 3.x, to build, use

go build -tags ffmpeg33
go test -tags ffmpeg33
go run -tags ffmpeg33 examples/mediainfo/mediainfo.go

Use ffmpeg30 for FFmpeg 3.0 API, ffmpeg33 for FFmpeg 3.3 API.

Contribute

Found a bug? Want to contribute and add a new feature?

Please fork this project and send me a pull request!

License

go-libav is licensed under the MIT license:

www.opensource.org/licenses/MIT

Copyright (c) 2015 Mario Freitas. See LICENSE for further details.

libav_test

need env:

CGO_CFLAGS=-I{ffmpegPath}/include;
CGO_LDFLAGS=-L{ffmpegPath}/bin -lavcodec-57 -lavdevice-57 -lavfilter-6 -lavformat-57 -lavutil-55 -lpostproc-54 -lswresample-2 -lswscale-4

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
In this example, we show a very simplistic way of transcoding the frames of the first video stream of an input file.
In this example, we show a very simplistic way of transcoding the frames of the first video stream of an input file.

Jump to

Keyboard shortcuts

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