-
Notifications
You must be signed in to change notification settings - Fork 419
/
ffmpeg.py
39 lines (37 loc) · 1.08 KB
/
ffmpeg.py
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
#!/usr/bin/python
import os
args = [
'extra-cflags="-c -Oz -fPIC"',
'cc=emcc',
'cxx=em++',
'ar=emar',
'ranlib=emranlib',
'prefix=../wasm/obj',
'target-os=none',
'arch=x86_64',
'cpu=generic'
]
disables = [
'everything','all','avdevice','postproc','avfilter','programs','asm','parsers','muxers','demuxers','filters',
'doc','devices','network','bsfs','shared','hwaccels','debug','protocols','indevs','outdevs','runtime-cpudetect','pthreads'
]
enables = [
'small','cross-compile','gpl','avcodec','swresample','ffmpeg','avformat',
'muxer=mp4',
'parser=h264',
'parser=hevc',
'parser=aac',
'decoder=h264',
'decoder=hevc',
'decoder=aac',
'decoder=pcm_alaw',
'decoder=pcm_mulaw',
'encoder=pcm_alaw',
'encoder=pcm_mulaw',
'encoder=aac','static'
]
enables = ['enable-'+item for i,item in enumerate(enables)]
disables = ['disable-'+item for i,item in enumerate(disables)]
os.system('emconfigure ./configure --' +
(' --'.join(args+disables+enables)))
os.system('make clean && emmake make -j && make install')