-
Notifications
You must be signed in to change notification settings - Fork 26
/
install_ffmpeg.sh
executable file
·53 lines (43 loc) · 1.58 KB
/
install_ffmpeg.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
#!/bin/sh
# install_ffmpeg.sh
# livetranscoder
#
# Created by Guy.Jacubovski on 30/12/2018.
# Copyright © 2018 Kaltura. All rights reserved.
set -ex
#export PATH="$HOME/compiled/bin":$PATH
#export PKG_CONFIG_PATH=$HOME/compiled/lib/pkgconfig
BASE_DIR="$(dirname "$0")/ThirdParty"
BASE_DIR="/Users/guyjacubovski/dev/live/transcoder/ThirdParty"
export PATH="$BASE_DIR/compiled/bin":$PATH
export PKG_CONFIG_PATH=$BASE_DIR/compiled/lib/pkgconfig
echo $BASE_DIR
mkdir -p "$BASE_DIR/compiled"
if [ ! -f "$BASE_DIR/nasm/nasm" ]; then
rm -rf "$BASE_DIR/nasm"
# sudo apt-get -y install asciidoc xmlto # this fails :(
git clone -b nasm-2.14.02 http://repo.or.cz/nasm.git "$BASE_DIR/nasm"
cd "$BASE_DIR/nasm"
./autogen.sh
./configure --prefix="$BASE_DIR/compiled"
make
make install || echo "Installing docs fails but should be OK otherwise"
fi
#if [ ! -f "$BASE_DIR/x264/x264" ]; then
# rm -rf "$BASE_DIR/x264"
#git clone http://git.videolan.org/git/x264.git "$BASE_DIR/x264"
cd "$BASE_DIR/x264"
# git master as of this writing
git checkout master
./configure --enable-debug --prefix="$BASE_DIR/compiled" --enable-pic --enable-static
make
make install-lib-static
#fi
#if [ ! -f "$BASE_DIR/ffmpeg/libavcodec/libavcodec.a" ]; then
# rm -rf "$BASE_DIR/ffmpeg"
# git clone -b n4.1 https://git.ffmpeg.org/ffmpeg.git "$BASE_DIR/ffmpeg" || echo "FFmpeg dir already exists"
cd "$BASE_DIR/ffmpeg"
./configure --prefix="$BASE_DIR/compiled" --enable-debug --enable-libx264 --enable-gpl --enable-static #--enable-gnutls
make
make install
#fi