Skip to content

Commit 5b3c6c7

Browse files
committed
Initial commit
0 parents  commit 5b3c6c7

3 files changed

Lines changed: 131 additions & 0 deletions

File tree

Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM gliderlabs/alpine:3.3
2+
MAINTAINER Bruno Celeste <bruno@coconut.co>
3+
4+
ENV FFMPEG_VERSION=3.0
5+
6+
WORKDIR /tmp/ffmpeg
7+
8+
RUN apk add --update build-base curl nasm tar bzip2 \
9+
zlib-dev openssl-dev yasm-dev lame-dev libogg-dev x264-dev libvpx-dev libvorbis-dev x265-dev freetype-dev libass-dev libwebp-dev rtmpdump-dev libtheora-dev opus-dev && \
10+
11+
DIR=$(mktemp -d) && cd ${DIR} && \
12+
13+
curl -s http://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.gz | tar zxvf - -C . && \
14+
cd ffmpeg-${FFMPEG_VERSION} && \
15+
./configure \
16+
--enable-version3 --enable-gpl --enable-nonfree --enable-small --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libvpx --enable-libtheora --enable-libvorbis --enable-libopus --enable-libass --enable-libwebp --enable-librtmp --enable-postproc --enable-avresample --enable-libfreetype --enable-openssl --disable-debug && \
17+
make && \
18+
make install && \
19+
make distclean && \
20+
21+
rm -rf ${DIR} && \
22+
apk del build-base curl tar bzip2 x264 openssl nasm && rm -rf /var/cache/apk/*
23+
24+
ENTRYPOINT ["ffmpeg"]

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Copyright (c) 2016 Bruno Celeste
2+
3+
MIT License
4+
5+
Permission is hereby granted, free of charge, to any person obtaining
6+
a copy of this software and associated documentation files (the
7+
"Software"), to deal in the Software without restriction, including
8+
without limitation the rights to use, copy, modify, merge, publish,
9+
distribute, sublicense, and/or sell copies of the Software, and to
10+
permit persons to whom the Software is furnished to do so, subject to
11+
the following conditions:
12+
13+
The above copyright notice and this permission notice shall be
14+
included in all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Minimal FFmpeg Docker image built on Alpine Linux
2+
3+
The image is only **106.7 MB** versus ~350 MB.
4+
5+
Current FFmpeg version: `3.0`
6+
7+
## FFmpeg Build Configuration
8+
9+
```
10+
ffmpeg version 3.0 Copyright (c) 2000-2016 the FFmpeg developers
11+
built with gcc 5.3.0 (Alpine 5.3.0)
12+
configuration: --enable-version3 --enable-gpl --enable-nonfree --enable-small --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libvpx --enable-libtheora --enable-libvorbis --enable-libopus --enable-libass --enable-libwebp --enable-librtmp --enable-postproc --enable-avresample --enable-libfreetype --enable-openssl --disable-debug
13+
libavutil 55. 17.103 / 55. 17.103
14+
libavcodec 57. 24.102 / 57. 24.102
15+
libavformat 57. 25.100 / 57. 25.100
16+
libavdevice 57. 0.101 / 57. 0.101
17+
libavfilter 6. 31.100 / 6. 31.100
18+
libavresample 3. 0. 0 / 3. 0. 0
19+
libswscale 4. 0.100 / 4. 0.100
20+
libswresample 2. 0.101 / 2. 0.101
21+
libpostproc 54. 0.100 / 54. 0.100
22+
23+
configuration:
24+
--enable-version3
25+
--enable-gpl
26+
--enable-nonfree
27+
--enable-small
28+
--enable-libmp3lame
29+
--enable-libx264
30+
--enable-libx265
31+
--enable-libvpx
32+
--enable-libtheora
33+
--enable-libvorbis
34+
--enable-libopus
35+
--enable-libass
36+
--enable-libwebp
37+
--enable-librtmp
38+
--enable-postproc
39+
--enable-avresample
40+
--enable-libfreetype
41+
--enable-openssl
42+
--disable-debug
43+
```
44+
45+
## Usage
46+
47+
```
48+
$ docker run opencoconut/ffmpeg -i http://files.coconut.co.s3.amazonaws.com/test.mp4 -f webm -c:v libvpx -c:a libvorbis - > test.webm
49+
```
50+
51+
To encode a local file, you can mount the current path on the Docker host's filesystem as a volume inside the container like this:
52+
53+
```
54+
$ docker run -v=`pwd`:/tmp/ffmpeg opencoconut/ffmpeg -i localfile.mp4 out.webm
55+
```
56+
57+
You can create an alias so you use the Docker container like if FFmpeg is installed on your computer:
58+
59+
In `~/.bashrc`:
60+
61+
```
62+
alias ffmpeg='docker run -v=`pwd`:/tmp/ffmpeg opencoconut/ffmpeg'
63+
```
64+
65+
Now we can execute FFmpeg with just:
66+
67+
```
68+
$ ffmpeg -buildconf
69+
```
70+
71+
## Contributing
72+
73+
1. Fork it
74+
2. Create your feature branch (`git checkout -b my-new-feature`)
75+
3. Commit your changes (`git commit -am 'Added some feature'`)
76+
4. Push to the branch (`git push origin my-new-feature`)
77+
5. Create new Pull Request
78+
79+
## Author
80+
81+
**Bruno Celeste**
82+
83+
* http://coconut.co
84+
* bruno@coconut.co
85+
* [@sadikzzz](http://twitter.com/sadikzzz)

0 commit comments

Comments
 (0)