adofai-ffmpeg-builder/scripts/build-openh264.sh

30 lines
765 B
Bash
Raw Normal View History

2023-05-02 19:35:56 +09:00
set -x
export OPENH264_VERSION=2.3.1
# TODO: detect platform
# export CISCO_BINARY_PLATFORM=mac
# export CISCO_BINARY_ARCH=x64
# export CISCO_BINARY_SUFFIX=dylib.bz2
# export CISCO_BINARY_NAME=libopenh264
# export OPENH264_CISCO_BINARY_URL=http://ciscobinary.openh264.org/$CISCO_BINARY_NAME-$OPENH264_VERSION-$CISCO_BINARY_PLATFORM-${CISCO_BINARY_ARCH}.${CISCO_BINARY_SUFFIX}
export projectDir=$workDir/openh264
2023-05-02 23:46:59 +09:00
git clone https://github.com/cisco/openh264 $projectDir -b v$OPENH264_VERSION --depth 1
2023-05-02 19:35:56 +09:00
cd $projectDir
2023-05-03 15:18:43 +09:00
args="PREFIX=$PREFIX OS=$OPENH264_OS ARCH=$OPENH264_ARCH CC=$CC CXX=$CXX AR=$AR"
make clean
2023-05-02 19:35:56 +09:00
2023-05-03 15:18:43 +09:00
make -j$JOBS $args
2023-05-02 19:35:56 +09:00
make install-static $args
2023-05-02 19:35:56 +09:00
# rm -rf $PREFIX/lib/libopenh264*
# wget -O $PREFIX/lib/libopenh264.dylib $OPENH264_CISCO_BINARY_URL