-
-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathmeta.yaml
200 lines (189 loc) · 6.89 KB
/
meta.yaml
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
{% set version = "7.0.1" %} # semver: (x.y.z)
{% set x,y,z = version.split('.') %}
{% set version_ffmpeg_style = x ~ '.' ~ y if z == "0" else version %}
package:
name: ffmpeg
version: {{ version }}
source:
url: https://ffmpeg.org/releases/ffmpeg-{{ version_ffmpeg_style }}.tar.gz
sha256: e273eae00b4f833595654c1ee2b2349240e0332f9dbf3c4cadd39df9819ff052
patches:
- patches/pkgconfig_generate_windows_llvm.patch # [win]
# I don't really think that the original changes made at FFmpeg make sense for
# conda-forge's conmpiler stack on windows
# https://github.com/FFmpeg/FFmpeg/commit/f8d6d0fbf12b3247a37885cd0a5cd32ddc1f01b3
# https://github.com/conda-forge/ffmpeg-feedstock/pull/193#issuecomment-1484476264
- patches/0001-Revert-compat-Use-instead-of-for-rc.exe-options.patch
# needed for qtwebengine
- patches/add-av_stream_get_first_dts-for-chromium.patch
# Include time_internal header for windows to correctly locate localtime_r and gmtime_r
- patches/include_time_internal_header.patch
{% set build = 4 %}
{% if license_family == 'gpl' %}
{% set build = build + 100 %}
{% endif %}
build:
number: {{ build }}
string: {{ license_family }}_h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}
run_exports:
# seems to be major version compatibility
# https://abi-laboratory.pro/tracker/timeline/ffmpeg/
- {{ pin_subpackage('ffmpeg', max_pin='x') }}
ignore_run_exports_from:
- glib
requirements:
build:
- {{ compiler("c") }}
- {{ compiler("cxx") }}
- {{ stdlib("c") }}
# clangxx is required for support of the nvidia encoders and decoders
- clangxx # [linux64]
- autotools_clang_conda # [win]
- pkg-config
- libtool # [not win]
- nasm # [not (osx and x86_64)]
# osx_64 needs yasm due to https://stackoverflow.com/questions/58796267/building-for-macos-but-linking-in-object-file-built-for-free-standing
- yasm # [osx and x86_64]
- lame # [not win]
- make # [not win]
- m2-sed # [win]
# makedef uses the printf command which is provided by coreutils
# - m2-coreutils # [win]
host:
- bzip2
- freetype
- harfbuzz
# glib is only required to find harfbuzz with pkg-config at compilation time
# but it is not directly linked to the system
- glib
- fontconfig
- gnutls # [not win]
- libiconv
- libxml2
{% if license_family == 'gpl' %}
- x264
- x265
{% endif %}
- libvpx # [not win]
- zlib
- openh264
- lame # [not win]
- gmp # [unix]
- libva # [linux64]
- aom
- svt-av1
- ffnvcodec-headers # [linux64 or win]
- libopus
- libopenvino-dev # [not ppc64le and not win]
- libass # [not win]
- dav1d
- xz
- libxcb # [linux]
- xorg-libx11 # [linux]
{% set grep = "grep" %} # [unix]
{% set grep = "findstr" %} # [win]
test:
commands:
- ffmpeg --help
- ffmpeg -hide_banner -codecs
- ffmpeg -hide_banner -protocols
- ffmpeg -hide_banner -protocols | {{ grep }} "https"
- ffmpeg -hide_banner -codecs | {{ grep }} "libmp3lame" # [unix]
- ffmpeg -hide_banner -codecs | {{ grep }} "DEVI.S\ zlib"
- ffmpeg -hide_banner -codecs | {{ grep }} "DEV.LS h264"
- ffmpeg -hide_banner -codecs | {{ grep }} "libopenh264"
- ffmpeg -hide_banner -codecs | {{ grep }} "vaapi" # [linux64]
- ffmpeg -hide_banner -codecs | {{ grep }} "libaom"
- ffmpeg -hide_banner -codecs | {{ grep }} "libsvtav1"
# Verify dynamic libraries on all systems
{% set ffmpeg_libs = [
"avdevice",
"swresample",
"avfilter",
"avcodec",
"avformat",
"swscale",
"avutil",
] %}
{% for each_ffmpeg_lib in ffmpeg_libs %}
- test -f $PREFIX/lib/lib{{ each_ffmpeg_lib }}${SHLIB_EXT} # [unix]
- if not exist %PREFIX%\\Library\\lib\\{{ each_ffmpeg_lib }}.lib exit 1 # [win]
{% endfor %}
# Windows dynamic libraries have a suffix
# This is useful to keep since it helps detect ABI breakage
{% set ffmpeg_libs = [
"avdevice-61",
"swresample-5",
"avfilter-10",
"avcodec-61",
"avformat-61",
"swscale-8",
"avutil-59",
] %}
{% for each_ffmpeg_lib in ffmpeg_libs %}
- echo "Checking for existance of {{ each_ffmpeg_lib }}.dll" # [win]
- if not exist %PREFIX%\\Library\\bin\\{{ each_ffmpeg_lib }}.dll exit 1 # [win]
{% endfor %}
{%- if license_family == 'gpl' %}
- ffmpeg -hide_banner -buildconf | {{ grep }} "enable-gpl"
- ffmpeg -hide_banner -codecs | {{ grep }} "libx264"
- ffmpeg -hide_banner -codecs | {{ grep }} "libx265"
- test -f $PREFIX/lib/libpostproc${SHLIB_EXT} # [unix]
- if not exist %PREFIX%\\Library\\lib\\postproc.lib exit 1 # [win]
- if not exist %PREFIX%\\Library\\bin\\postproc-58.dll exit 1 # [win]
# https://trac.ffmpeg.org/wiki/Null
- ffmpeg -hide_banner -f lavfi -i nullsrc=s=256x256:d=8 -vcodec libx264 -f null -
- ffmpeg -hide_banner -f lavfi -i nullsrc=s=256x256:d=8 -vcodec libx265 -f null -
{%- endif %}
{%- if license_family == 'lgpl' %}
- ffmpeg -hide_banner -buildconf | {{ grep }} "disable-gpl"
- test ! $(ffmpeg -hide_banner -codecs | grep "libx264") # [unix]
- test ! $(ffmpeg -hide_banner -codecs | grep "libx265") # [unix]
- test ! -f $PREFIX/lib/libpostproc${SHLIB_EXT} # [unix]
- if exist %PREFIX%\\Library\\lib\\postproc.lib exit 1 # [win]
- if exist %PREFIX%\\Library\\bin\\postproc-58.dll exit 1 # [win]
{%- endif %}
# Verify nvidia codecs on linux
{% set nvcodecs = [
"h264_nvenc",
"hevc_nvenc",
"mjpeg_cuvid",
"mpeg1_cuvid",
"mpeg2_cuvid",
"mpeg4_cuvid",
"vc1_cuvid",
"vp8_cuvid",
"vp9_cuvid"
] %}
{% for nvcodec in nvcodecs %}
- ffmpeg -hide_banner -codecs | {{ grep }} "{{ nvcodec }}" # [linux64 or win]
{% endfor %}
# https://trac.ffmpeg.org/wiki/Null
- ffmpeg -hide_banner -f lavfi -i nullsrc=s=256x256:d=8 -vcodec libopenh264 -f null -
about:
home: https://www.ffmpeg.org/
license: GPL-2.0-or-later # [license_family=='gpl']
license: LGPL-2.1-or-later # [license_family=='lgpl']
license_file:
- COPYING.GPLv2 # [license_family=='gpl']
- COPYING.GPLv3 # [license_family=='gpl']
- COPYING.LGPLv2.1 # [license_family=='lgpl']
- COPYING.LGPLv3 # [license_family=='lgpl']
license_family: GPL # [license_family=='gpl']
license_family: LGPL # [license_family=='lgpl']
summary: Cross-platform solution to record, convert and stream audio and video.
dev_url: https://git.ffmpeg.org/ffmpeg.git
doc_url: https://ffmpeg.org/documentation.html
extra:
recipe-maintainers:
- hmaarrfk
- danielballan
- jakirkham
- 183amir
- patricksnape
- ocefpaf
- sdvillal
- carlodri
- benjaminrwilson
- matthiasdiener
- h-vetinari