Skip to content

Instantly share code, notes, and snippets.

@tufei
Created December 27, 2022 18:03
Show Gist options
  • Save tufei/25c0774ef07abe49261fc834c73367d1 to your computer and use it in GitHub Desktop.
Save tufei/25c0774ef07abe49261fc834c73367d1 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Reference
# https://trac.ffmpeg.org/wiki/CompilationGuide/Centos
# https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
echo "run the configure script to build FFMPEG..."
# ORT debug build
PKG_CONFIG_PATH='/opt/intel/mediasdk/lib64/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig' \
./configure --cc=clang --cxx=clang++ --enable-runtime-cpudetect --enable-pic \
--disable-gnutls --enable-shared --enable-gpl --enable-version3 \
--enable-nonfree --enable-postproc --enable-avfilter --enable-pthreads \
--enable-vdpau --disable-avisynth --enable-libdc1394 --enable-libmodplug \
--enable-libgsm --enable-libmp3lame --enable-libass --enable-libbluray \
--enable-libcdio --enable-crystalhd --enable-libopencore-amrnb \
--enable-libopencore-amrwb --enable-libopenjpeg --enable-libpulse \
--enable-librtmp --enable-libspeex --enable-libv4l2 --enable-libtheora \
--enable-libvpx --enable-libvorbis --enable-libx264 --enable-libx265 \
--enable-libxvid --enable-openssl --enable-vaapi \
--extra-cflags='-O2 -ggdb3 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -march=skylake -mtune=native -fasynchronous-unwind-tables -I/usr/local/cuda/targets/x86_64-linux/include' \
--extra-ldflags='-L/usr/local/cuda/targets/x86_64-linux/lib' \
--disable-stripping --enable-debug=3 --enable-fontconfig --enable-libcaca \
--enable-libcelt --enable-libfdk-aac --enable-libflite --enable-libfreetype \
--enable-libiec61883 --enable-libilbc --disable-libopencv --enable-libopus \
--enable-libshine --enable-libsoxr --enable-libtwolame \
--enable-libvo-amrwbenc --disable-libxavs --enable-nvdec --enable-libvidstab \
--enable-ffplay --enable-chromaprint --enable-frei0r --enable-ladspa \
--enable-libbs2b --enable-libopenmpt --enable-librubberband \
--disable-libsmbclient --enable-libsnappy --enable-libwebp --enable-libxcb \
--enable-libzimg --enable-libzmq --enable-libzvbi --enable-opengl \
--disable-xlib --enable-zlib --enable-cuda --enable-cuvid --enable-nvenc \
--enable-omx --disable-videotoolbox --enable-libaom --enable-gray \
--enable-gcrypt --enable-libaribb24 --enable-gmp --enable-libcodec2 \
--enable-libdav1d --enable-libdavs2 --enable-libxavs2 --enable-libklvanc \
--enable-libkvazaar --enable-liblensfun --enable-libopenh264 \
--disable-librav1e --enable-libssh --enable-libtesseract --disable-libtls \
--enable-libvmaf --enable-libxml2 --enable-lv2 --enable-openal \
--enable-opencl --enable-cuda-nvcc --enable-libdrm --enable-libmfx \
--enable-libnpp --enable-libtensorflow --enable-libonnxruntime \
--enable-libsvtav1 --enable-libsvthevc --libdir=/usr/local/lib \
--nvcc=/usr/local/cuda/bin/nvcc
# Normal build
#PKG_CONFIG_PATH='/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig' \
#./configure --enable-runtime-cpudetect --enable-pic --disable-gnutls \
#--enable-shared --enable-gpl --enable-version3 --enable-nonfree \
#--enable-postproc --enable-avfilter --enable-pthreads --enable-vdpau \
#--disable-avisynth --enable-libdc1394 --enable-libmodplug --enable-libgsm \
#--enable-libmp3lame --enable-libass --enable-libbluray --enable-libcdio \
#--enable-crystalhd --enable-libopencore-amrnb --enable-libopencore-amrwb \
#--enable-libopenjpeg --enable-libpulse --enable-librtmp --enable-libspeex \
#--enable-libv4l2 --enable-libtheora --enable-libvpx --enable-libvorbis \
#--enable-libx264 --enable-libx265 --enable-libxvid --enable-openssl \
#--enable-vaapi \
#--extra-cflags='-O2 -ggdb3 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -march=skylake -mtune=native -fasynchronous-unwind-tables -I/usr/local/cuda/targets/x86_64-linux/include' \
#--extra-ldflags='-L/usr/local/cuda/targets/x86_64-linux/lib' \
#--enable-stripping --disable-debug --enable-fontconfig --enable-libcaca \
#--enable-libcelt --enable-libfdk-aac --enable-libflite --enable-libfreetype \
#--enable-libiec61883 --enable-libilbc --disable-libopencv --enable-libopus \
#--enable-libshine --enable-libsoxr --enable-libtwolame \
#--enable-libvo-amrwbenc --disable-libxavs --enable-nvdec --enable-libvidstab \
#--enable-ffplay --enable-chromaprint --enable-frei0r --enable-ladspa \
#--enable-libbs2b --enable-libopenmpt --enable-librubberband \
#--disable-libsmbclient --enable-libsnappy --enable-libwebp --enable-libxcb \
#--enable-libzimg --enable-libzmq --enable-libzvbi --enable-opengl \
#--disable-xlib --enable-zlib --enable-cuda --enable-cuvid --enable-nvenc \
#--enable-omx --disable-videotoolbox --enable-libaom --enable-gray \
#--enable-gcrypt --enable-libaribb24 --enable-gmp --enable-libcodec2 \
#--enable-libdav1d --enable-libdavs2 --enable-libxavs2 --enable-libklvanc \
#--enable-libkvazaar --enable-liblensfun --enable-libopenh264 \
#--disable-librav1e --enable-libssh --enable-libtesseract --disable-libtls \
#--enable-libvmaf --enable-libxml2 --enable-lv2 --enable-openal \
#--enable-opencl --enable-cuda-nvcc --enable-libdrm --enable-libmfx \
#--enable-libnpp --enable-libtensorflow --enable-libsvtav1 --enable-libsvthevc \
#--enabe-tensorrt --libdir=/usr/local/lib --nvcc=/usr/local/cuda/bin/nvcc
echo "configuration completed."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment