-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_ffmpeg_4.1.4_libx265.sh
100 lines (89 loc) · 2.14 KB
/
build_ffmpeg_4.1.4_libx265.sh
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
#!/bin/bash
set -x
set -e
BUILD_DIR=`pwd`/build
PATH=$BUILD_DIR/bin:$PATH
#
# yasm
#
YASM_VERSION=1.3.0
if [ ! -d yasm-$YASM_VERSION ]
then
if [ ! -f yasm-$YASM_VERSION.tar.gz ]
then
wget http://www.tortall.net/projects/yasm/releases/yasm-$YASM_VERSION.tar.gz
fi
tar xzf yasm-$YASM_VERSION.tar.gz
fi
cd yasm-$YASM_VERSION
./configure --prefix="$BUILD_DIR" --bindir="$BUILD_DIR/bin"
make -j 4
make install
# make distclean
cd ..
#
# nasm
#
NASM_VERSION=2.14.02
if [ ! -d nasm-$NASM_VERSION ]
then
if [ ! -f nasm-$NASM_VERSION.tar.gz ]
then
wget https://www.nasm.us/pub/nasm/releasebuilds/$NASM_VERSION/nasm-$NASM_VERSION.tar.gz
fi
tar xzf nasm-$NASM_VERSION.tar.gz
fi
pushd nasm-$NASM_VERSION
./configure --prefix="$BUILD_DIR" --bindir="$BUILD_DIR/bin"
make -j 4
make install
# make distclean
popd
#
# ffmpeg
#
FFMPEG_VERSION=4.1.4
if [ ! -d ffmpeg-$FFMPEG_VERSION ]
then
if [ ! -f ffmpeg-$FFMPEG_VERSION.tar.bz2 ]
then
wget http://ffmpeg.org/releases/ffmpeg-$FFMPEG_VERSION.tar.bz2
fi
tar xjf ffmpeg-$FFMPEG_VERSION.tar.bz2
fi
cd ffmpeg-$FFMPEG_VERSION
PKG_CONFIG_PATH=$BUILD_DIR/lib/pkgconfig ./configure \
--prefix="$BUILD_DIR" \
--extra-cflags="-I$BUILD_DIR/include" \
--extra-ldflags="-L$BUILD_DIR/lib" \
--bindir="$BUILD_DIR/bin" \
--build-suffix=-nimble \
--disable-static \
--enable-shared \
--enable-pic \
--disable-decoders \
--enable-decoder=aac,pcm_alaw,pcm_mulaw,mp2,h264,mpeg2video,mp3,png,mjpeg,tiff,gif,bmp,libspeex,hevc,vp8,vp9,ac3 \
--disable-encoders \
--enable-encoder=aac,png,mjpeg,libx265 \
--disable-muxers \
--disable-demuxers \
--enable-demuxer=mov,image2,gif,mp3,webm_dash_manifest \
--disable-parsers \
--disable-bsfs \
--disable-protocols \
--enable-protocol=file \
--disable-indevs \
--disable-outdevs \
--disable-vaapi \
--enable-filters \
--disable-ffmpeg \
--disable-ffprobe \
--disable-ffplay \
--enable-libspeex \
--enable-libfreetype \
--enable-gpl \
--enable-libx265 \
--enable-nonfree \
--disable-manpages
make -j 4
make install