-
-
Notifications
You must be signed in to change notification settings - Fork 47
/
readme-vars.yml
235 lines (192 loc) · 13.2 KB
/
readme-vars.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
---
# project information
project_name: ffmpeg
full_custom_readme: |
{% raw -%}
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)](https://linuxserver.io)
[![Blog](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=Blog)](https://blog.linuxserver.io "all the things you can do with our containers including How-To guides, opinions and much more!")
[![Discord](https://img.shields.io/discord/354974912613449730.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=Discord&logo=discord)](https://discord.gg/YWrKVTn "realtime support / chat with the community and the team.")
[![Discourse](https://img.shields.io/discourse/https/discourse.linuxserver.io/topics.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=discourse)](https://discourse.linuxserver.io "post on our community forum.")
[![Fleet](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=Fleet)](https://fleet.linuxserver.io "an online web interface which displays all of our maintained images.")
[![GitHub](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=GitHub&logo=github)](https://github.com/linuxserver "view the source for all of our repositories.")
[![Open Collective](https://img.shields.io/opencollective/all/linuxserver.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=Supporters&logo=open%20collective)](https://opencollective.com/linuxserver "please consider helping us by either donating or contributing to our budget")
The [LinuxServer.io](https://linuxserver.io) team brings you another container release featuring:
* regular and timely application updates
* easy user mappings (PGID, PUID)
* custom base image with s6 overlay
* weekly base OS updates with common layers across the entire LinuxServer.io ecosystem to minimise space usage, down time and bandwidth
* regular security updates
Find us at:
* [Blog](https://blog.linuxserver.io) - all the things you can do with our containers including How-To guides, opinions and much more!
* [Discord](https://discord.gg/YWrKVTn) - realtime support / chat with the community and the team.
* [Discourse](https://discourse.linuxserver.io) - post on our community forum.
* [Fleet](https://fleet.linuxserver.io) - an online web interface which displays all of our maintained images.
* [GitHub](https://github.com/linuxserver) - view the source for all of our repositories.
* [Open Collective](https://opencollective.com/linuxserver) - please consider helping us by either donating or contributing to our budget
# [linuxserver/ffmpeg](https://github.com/linuxserver/docker-ffmpeg)
[![Scarf.io pulls](https://scarf.sh/installs-badge/linuxserver-ci/linuxserver%2Fffmpeg?color=94398d&label-color=555555&logo-color=ffffff&style=for-the-badge&package-type=docker)](https://scarf.sh)
[![GitHub Stars](https://img.shields.io/github/stars/linuxserver/docker-ffmpeg.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/linuxserver/docker-ffmpeg)
[![GitHub Release](https://img.shields.io/github/release/linuxserver/docker-ffmpeg.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/linuxserver/docker-ffmpeg/releases)
[![GitHub Package Repository](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=GitHub%20Package&logo=github)](https://github.com/linuxserver/docker-ffmpeg/packages)
[![GitLab Container Registry](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=GitLab%20Registry&logo=gitlab)](https://gitlab.com/linuxserver.io/docker-ffmpeg/container_registry)
[![Quay.io](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=Quay.io)](https://quay.io/repository/linuxserver.io/ffmpeg)
[![Docker Pulls](https://img.shields.io/docker/pulls/linuxserver/ffmpeg.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=pulls&logo=docker)](https://hub.docker.com/r/linuxserver/ffmpeg)
[![Docker Stars](https://img.shields.io/docker/stars/linuxserver/ffmpeg.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=stars&logo=docker)](https://hub.docker.com/r/linuxserver/ffmpeg)
[![Jenkins Build](https://img.shields.io/jenkins/build?labelColor=555555&logoColor=ffffff&style=for-the-badge&jobUrl=https%3A%2F%2Fci.linuxserver.io%2Fjob%2FDocker-Pipeline-Builders%2Fjob%2Fdocker-ffmpeg%2Fjob%2Fmaster%2F&logo=jenkins)](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-ffmpeg/job/master/)
[FFmpeg](https://ffmpeg.org) - A complete, cross-platform solution to record, convert and stream audio and video.
[![ffmpeg](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/ffmpeg.png)](https://ffmpeg.org)
## Supported Architectures
We utilise the docker manifest for multi-platform awareness. More information is available from docker [here](https://distribution.github.io/distribution/spec/manifest-v2-2/#manifest-list) and our announcement [here](https://blog.linuxserver.io/2019/02/21/the-lsio-pipeline-project/).
Simply pulling `lscr.io/linuxserver/ffmpeg:latest` should retrieve the correct image for your arch, but you can also pull specific arch images via tags.
The architectures supported by this image are:
| Architecture | Available | Tag |
| :----: | :----: | ---- |
| x86-64 | ✅ | amd64-\<version tag\> |
| arm64 | ✅ | arm64v8-\<version tag\> |
| armhf | ❌ | |
## Usage
Unlike most of our container library this image is meant to be run ephemerally from the command line parsing user input for a custom FFmpeg command. You will need to understand some Docker basics to use this image and be familiar with how to construct an FFmpeg command. In the commands below we will be bind mounting our current working directory from the CLI to /config, the assumption is that input.mkv is in your current working directory.
If an input file is detected we will run FFmpeg as that user/group so the output file will match its permissions.
The image supports Hardware acceleration on x86 pay close attention to the variables for the examples below.
### Included Intel Drivers (latest versions compiled):
* iHD Driver: Supports gen8+ (default for Intel)
* i965 Driver: Supports gen5+ (for gen5-gen9.5 it can be enabled by setting env var `LIBVA_DRIVER_NAME=i965` in docker arguments)
* Libva (VAAPI): Supports gen5+ with i965 driver and gen8+ with iHD driver
* Qsv Dispatcher: OneVPL (supports both OneVPL and MSDK runtimes and should automatically switch)
* Qsv Runtime:
* OneVPL: Supports gen12+
* MSDK (libmfx): Supports gen8 - gen12
### Basic Transcode
```bash
docker run --rm -it \
-v $(pwd):/config \
linuxserver/ffmpeg \
-i /config/input.mkv \
-c:v libx264 \
-b:v 4M \
-vf scale=1280:720 \
-c:a copy \
/config/output.mkv
```
### Hardware accelerated (VAAPI) ([click for more info](https://trac.ffmpeg.org/wiki/Hardware/VAAPI))
```bash
docker run --rm -it \
--device=/dev/dri:/dev/dri \
-v $(pwd):/config \
linuxserver/ffmpeg \
-vaapi_device /dev/dri/renderD128 \
-i /config/input.mkv \
-c:v h264_vaapi \
-b:v 4M \
-vf 'format=nv12|vaapi,hwupload,scale_vaapi=w=1280:h=720' \
-c:a copy \
/config/output.mkv
```
### Hardware accelerated (QSV) ([click for more info](https://trac.ffmpeg.org/wiki/Hardware/QuickSync))
```bash
docker run --rm -it \
--device=/dev/dri:/dev/dri \
-v $(pwd):/config \
linuxserver/ffmpeg \
-hwaccel qsv \
-c:v h264_qsv \
-i /config/input.mkv \
-c:v h264_qsv \
-global_quality 25 \
/config/output.mkv
```
### Nvidia Hardware accelerated ([click for more info](https://trac.ffmpeg.org/wiki/HWAccelIntro#CUDANVENCNVDEC))
Nvidia support __requires__ [Nvidia container toolkit](https://github.com/NVIDIA/nvidia-container-toolkit) and the Nvidia drivers installed on the host.
```bash
docker run --rm -it \
--runtime=nvidia \
-v $(pwd):/config \
linuxserver/ffmpeg \
-hwaccel nvdec \
-i /config/input.mkv \
-c:v h264_nvenc \
-b:v 4M \
-vf scale=1280:720 \
-c:a copy \
/config/output.mkv
```
### Vulkan support
Vulkan support has been added to x86_64 (tested with Intel and AMD iGPU) ([click for more info](https://trac.ffmpeg.org/wiki/HWAccelIntro#Vulkan)).
```bash
docker run --rm -it \
--device=/dev/dri:/dev/dri \
-v $(pwd):/config \
-e ANV_VIDEO_DECODE=1 \
linuxserver/ffmpeg \
-init_hw_device "vulkan=vk:0" \
-hwaccel vulkan \
-hwaccel_output_format vulkan \
-i /config/input.mkv \
-f null - -benchmark
```
#### Vulkan supports three drivers
* ANV: To enable for Intel, set the env var `ANV_VIDEO_DECODE=1`
* RADV: To enable on AMD, set the env var `RADV_PERFTEST=video_decode`
* NVIDIA: To enable on Nvidia, install Nvidia Vulkan Beta drivers on the host per [this article](https://lynne.ee/vulkan-video-decoding.html#driver-support)
## Building locally
If you want to make local modifications to these images for development purposes or just to customize the logic:
```bash
git clone https://github.com/linuxserver/docker-ffmpeg.git
cd docker-ffmpeg
docker build \
--no-cache \
--pull \
-t lscr.io/linuxserver/docker-ffmpeg:latest .
```
The ARM variants can be built on x86_64 hardware using `multiarch/qemu-user-static`
```bash
docker run --rm --privileged multiarch/qemu-user-static:register --reset
```
Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64`.
## Versions
* **26.11.24:** - Bump libaom, mesa, rist, srt and libx265.
* **07.11.24:** - Bump harfbuzz, Intel drivers and libs, libdav1d, mesa, svtav1, vpx, vulkan sdk and vvenc.
* **05.10.24:** - Add support for libvvenc on aarch64. Bump mesa.
* **30.09.24:** - Bump ffmpeg for 7.1. Add support for libvvenc (amd64 only) and liblc3. Bump libfribidi and libharfbuzz.
* **24.09.24:** - Let ffmpeg terminate gracefully on docker stop/restart. Bump libharfbuzz, libpng, mesa, shaderc and libx265.
* **09.09.24:** - Add libzmq.
* **31.08.24:** - Bump libaom, libdrm, libvpl, mesa and svtav1. Enable nvdec/nvenc on arm64 (untested).
* **17.08.24:** - Bump ffmpeg, freetype, libdovi and mesa.
* **14.08.24:** - Add SRT and libRIST.
* **01.08.24:** - Add libdav1d. Bump libharfbuzz, various Intel drivers and libs, libass, libdrm, libplacebo, libva, mesa, svtav1, and vulkan sdk.
* **21.06.24:** - Bump mesa and libaom. Update lib path for rav1e.
* **08.06.24:** - Bump ffmpeg, fribidi, libdrm, mesa and vpx.
* **26.05.24:** - Rebase to Ubuntu Noble. Bump libass, libharfbuzz and vulkan-sdk.
* **22.05.24:** - Bump Mesa to 24.1.0.
* **20.05.24:** - Bump libsvtav1.
* **09.05.24:** - Bump libaom, fribidi, kvazaar, various Intel drivers and libs, Mesa, opus, shaderc, webp and x265.
* **11.04.24:** - Explicitly disable libdrm on aarch64, add new lib `libxcb-shm0`. Add quick test at the end of build.
* **10.04.24:** - Compile ffmpeg with `libfribidi`, `libharfbuzz` and `libfontconfig`, compile libharfbuzz.
* **05.04.24:** - Bump ffmpeg to 7.0, bump libdovi, libva, mesa and vulkan-sdk.
* **16.03.24:** - Bump libaom, mesa, openjpeg, opus, shaderc and svtav1.
* **11.02.24:** - Add Zimg support.
* **09.02.24:** - Bump ffmpeg to 6.1.1, bump other deps.
* **08.02.24:** - Enable cuda-llvm, clean up rustc.
* **01.02.24:** - Bump Mesa to v24.
* **21.01.24:** - Add alsa support.
* **18.01.24:** - Let the wrapper pass the ffmpeg exit code to docker run. Bump various libs.
* **01.01.24:** - Add rav1e support. Bump libaom, fdkaac, libdrm, libvmaf, libvpl, mesa and svt-av1.
* **06.12.23:** - Add libplacebo and libdobi to x86_64.
* **05.12.23:** - Bump Mesa. Fix vdpau. Fix AMD VAAPI.
* **25.11.23:** - Compile Mesa from source. Add proper Vulkan support (env var `ENABLE_VULKAN=true` no longer needed)(tested with Intel).
* **22.11.23:** - Add shaderc and (preliminary) Vulkan support (via env var `ENABLE_VULKAN=true`) to x86_64. Bump Intel drivers and other libs.
* **13.11.23:** - Bump FFmpeg to 6.1.
* **02.11.23:** - Remove `--enable-small` from ffmpeg build options to add back some features.
* **05.10.23:** - Add support for SVT-AV1. Update various libraries.
* **16.08.23:** - Added support for WebP formats.
* **11.08.23:** - Add optional i965 driver for gen5+ support.
* **14.06.23:** - Switch to latest iHD for Intel, add qsv support.
* **13.06.23:** - Bump to 6.0, update shared libraries, deprecate armhf, combine bin stage.
* **14.12.22:** - Rebase to Jammy, bump to 5.1.2.
* **19.06.22:** - Rebase to Focal.
* **26.08.21:** - Add support for libOpenCL.
* **01.07.21:** - Bump to 4.4.
* **17.06.20:** - Bump to 4.3.
* **16.06.20:** - Add support for libvmaf.
* **01.08.19:** - Initial release.
{%- endraw %}