Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 6b3c272
Showing
13 changed files
with
5,337 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.DS_Store | ||
/fixtures | ||
coverage.txt | ||
coverage.html | ||
|
||
# Intellij | ||
/*.iml | ||
/.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
language: go | ||
|
||
go: | ||
- 1.4 | ||
- 1.5 | ||
- tip | ||
|
||
before_install: | ||
- go get -u golang.org/x/tools/cmd/cover | ||
- go get -u github.com/golang/lint/golint | ||
- go get -u golang.org/x/tools/cmd/vet | ||
- sudo apt-get update | ||
- sudo apt-get install -y build-essential yasm libfaac-dev libmp3lame-dev libtheora-dev libvorbis-dev libvpx-dev libx264-dev libxvidcore-dev | ||
- wget -O ffmpeg.tar.bz2 http://ffmpeg.org/releases/ffmpeg-2.8.3.tar.bz2 | ||
- mkdir ffmpeg && tar xvf ffmpeg.tar.bz2 -C ffmpeg --strip-components=1 && cd ffmpeg && ./configure --prefix=/usr/local --disable-debug --enable-pthreads --enable-nonfree --enable-gpl --disable-indev=jack --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libmp3lame --enable-openssl && make && sudo make install | ||
|
||
script: | ||
- cd $TRAVIS_BUILD_DIR | ||
- make | ||
|
||
after_success: | ||
- bash <(curl -s https://codecov.io/bash) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Copyright (c) 2015 Mario Freitas (imkira@gmail.com) | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
"Software"), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
PACKAGES=$(shell find * -path Godeps -prune -o -name *.go -print0 | xargs -0 -n1 dirname | sort --unique) | ||
|
||
.PHONY: all gofmt golint govet test clean | ||
|
||
all: gofmt golint govet test cover | ||
|
||
fixtures: | ||
mkdir -p fixtures | ||
cd fixtures && rm -f tmp.zip && curl -o tmp.zip https://support.apple.com/library/APPLE/APPLECARE_ALLGEOS/HT1425/sample_iPod.m4v.zip && unzip -x tmp.zip && rm -f tmp.zip | ||
cd fixtures && rm -f tmp.zip && curl -o tmp.zip https://support.apple.com/library/APPLE/APPLECARE_ALLGEOS/HT1425/sample_iTunes.mov.zip && unzip -x tmp.zip && rm -f tmp.zip | ||
cd fixtures && rm -f tmp.zip && curl -o tmp.zip https://support.apple.com/library/APPLE/APPLECARE_ALLGEOS/HT1425/sample_mpeg4.mp4.zip && unzip -x tmp.zip && rm -f tmp.zip | ||
|
||
gofmt: | ||
@for dir in $(PACKAGES); do gofmt -s=true -d=true -l=true $${dir}; done | ||
|
||
golint: | ||
@for dir in $(PACKAGES); do golint $${dir}; done | ||
|
||
govet: | ||
@for dir in $(PACKAGES); do go tool vet -all $${dir}; done | ||
|
||
test: fixtures | ||
rm -f coverage.txt | ||
@for dir in $(PACKAGES); do (cd $${dir} && go test -v -race -cpu=1,2,4 -coverprofile=coverage.txt -covermode=atomic); done | ||
@for dir in $(PACKAGES); do (if [ -f coverage.txt ]; then cat $${dir}/coverage.txt | tail -n +2 >> coverage.txt; else cp $${dir}/coverage.txt .; fi); done | ||
|
||
cover: | ||
go tool cover -html=coverage.txt -o coverage.html | ||
|
||
clean: | ||
rm -rf fixtures |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# go-libav | ||
|
||
[![License](http://img.shields.io/badge/license-MIT-red.svg?style=flat)](https://github.com/imkira/go-libav/blob/master/LICENSE.txt) | ||
[![GoDoc](https://godoc.org/github.com/imkira/go-libav?status.svg)](https://godoc.org/github.com/imkira/go-libav) | ||
[![Build | ||
Status](http://img.shields.io/travis/imkira/go-libav.svg?style=flat)](https://travis-ci.org/imkira/go-libav) | ||
[![Coverage](http://img.shields.io/codecov/c/github/imkira/go-libav.svg?style=flat)](https://codecov.io/github/imkira/go-libav) | ||
|
||
[Go](https://golang.org) language bindings for [ffmpeg](https://ffmpeg.org) | ||
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 libraries on your system. | ||
I have tested it with ffmpeg 2.6.4 and later. | ||
|
||
Then, open the terminal and install the following packages: | ||
|
||
``` | ||
go get -u github.com/imkira/go-libav/avcodec | ||
go get -u github.com/imkira/go-libav/avfilter | ||
go get -u github.com/imkira/go-libav/avformat | ||
go get -u github.com/imkira/go-libav/avutil | ||
``` | ||
|
||
# Documentation | ||
|
||
For advanced usage, make sure to check the | ||
[available documentation here](http://godoc.org/github.com/imkira/go-libav). | ||
|
||
# Examples | ||
|
||
Coming soon. | ||
|
||
# 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 | ||
|
||
Copyright (c) 2015 Mario Freitas. See | ||
[LICENSE](http://github.com/imkira/go-libav/blob/master/LICENSE) | ||
for further details. |
Oops, something went wrong.