-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.sh
executable file
·60 lines (46 loc) · 1.69 KB
/
setup.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
#!/bin/bash
cd /app/
mkdir libs/ && cd libs/
echo "Beginning to install Vid.Stab. A video library used to stablized videos..."
# Install Vid.Stab for stablization
git clone https://github.com/georgmartius/vid.stab.git && \
cd vid.stab/ && \
cmake . && \
make -j4 && \
make install
# We need to ensure that the shell knows where to find the libraries
echo "LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64" >> ~/.profile
echo "export LD_LIBRARY_PATH" >> ~/.profile
echo "Vid.Stab installation was successful (1/2)"
echo "Beginning to install FFmpeg for all video stablization and video creation..."
cd ../ && \
wget -O ffmpeg-snapshot.tar.bz2 https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 && \
tar xjvf ffmpeg-snapshot.tar.bz2 && \
cd ffmpeg && \
PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \
--prefix="$HOME/ffmpeg_build" \
--pkg-config-flags="--static" \
--extra-cflags="-I$HOME/ffmpeg_build/include" \
--extra-ldflags="-L$HOME/ffmpeg_build/lib" \
--extra-libs="-lpthread -lm" \
--bindir="$HOME/bin" \
--enable-gpl \
--enable-libvidstab \
--enable-libx264 && \
PATH="$HOME/bin:$PATH" make && \
make install && \
hash -r
# Add FFmpeg into the PATH
echo "PATH=\"$HOME/bin:$PATH\"" >> ~/.profile
echo "FFmpeg installation was successful (2/2)"
# Success!
cat << EOM
Everything seems like it was installed successfully! 🙌
You will now be inserted into the docker container, to return back into it, run:
make enter
and you'll jump back into the container. Good Luck!
EOM
# Ensure these new options are sourced in the bashrc file
source ~/.profile
# Return back to the root directory
cd /app