You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The FFmpeg build script provides an easy way to build a static FFmpeg on **OSX** and **Linux** with **non-free codecs** included.
9
+
The FFmpeg build script provides an easy way to build a static FFmpeg on **macOS** and **Linux** with **non-free codecs** included.
10
10
11
11
12
12
[](https://www.youtube.com/watch?v=Z9p3mM757cM"How-To build FFmpeg on OSX")
@@ -32,6 +32,8 @@ because I don't have the resources and the time to maintain other systems.
32
32
*`theora`: Free lossy video compression format
33
33
*`opus`: Lossy audio coding format
34
34
*`srt`: Secure Reliable Transport
35
+
36
+
### HardwareAccel
35
37
*`nv-codec`: [NVIDIA's GPU accelerated video codecs](https://devblogs.nvidia.com/nvidia-ffmpeg-transcoding-guide/). Installation is triggered only if CUDA installation is detected, follow [these](#Cuda-installation) instructions for installation. Supported codecs in nvcodec:
36
38
* Decoders
37
39
* H264 `h264_cuvid`
@@ -46,67 +48,133 @@ because I don't have the resources and the time to maintain other systems.
46
48
* Encoders
47
49
* H264 `nvenc_h264`
48
50
* H265 `nvenc_hevc`
51
+
*`vaapi`: [Video Acceleration API](https://trac.ffmpeg.org/wiki/Hardware/VAAPI). Installation is triggered only if libva driver installation is detected, follow [these](#Vaapi-installation) instructions for installation. Supported codecs in vaapi:
52
+
* Encoders
53
+
* H264 `h264_vaapi`
54
+
* H265 `hevc_vaapi`
55
+
* Motion JPEG `mjpeg_vaapi`
56
+
* MPEG2 video `mpeg2_vaapi`
57
+
* VP8 `vp8_vaapi`
58
+
* VP9 `vp9_vaapi`
59
+
49
60
50
61
## Continuos Integration
51
62
ffmpeg-build-script is rockstable. Every commit runs against Linux and MacOS with https://github.com/markus-perl/ffmpeg-build-script/actions just to make sure everything works as expected.
52
63
53
-
Requirements MacOS
54
-
------------
64
+
65
+
## Requirements
66
+
### MacOS
55
67
56
68
* XCode 10.x or greater
57
69
58
-
Requirements Linux
59
-
------------
70
+
###Linux
71
+
60
72
* Debian >= Buster, Ubuntu => Focal Fossa, other Distributions might work too
61
-
* build-essentialsinstalled:
73
+
* build-essentials, curl is required installed
62
74
63
-
```
75
+
```bash
64
76
# Debian and Ubuntu
65
-
$ sudo apt-get install build-essential curl g++
77
+
$ sudo apt install build-essential curl
66
78
67
79
# Fedora
68
-
$ sudo dnf install @development-tools
80
+
$ sudo dnf install @development-tools curl
69
81
```
70
82
71
-
Installation
72
-
------------
83
+
## Installation
73
84
74
-
### Quick install and run
85
+
### Quick install and run (macOS, Linux)
75
86
76
87
Open your command line and run (needs curl to be installed):
The main advantage of using Docker is the ability to reliably build without polluting the host environment. And you don't even have to install the CUDA SDK on your host!
106
+
107
+
If you are running below kind of operating system and having Docker version 19.03 or higher, this is your best option.
108
+
* Ubuntu >= 16.04 (16.04, 18.04, 20.04)
109
+
* Centos >= 7 (7, 8)
110
+
111
+
1. Enable Docker BuildKit
112
+
```bash
113
+
$ export DOCKER_BUILDKIT=1
114
+
```
115
+
116
+
2. Set the following DIST (`ubuntu` or `centos`) and VER (ubuntu: `16.04` , `18.04`, `20.04` or centos: `7`, `8`) environment variables in conjunction with your operating system.
4. Build an `export.dockerfile` that copies only what you need from the image you just built as follows. When running, move the library in the lib to a location where the linker can find it or set the `LD_LIBRARY_PATH`.
128
+
Since we have matched the operating system and version, it should work well with dynamic links. If it doesn't work, edit the `export.dockerfile` and copy the necessary libraries and try again.
If you use CUDA, Docker must be higher than 19.03.
160
+
Install the driver and `nvidia-docker2` from [here](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#installing-docker-ce).
161
+
You can perform hardware acceleration by GPU by running the following.
Note: Because of the NSS (Name Service Switch), glibc does not recommend static links.
131
210
```
132
211
@@ -135,6 +214,7 @@ Options:
135
214
See detail below: https://sourceware.org/glibc/wiki/FAQ#Even_statically_linked_programs_need_some_shared_libraries_which_is_not_acceptable_for_me.__What_can_I_do.3F
136
215
137
216
- The libnpp in the CUDA SDK cannot be statically linked.
0 commit comments