Go Media Framework
Clone or download
Latest commit ec1401b Sep 7, 2018
Permalink
Failed to load latest commit information.
examples Example. Combine mp4 files into flv Sep 5, 2018
.gitignore Fix examples, add missing sample formats, add h264+aac example Aug 25, 2016
LICENSE fixes, frames interator, transcoder Apr 11, 2014
README.md send/recv api Jul 18, 2018
audiofifo.go An example program: Record audio by ALSA and write .wav file Mar 3, 2015
avio.go Minor changes Sep 3, 2018
cgoMemory.go go fmt Apr 2, 2015
cgoMemory_test.go go fmt Apr 2, 2015
codec.go Fix macro names. Jun 12, 2018
codecCtx.go Minor changes Sep 3, 2018
codecCtx_test.go go vet Jun 25, 2018
codecDesc.go tests dont pass Jul 15, 2014
codecDesc_test.go wip, savepoint, options Aug 27, 2018
codecParam.go CodecParameters Sep 7, 2018
codec_test.go wip, savepoint, options Aug 27, 2018
dict.go go vet Jun 25, 2018
format.go CodecParameters Sep 7, 2018
format_test.go wip, savepoint, options Aug 27, 2018
frame.go CodecParameters Sep 7, 2018
imgutils.go change imgutils.go to new memory management Aug 19, 2014
imgutils_test.go change imgutils.go to new memory management Aug 19, 2014
io.go go fmt Apr 2, 2015
options.go Minor changes Sep 3, 2018
options_test.go wip, savepoint, options Aug 27, 2018
packet.go CodecParameters Sep 7, 2018
packet_test.go send/recv api Jul 18, 2018
samplefmt.go change some file to new memory management Aug 19, 2014
stream.go CodecParameters Sep 7, 2018
stream_test.go change stream.go to new memory management Aug 20, 2014
swr.go An example: Record ALSA to an mp3. Mar 3, 2015
swr_test.go change some file to new memory management Aug 19, 2014
sws.go go fmt Apr 2, 2015
sws_test.go go fmt Apr 2, 2015
utils.go wip, savepoint, options Aug 27, 2018
utils_test.go project restruct Mar 13, 2014

README.md

Go FFmpeg Bindings

Installation

Prerequisites

Current master branch requires go 1.6.
Older versions available in branches go1.2 and go1.5.

Build

build lastest version of ffmpeg, obtained from https://github.com/FFmpeg/FFmpeg
There is one required option, which is disabled by default, you should turn on: --enable-shared

E.g.:

./configure --prefix=/usr/local/ffmpeg --enable-shared
make
make install

Add pkgconfig path:

export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/ffmpeg/lib/pkgconfig/

Ensure, that PKG_CONFIG_PATH contains path to ffmpeg's pkgconfig folder.

# check it by running
pkg-config --libs libavformat

It should print valid path to the avformat library.

Now, just run

go get github.com/3d0c/gmf
Other methods

This package uses pkg-config way to obtain flags, includes and libraries path, so if you have ffmpeg installed, just ensure, that your installation has them (pkgconfig/ folder with proper pc files).

Usage

Please see examples and tests.

Support and Contribution

If something doesn't work, just fix it. Do not hesitate to pull request.

Credits

I borrowed the name from project, abandoned on code.google.com/p/gmf. Original code is available here in intitial commit from 03 Apr 2013.