Open gavv opened 9 months ago
Here are configure
options to build FFmpeg in build-3rdparty.py
. These options will give us minimal FFmpeg build with all dependencies disabled.
--disable-alsa
--disable-amf
--disable-asm
--disable-avdevice
--disable-avfilter
--disable-bzlib
--disable-cuda-llvm
--disable-cuvid
--disable-dct
--disable-doc
--disable-dwt
--disable-error-resilience
--disable-faan
--disable-ffnvcodec
--disable-fft
--disable-iconv
--disable-libmp3lame
--disable-libxcb
--disable-lsp
--disable-lzma
--disable-mdct
--disable-network
--disable-nvdec
--disable-nvenc
--disable-pixelutils
--disable-postproc
--disable-programs
--disable-rdft
--disable-schannel
--disable-sdl2
--disable-securetransport
--disable-sndio
--disable-static
--disable-stripping
--disable-swscale
--disable-v4l2-m2m
--disable-vaapi
--disable-vdpau
--disable-videotoolbox
--disable-vulkan
--disable-x86asm
--disable-xlib
--disable-zlib
This issue will allow us to implement #568.
We need to modify build scripts (scons and build-3rdparty.py) to support using FFmpeg from system or automatically building it.
Steps:
teach build-3rdparty.py to build ffmpeg
add ffmpeg to https://github.com/roc-streaming/dockerfiles (so that ffmpeg will be pre-installed in docker images on CI)
add ffmpeg to https://github.com/roc-streaming/distfiles/tree/main/tarballs (so that ffmpeg will be pre-fetched on CI)
add --disable-ffmpeg to SConstruct (like --disable-sox)
in SConstruct, automatically append target_ffmpeg to ROC_TARGETS if --disable-ffmpeg is not provided (like we do it for target_sox)
in 3rdparty/SConscript, check whether ffmpeg is available on system (like we do it in if 'target_sox' in
system_dependencies
branch for sox)in 3rdparty/SConscript, download and build ffmpeg if it's present in --build-3rdparty option (like we do it in if 'target_sox' in
autobuild_dependencies
branch for sox)update scripts/ci_checks: for build where ffmpeg is not pre-installed, and for cross-compilation, add ffmpeg to --build-3rdparty (like we do it for sox)
add ffmpeg to dependencies.rst
We recently did very similar work for OpenSSL. Here are related commits:
openssl_get_platform
part; this is specific to OpenSSL and not needed for FFmpeg)And here is related documentation: