Skip to content

Commit 0a173bc

Browse files
committed
Merge branch 'AkashiSN-master'
2 parents 30ccaaf + c367d16 commit 0a173bc

File tree

6 files changed

+193
-115
lines changed

6 files changed

+193
-115
lines changed

.dockerignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
packages/
2+
workspace/

.travis.yml

+34-13
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,39 @@
1-
language: c
1+
language: shell
22

3-
matrix:
3+
os: linux
4+
dist: focal
5+
6+
jobs:
47
include:
5-
- os: linux
6-
dist: xenial
8+
- name: native build in linux
9+
before_install:
10+
- sudo apt-get update -qq
11+
- sudo apt-get install -qq build-essential curl ca-certificates libz-dev
12+
script:
13+
- while sleep 300; do echo "=====[ $SECONDS seconds still running ]====="; done &
14+
- SKIPINSTALL=yes VERBOSE=yes ./build-ffmpeg --build
15+
- kill %1
16+
after_script:
17+
- ./build-ffmpeg --cleanup
718

8-
before_install:
9-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update -qq; fi
10-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -qq build-essential curl; fi
19+
- name: native build in osx
20+
os: osx
21+
osx_image: xcode12.2
22+
script:
23+
- while sleep 300; do echo "=====[ $SECONDS seconds still running ]====="; done &
24+
- SKIPINSTALL=yes VERBOSE=yes ./build-ffmpeg --build
25+
- kill %1
26+
after_script:
27+
- ./build-ffmpeg --cleanup
1128

12-
script:
13-
- while sleep 300; do echo "=====[ $SECONDS seconds still running ]====="; done &
14-
- SKIPINSTALL=yes VERBOSE=yes ./build-ffmpeg --build
15-
- kill %1
29+
- name: build in docker
30+
script:
31+
- docker build -t ffmpeg:ubuntu -f Dockerfile .
32+
after_script:
33+
- docker run --rm ffmpeg:ubuntu
1634

17-
after_script:
18-
- ./build-ffmpeg --cleanup
35+
- name: build in docker with cuda
36+
script:
37+
- docker build -t ffmpeg:cuda -f cuda-ubuntu.dockerfile .
38+
after_script:
39+
- docker run --rm ffmpeg:cuda

Dockerfile

+12-7
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
1-
FROM ubuntu:20.04
1+
FROM ubuntu:20.04 AS build
22

33
RUN apt-get update \
4-
&& apt-get -y --no-install-recommends install build-essential curl g++ ca-certificates libz-dev \
4+
&& apt-get -y --no-install-recommends install build-essential curl ca-certificates libz-dev \
55
&& apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* \
66
&& update-ca-certificates
77

88
WORKDIR /app
99
COPY ./build-ffmpeg /app/build-ffmpeg
1010

11-
RUN AUTOINSTALL=yes /app/build-ffmpeg --build
12-
RUN cp /app/workspace/bin/ffmpeg /usr/bin/ffmpeg
13-
RUN cp /app/workspace/bin/ffprobe /usr/bin/ffprobe
14-
RUN /app/build-ffmpeg --cleanup
11+
RUN SKIPINSTALL=yes /app/build-ffmpeg --build
12+
13+
FROM ubuntu:20.04
14+
15+
COPY --from=build /app/workspace/bin/ffmpeg /usr/bin/ffmpeg
16+
COPY --from=build /app/workspace/bin/ffprobe /usr/bin/ffprobe
17+
18+
RUN ldd /usr/bin/ffmpeg
19+
RUN ldd /usr/bin/ffprobe
1520

1621
CMD ["--help"]
17-
ENTRYPOINT ["/usr/bin/ffmpeg"]
22+
ENTRYPOINT ["/usr/bin/ffmpeg"]

README.md

+19-10
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ build-ffmpeg
99
The FFmpeg build script provides an easy way to build a static FFmpeg on **OSX** and **Linux** with **non-free codecs** included.
1010

1111

12-
[![How-To build FFmpeg on MacOS](http://img.youtube.com/vi/Z9p3mM757cM/0.jpg)](http://www.youtube.com/watch?v=Z9p3mM757cM "How-To build FFmpeg on OSX")
12+
[![How-To build FFmpeg on MacOS](https://img.youtube.com/vi/Z9p3mM757cM/0.jpg)](https://www.youtube.com/watch?v=Z9p3mM757cM "How-To build FFmpeg on OSX")
1313

1414
*Youtube: How-To build and install FFmpeg on MacOS*
1515

1616
## Disclaimer
17-
Use this script at your own risk. I maintain this script in my spare time.
17+
Use this script at your own risk. I maintain this script in my spare time.
1818
Please do not file bug reports for systems other than Debian 10 and macOS 10.15.x
1919
because I don't have the resources and the time to maintain other systems.
2020

@@ -23,7 +23,7 @@ because I don't have the resources and the time to maintain other systems.
2323
* `x264`: H.264 (MPEG-4 AVC)
2424
* `x265`: H.265 Video Codec
2525
* `aom`: AV1 Video Codec (Experimental and very slow!)
26-
* `fdk_aac`: Fraunhofer FDK AAC Codec
26+
* `fdk_aac`: Fraunhofer FDK AAC Codec
2727
* `xvidcore`: MPEG-4 video coding standard
2828
* `VP8/VP9/webm`: VP8 / VP9 Video Codec for the WebM video file format
2929
* `mp3`: MPEG-1 or MPEG-2 Audio Layer III
@@ -45,7 +45,7 @@ because I don't have the resources and the time to maintain other systems.
4545
* VP9 `vp9_cuvid`
4646
* Encoders
4747
* H264 `nvenc nvenc_h264`
48-
* H265 `nvenc_hevc`
48+
* H265 `nvenc_hevc`
4949

5050
## Continuos Integration
5151
ffmpeg-build-script is rockstable. Every commit runs against Linux and MacOS with https://travis-ci.org just to make sure everything works as expected.
@@ -82,11 +82,20 @@ This command downloads the build script and automatically starts the build proce
8282

8383
### Run with Docker
8484

85+
#### Default - Without CUDA
8586
```bash
8687
git clone https://github.com/markus-perl/ffmpeg-build-script.git
8788
cd ffmpeg-build-script
8889
docker build --tag=ffmpeg .
89-
docker run ffmpeg -i http://files.coconut.co.s3.amazonaws.com/test.mp4 -f webm -c:v libvpx -c:a libvorbis - > /tmp/test.mp4
90+
docker run ffmpeg -i https://files.coconut.co.s3.amazonaws.com/test.mp4 -f webm -c:v libvpx -c:a libvorbis - > /tmp/test.mp4
91+
```
92+
93+
#### With CUDA
94+
```bash
95+
git clone https://github.com/markus-perl/ffmpeg-build-script.git
96+
cd ffmpeg-build-script
97+
docker build --tag=ffmpeg-cuda -f cuda-ubuntu.dockerfile .
98+
docker run ffmpeg-cuda -i https://files.coconut.co.s3.amazonaws.com/test.mp4 -f webm -c:v libvpx -c:a libvorbis - > /tmp/test.mp4
9099
```
91100

92101
### Common installation
@@ -101,11 +110,11 @@ cd ffmpeg-build-script
101110
### Cuda installation
102111

103112
CUDA is a parallel computing platform developed by NVIDIA.
104-
To be able to compile ffmpeg with CUDA support, you first need a compatible NVIDIA GPU.
113+
To be able to compile ffmpeg with CUDA support, you first need a compatible NVIDIA GPU.
105114
- Ubuntu: To install the CUDA toolkit on Ubuntu, simply run "sudo apt install nvidia-cuda-toolkit"
106-
- Other Linux distributions: Once you have the GPU and display driver installed, you can follow the
107-
[official instructions](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html)
108-
or [this blog](https://www.pugetsystems.com/labs/hpc/How-To-Install-CUDA-10-1-on-Ubuntu-19-04-1405/)
115+
- Other Linux distributions: Once you have the GPU and display driver installed, you can follow the
116+
[official instructions](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html)
117+
or [this blog](https://www.pugetsystems.com/labs/hpc/How-To-Install-CUDA-10-1-on-Ubuntu-19-04-1405/)
109118
to setup the CUDA toolkit.
110119

111120
Usage
@@ -263,7 +272,7 @@ Building done. The binary can be found here: /Volumes/Daten/dev/mac/ffmpeg-build
263272
Install the binary to your /usr/local/bin folder? [Y/n] y
264273
Password:
265274
```
266-
275+
267276

268277
Other Projects Of Mine
269278
------------

0 commit comments

Comments
 (0)