streamers-build / peerstreamer-download-build-test.sh @ 1882d814
History | View | Annotate | Download (2.96 KB)
1 |
#!/bin/bash |
---|---|
2 |
|
3 |
mkdir PeerStreamer |
4 |
cd PeerStreamer |
5 |
|
6 |
BASEDIR=`pwd` |
7 |
THIRDPARTYLIBS=$BASEDIR/THIRDPARTY-LIBS |
8 |
|
9 |
mkdir $THIRDPARTYLIBS |
10 |
cd $THIRDPARTYLIBS |
11 |
|
12 |
#prepare x264 (optional) |
13 |
git clone git://git.videolan.org/x264.git |
14 |
cd x264 |
15 |
./configure --prefix=$THIRDPARTYLIBS/x264-install/ || { echo "Error configuring x264" && exit 1; } |
16 |
make -j 2 || { echo "Error compiling x264" && exit 1; } |
17 |
make install || { echo "Error installing x264" && exit 1; } |
18 |
cd .. |
19 |
|
20 |
#prepare ffmpeg |
21 |
git clone git://git.videolan.org/ffmpeg.git |
22 |
cd ffmpeg |
23 |
./configure --enable-libx264 --enable-gpl --enable-pthreads --extra-cflags=-I$THIRDPARTYLIBS/x264-install/include --extra-ldflags=-L$THIRDPARTYLIBS/x264-install/lib --prefix=$THIRDPARTYLIBS/ffmpeg-install || { echo "Error configuring ffmpeg" && exit 1; } |
24 |
#in case x264 is not reqired (do we need the encoding?): ./configure --enable-gpl --enable-pthreads --prefix=$BASEDIR/ffmpeg-install |
25 |
make -j 2 || { echo "Error compiling ffmpeg" && exit 1; } |
26 |
make install || { echo "Error installing ffmpeg" && exit 1; } |
27 |
cd .. |
28 |
|
29 |
#cd .. #3RDPARTY-LIBS |
30 |
|
31 |
#prepare GRAPES |
32 |
git clone http://halo.disi.unitn.it/~cskiraly/PublicGits/GRAPES.git |
33 |
cd GRAPES |
34 |
FFDIR=$THIRDPARTYLIBS/ffmpeg make || { echo "Error compiling GRAPES" && exit 1; } |
35 |
cd ../.. |
36 |
|
37 |
#prepare the Streamer |
38 |
git clone http://halo.disi.unitn.it/~cskiraly/PublicGits/Streamers.git |
39 |
cd Streamers |
40 |
GRAPES=$THIRDPARTYLIBS/GRAPES FFMPEG_DIR=$THIRDPARTYLIBS/ffmpeg X264_DIR=$THIRDPARTYLIBS/x264 make clean |
41 |
GRAPES=$THIRDPARTYLIBS/GRAPES FFMPEG_DIR=$THIRDPARTYLIBS/ffmpeg X264_DIR=$THIRDPARTYLIBS/x264 make || { echo "Error compiling the Streamer" && exit 1; } |
42 |
cd .. |
43 |
|
44 |
#get test scripts |
45 |
git clone http://www.disi.unitn.it/~kiraly/SharedGits/Streamers-test.git |
46 |
|
47 |
#run a test |
48 |
mkdir test |
49 |
cd test |
50 |
wget http://halo.disi.unitn.it/~cskiraly/video/test.ts -N |
51 |
$BASEDIR/Streamers-test/test.sh -e $BASEDIR/Streamers/streamer-grapes -N 0 -X 0 -v test.ts -o "$THIRDPARTYLIBS/ffmpeg/ffplay -" -O 1 & |
52 |
PID=$! |
53 |
sleep 20 |
54 |
kill $PID || { echo "1st Test failed!" && exit 1; } |
55 |
cd .. |
56 |
|
57 |
#NAPA-libs |
58 |
cd $THIRDPARTYLIBS |
59 |
git clone http://halo.disi.unitn.it/~cskiraly/SharedGits/NAPA-BASELIBS.git |
60 |
cd NAPA-BASELIBS |
61 |
./build_all.sh -q |
62 |
cd .. |
63 |
cd .. #$THIRDPARTYLIBS |
64 |
|
65 |
#version with NAPA-libs |
66 |
cd Streamers |
67 |
GRAPES=$THIRDPARTYLIBS/GRAPES FFMPEG_DIR=$THIRDPARTYLIBS/ffmpeg X264_DIR=$THIRDPARTYLIBS/x264 STATIC=2 NAPA=$THIRDPARTYLIBS/NAPA-BASELIBS/ LIBEVENT_DIR=$THIRDPARTYLIBS/NAPA-BASELIBS/3RDPARTY-LIBS/libevent ML=1 MONL=1 make clean >/dev/null |
68 |
GRAPES=$THIRDPARTYLIBS/GRAPES FFMPEG_DIR=$THIRDPARTYLIBS/ffmpeg X264_DIR=$THIRDPARTYLIBS/x264 STATIC=2 NAPA=$THIRDPARTYLIBS/NAPA-BASELIBS/ LIBEVENT_DIR=$THIRDPARTYLIBS/NAPA-BASELIBS/3RDPARTY-LIBS/libevent ML=1 MONL=1 make || { echo "Error compiling the ML+MONL version of the Streamer" && exit 1; } |
69 |
cd .. |
70 |
|
71 |
#run a test |
72 |
cd test |
73 |
$BASEDIR/Streamers-test/test.sh -e $BASEDIR/Streamers/streamer-ml-monl-grapes-static -N 0 -X 0 -v test.ts -o "$THIRDPARTYLIBS/ffmpeg/ffplay -" -O 1 & |
74 |
PID=$! |
75 |
sleep 20 |
76 |
kill $PID || { echo "2nd Test failed!" && exit 1; } |
77 |
cd .. |
78 |
|
79 |
echo "Your executables are ready" |