• Stars
    star
    507
  • Rank 87,068 (Top 2 %)
  • Language
    Shell
  • License
    ISC License
  • Created over 14 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Scripts to build ffmpeg with all the deps statically (webm + h264 included)

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
# 1. install XCode
# 2. install XCode command line tools
# 3. install homebrew
# brew install openssl frei0r sdl2 wget

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.

More Repositories

1

socketmaster

Zero downtime restarts for your apps
Go
642
star
2

mdsh

`$ mdsh` # a markdown shell pre-processor
Rust
105
star
3

hostnames-and-usernames-to-reserve

Blacklist of hostnames and users all PaaS should use
HTML
62
star
4

shab

the bash templating language
Nix
52
star
5

h

faster shell navigation of projects
Ruby
32
star
6

wiki

This content has moved to Notion
HTML
31
star
7

nodejs-http-websocket

[OUTDATED] node.js WebSocket implementation on top of the stdlib HTTP server
JavaScript
20
star
8

home

@zimbatm's home
Nix
18
star
9

lines

structured logs for humans
14
star
10

lines-ruby

Lines - structured logs for humans - ruby edition
Ruby
13
star
11

vscode-devcontainer-nix

WIP: VSCode remote container for Nix-based environments
Dockerfile
12
star
12

nix-experiments

Nix
12
star
13

project-zomboid-demo

Mac and Linux adaptation of the demo runner. Buy their game !
Shell
11
star
14

publicsuffix.js

JavaScript version of the Public Suffix List
JavaScript
8
star
15

httputil2

What should really be in golang's net/http/httputil package.
Go
7
star
16

nixos-wiki-test

JavaScript
7
star
17

http-caching-proxy

HTTP to S3 cache hostable on Heroku
Go
7
star
18

HowDareYouApp

Angry french man
JavaScript
6
star
19

project-zomboid-launcher

Project Zomboid - Launcher for Linux and OSX
Ruby
5
star
20

namespace.rb

Experiment: Bringing namespaces to Ruby
Ruby
5
star
21

facts

Exploration of stack-based languages
Ruby
4
star
22

learn-to-walk-with-chef

Ruby
4
star
23

elm-gamepad

Elm wrapper around the W3C Gamepad API
JavaScript
4
star
24

logmail

Send your mails to syslog
Shell
4
star
25

project-euler-solutions

Some of my solutions to Project Euler
Haskell
4
star
26

nix-cpp-demo

Nix
4
star
27

putio-sync

A simple put.io fetcher script. Keep local copies of the files.
Ruby
4
star
28

nix-path

WIP: per project NIX_PATH
Nix
4
star
29

heretic-nix

Using __noChroot for good
Nix
4
star
30

mediasniff

Media capturing tool - Probably needs some work since node moves so fast
JavaScript
3
star
31

haproxy.vim

Vim Script
3
star
32

freepass

Per domain password generation tool [Unmaintained]
JavaScript
3
star
33

aerofs-docker

Docker container for the AeroFS Team Server
Shell
3
star
34

rake-plus

Delicious rake extensions
Ruby
3
star
35

camlistore-docker

Docker container for Camlistore
Shell
3
star
36

relative-require.rb

Relative require to the file loading in ruby
Ruby
2
star
37

mc.0x2a.im

Minecraft server configuration
Shell
2
star
38

go-secretvalue

Go
2
star
39

jsonpp

Command-line JSON pretty-printer
Ruby
2
star
40

docker-redis-server

Minimal docker redis-server image
Shell
2
star
41

browser-error-reporter

Be notified of all those nasty client errors
JavaScript
2
star
42

rb-pkg

Ruby packaging technology
Ruby
2
star
43

Allow-app

unlock your quarantined files
2
star
44

experiment-nix-build-diff

Nix
2
star
45

nixos-org

Prototype for a declarative NixOS organization
Nix
2
star
46

nix-snowflake-sticker

Sticker produced for NixCon 2022
2
star
47

miniby

Experiment: Markaby meets HTML5
Ruby
1
star
48

deb-beanstalkd

Lucid package of beanstald 1.4.6
Shell
1
star
49

methodchain

Replace methods in an existing class but keep super
Ruby
1
star
50

neuron

Testing neuron
Markdown
1
star
51

u-web

[HACK] micro MVC framework in a single ruby file
Ruby
1
star
52

flake-static

Nix
1
star
53

nix-benchmark

Trying to better understand where Nix spends its time
1
star
54

deb-redis

Updated lucid package of redis
C
1
star
55

deb-rubygems

Ubuntu package of 1.8.6 (using git-buildpackage)
Ruby
1
star
56

terraform-nixos-demo

Nix Friday episode: https://www.youtube.com/watch?v=LJ-blO8FLAY
HCL
1
star
57

u-log

U::Log - a different take on logging
Ruby
1
star
58

code-learn

Best way to learn is to code. Big pile of hacky code used to check-out some properties of languages
Ruby
1
star
59

monkeypatch

Safe(er) monkey patching in Ruby
Ruby
1
star
60

direnv-and-nix-talk

HTML
1
star
61

deb-mongodb

Lucid build of mongodb 1.6.5
C++
1
star