Giter VIP home page Giter VIP logo

ffmpeg-static's Introduction

FFmpeg static build

STATUS: community-supported

Three scripts to make a static build of ffmpeg with all the latest codecs (webm + h264).

Just follow the instructions below. Once you have the build dependencies, run ./build.sh, wait and you should get the ffmpeg binary in target/bin

Build dependencies

# Debian & Ubuntu
$ apt-get install build-essential curl tar libass-dev libtheora-dev libvorbis-dev libtool cmake automake autoconf

# OS X
# install XCode, it can be found at http://developer.apple.com/
# (apple login needed)
# <FIXME???>

Build & "install"

$ ./build.sh [-j <jobs>] [-B] [-d]
# ... wait ...
# binaries can be found in ./target/bin/

Ubuntu users can download dependencies and and install in one command:

$ sudo ./build-ubuntu.sh

If you have built ffmpeg before with build.sh, the default behaviour is to keep the previous configuration. If you would like to reconfigure and rebuild all packages, use the -B flag. -d flag will only download and unpack the dependencies but not build.

NOTE: If you're going to use the h264 presets, make sure to copy them along the binaries. For ease, you can put them in your home folder like this:

$ mkdir ~/.ffmpeg
$ cp ./target/share/ffmpeg/*.ffpreset ~/.ffmpeg

Build in docker

$ docker build -t ffmpeg-static .
$ docker run -it ffmpeg-static
$ ./build.sh [-j <jobs>] [-B] [-d]

The binaries will be created in /ffmpeg-static/bin directory. Method of getting them out of the Docker container is up to you. /ffmpeg-static is a Docker volume.

Debug

On the top-level of the project, run:

$ . env.source

You can then enter the source folders and make the compilation yourself

$ cd build/ffmpeg-*
$ ./configure --prefix=$TARGET_DIR #...
# ...

Remaining links

I'm not sure it's a good idea to statically link those, but it probably means the executable won't work across distributions or even across releases.

# On Ubuntu 10.04:
$ ldd ./target/bin/ffmpeg 
not a dynamic executable

# on OSX 10.6.4:
$ otool -L ffmpeg 
ffmpeg:
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.0)

Community, bugs and reports

This repository is community-supported. If you make a useful PR then you will be added as a contributor to the repo. All changes are assumed to be licensed under the same license as the project (ISC).

As a contributor you can do whatever you want. Help maintain the scripts, upgrade dependencies and merge other people's PRs. Just be responsible and make an issue if you want to introduce bigger changes so we can discuss them beforehand.

TODO

  • Add some tests to check that video output is correctly generated this would help upgrading the package without too much work
  • OSX's xvidcore does not detect yasm correctly
  • remove remaining libs (?)

Related projects

License

This project is licensed under the ISC. See the LICENSE file for the legalities.

ffmpeg-static's People

Contributors

aarnaud avatar albertz avatar amnonbb avatar andreipoe avatar brianredbeard avatar d4rky-pl avatar ealasu avatar emcgee avatar eric1234 avatar fstab avatar gjedeer avatar jeanphix avatar kg7x avatar michalliu avatar sethcalkins avatar silex avatar zalewa avatar zimbatm avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.