Skip to content
This repository was archived by the owner on Dec 16, 2024. It is now read-only.

Commit 4f68f0f

Browse files
committed
Update build scripts and documentation typos
1 parent 7991b09 commit 4f68f0f

File tree

7 files changed

+234
-24
lines changed

7 files changed

+234
-24
lines changed

OMAF-Sample/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
mkdir build && cd build
3232
cmake .. -DHTTP_PROXY=<proxy> # proxy is optional
3333
make build -j $(nproc)
34-
docker image ls # [REPOSITORY:immersive_server, TAG:v1.4]
34+
docker image ls # [REPOSITORY:immersive_server, TAG:v1.8]
3535
```
3636

3737
- Client :
@@ -43,7 +43,7 @@
4343

4444
- Server :
4545
```bash
46-
docker run --privileged -p 30001:443 -p 30002:8080 -it immersive_server:v1.4 bash # Map the port.
46+
docker run --privileged -p 30001:443 -p 30002:8080 -it immersive_server:v1.8 bash # Map the port.
4747
cd /usr/local/nginx/conf/
4848
./configure.sh CN Shanghai A B C D [email protected] # './configure.sh -h' for details.
4949
/usr/local/nginx/sbin/nginx # Start nginx.

OMAF-Sample/server/Dockerfile

+8-7
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ RUN wget -O - ${CMAKE_REPO}/v${CMAKE_VER%.*}/cmake-${CMAKE_VER}.tar.gz | tar xz
6666
# Build YASM
6767
ARG YASM_VER=1.3.0
6868
ARG YASM_REPO=https://www.tortall.net/projects/yasm/releases/yasm-${YASM_VER}.tar.gz
69-
RUN wget -O - ${YASM_REPO} | tar xz && \
69+
RUN wget --no-check-certificate -O - ${YASM_REPO} | tar xz && \
7070
cd yasm-${YASM_VER} && \
7171
sed -i "s/) ytasm.*/)/" Makefile.in && \
7272
source /opt/rh/devtoolset-7/enable && \
@@ -78,7 +78,7 @@ RUN wget -O - ${YASM_REPO} | tar xz && \
7878
# Build CURL
7979
ARG CURL_VER=7.66.0
8080
ARG CURL_REPO=https://curl.haxx.se/download/curl-${CURL_VER}.tar.xz
81-
RUN wget ${CURL_REPO} && \
81+
RUN wget --no-check-certificate ${CURL_REPO} && \
8282
xz -d curl-${CURL_VER}.tar.xz && \
8383
tar -xvf curl-${CURL_VER}.tar && \
8484
cd curl-${CURL_VER} && \
@@ -90,7 +90,7 @@ RUN wget ${CURL_REPO} && \
9090

9191
# Install BOOST
9292
ARG BOOST_REPO=https://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.tar.gz
93-
RUN wget -O - ${BOOST_REPO} | tar xz && \
93+
RUN wget --no-check-certificate -O - ${BOOST_REPO} | tar xz && \
9494
cd boost_1_63_0 && \
9595
source /opt/rh/devtoolset-7/enable && \
9696
./bootstrap.sh --without-libraries=python && \
@@ -112,6 +112,7 @@ RUN git clone https://github.com/OpenVisualCloud/SVT-HEVC.git && \
112112
# Install glog
113113
RUN git clone https://github.com/google/glog.git && \
114114
cd glog && \
115+
git checkout v0.5.0 && \
115116
source /opt/rh/devtoolset-7/enable && \
116117
sed -i '23s/OFF/ON/' CMakeLists.txt && \
117118
cmake -H. -Bbuild -G "Unix Makefiles" && \
@@ -121,14 +122,14 @@ RUN git clone https://github.com/google/glog.git && \
121122

122123
# Install lttng
123124
RUN source /opt/rh/devtoolset-7/enable && \
124-
wget -c https://lttng.org/files/urcu/userspace-rcu-latest-0.11.tar.bz2 && \
125+
wget --no-check-certificate -c https://lttng.org/files/urcu/userspace-rcu-latest-0.11.tar.bz2 && \
125126
tar -xjf userspace-rcu-latest-0.11.tar.bz2 && \
126127
cd userspace-rcu-0.11.* && \
127128
./configure && \
128129
make -j $(nproc) && \
129130
make install && ldconfig && \
130131
cd ../ && rm -rf userspace-rcu-0.11.* && \
131-
wget -c http://lttng.org/files/lttng-ust/lttng-ust-latest-2.11.tar.bz2 && \
132+
wget --no-check-certificate -c http://lttng.org/files/lttng-ust/lttng-ust-latest-2.11.tar.bz2 && \
132133
tar -xjf lttng-ust-latest-2.11.tar.bz2 && \
133134
cd lttng-ust-2.11.* && \
134135
./configure --disable-man-pages && \
@@ -146,7 +147,7 @@ COPY src/ffmpeg/dependency/WorkerServer /root
146147
# Install Thrift
147148
ARG THRIFT_VER=0.12.0
148149
ARG THRIFT_REPO=http://apache.osuosl.org/thrift/${THRIFT_VER}/thrift-${THRIFT_VER}.tar.gz
149-
RUN wget -O - ${THRIFT_REPO} | tar xz && \
150+
RUN wget --no-check-certificate -O - ${THRIFT_REPO} | tar xz && \
150151
cd thrift-${THRIFT_VER} && \
151152
source /opt/rh/devtoolset-7/enable && \
152153
patch configure ../external/Disable_cxx11_abi_for_thrift.patch && \
@@ -172,7 +173,7 @@ RUN git clone https://github.com/OpenHEVC/openHEVC.git && \
172173
# Build Nginx
173174
ARG NGINX_VER=1.13.1
174175
ARG NGINX_REPO=http://nginx.org/download/nginx-${NGINX_VER}.tar.gz
175-
RUN wget -O - ${NGINX_REPO} | tar xz && \
176+
RUN wget --no-check-certificate -O - ${NGINX_REPO} | tar xz && \
176177
cd nginx-${NGINX_VER} && \
177178
source /opt/rh/devtoolset-7/enable && \
178179
./configure --with-http_ssl_module && \

OMAF-Sample/server/deploy.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ cp -r ${SRCPATH}CMakeLists.txt ${DSTPATH}
2626
cp -r ${REPOPATH}Sample-Videos ${DSTPATH}
2727

2828
if [ $# = 1 ] ; then
29-
docker build -t immersive_server:v1.4 .
29+
docker build -t immersive_server:v1.8 .
3030
elif [ $# = 2 ] ; then
3131
if [ "$1" = "-h" ] ; then
3232
parameters_usage
3333
else
3434
PROXY=$2
35-
docker build -t immersive_server:v1.4 \
35+
docker build -t immersive_server:v1.8 \
3636
--build-arg http_proxy=${PROXY} \
3737
--build-arg https_proxy=${PROXY} .
3838
echo "PROXY:${PROXY}"

OMAF-Sample/server/deploy.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
enableServiceLinks: false
1818
containers:
1919
- name: immersive-server
20-
image: immersive_server:v1.4
20+
image: immersive_server:v1.8
2121
command: [ "/bin/sh","-c" ]
2222
args:
2323
- cd /usr/local/nginx/conf/ &&

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Open Visual Cloud Immersive Video Samples
44
[![Travis Build Status](https://travis-ci.com/OpenVisualCloud/Immersive-Video-Sample.svg?branch=master)](https://travis-ci.com/OpenVisualCloud/Immersive-Video-Sample)
5-
[![Stable release](https://img.shields.io/badge/latest_release-v1.4.0-green.svg)](https://github.com/OpenVisualCloud/Immersive-Video-Sample/releases/latest)
5+
[![Stable release](https://img.shields.io/badge/latest_release-v1.8.0-green.svg)](https://github.com/OpenVisualCloud/Immersive-Video-Sample/releases/latest)
66
[![Contributions](https://img.shields.io/badge/contributions-welcome-blue.svg)](https://github.com/OpenVisualCloud/Immersive-Video-Sample/wiki)
77

88
This Immersive Video project includes 2 samples which are based on different streaming frameworks.

src/external/dockerfile

+206
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,206 @@
1+
FROM centos:7.6.1810
2+
3+
RUN if [ -n "${http_proxy}" ] ; then \
4+
echo "proxy=${http_proxy}" >> /etc/yum.conf && \
5+
echo "http_proxy=${http_proxy}" >> /etc/wgetrc && \
6+
echo "https_proxy=${https_proxy}" >> /etc/wgetrc ; \
7+
fi
8+
9+
WORKDIR /home/immersive
10+
ARG WORKDIR=/home/immersive
11+
12+
# Install denpendency
13+
RUN yum install -y centos-release-scl-rh && \
14+
yum install -y wget git bzip2 xz sudo devtoolset-7-gcc* && \
15+
wget https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-14.noarch.rpm && \
16+
rpm -Uvh epel-release*rpm && \
17+
yum install -y openssl centos-release-scl scl-utils gmp gmp-devel && \
18+
yum install -y mpfr mpfr-devel libmpc libmpc-devel patch autoconf && \
19+
yum install -y libtool automake libcurl-devel libxml2-devel && \
20+
yum install -y libevent-devel.x86_64 openssl-devel bc redhat-lsb && \
21+
yum install -y libXrandr libXrandr-devel libXinerama libXinerama-devel && \
22+
yum install -y libXcursor libXcursor-devel libXi libXi-devel glm-devel && \
23+
yum install -y mesa-libGL mesa-libGL-devel mesa-libGLU && \
24+
yum install -y mesa-libGLU-devel mesa-libGLES-devel mesa-libEGL-devel && \
25+
yum install -y SDL2 SDL2-devel libcurl4-openssl-dev libglfw3 && \
26+
yum install -y libXv-devel glfw glfw-devel xz-devel lzma -y && \
27+
yum install -y uuid.x86_64 uuid-devel.x86_64 popt-devel.x86_64 -y && \
28+
yum install -y numactl.x86_64 numactl-devel.x86_64 numactl-libs.x86_64 -y && \
29+
rm -rf /var/cache/yum/* && rm -rf * && \
30+
if [ -n "${http_proxy}" ]; then \
31+
git config --global http.proxy ${http_proxy} && \
32+
git config --global https.proxy ${https_proxy} ; \
33+
fi
34+
35+
RUN yum -y install rh-ruby23 rh-ruby23-ruby-devel rh-ruby23-rubygem* && \
36+
source /opt/rh/rh-ruby23/enable && \
37+
yum -y install rpm-build && \
38+
if [ -n "${http_proxy}" ]; then \
39+
gem install -p ${http_proxy} fpm ; \
40+
else \
41+
gem install fpm ; \
42+
fi
43+
44+
# Build zlib
45+
ARG ZLIB_VER=1.2.11
46+
ARG ZILB_REPO=http://zlib.net/zlib-${ZLIB_VER}.tar.gz
47+
RUN wget -O - ${ZILB_REPO} | tar xz && \
48+
cd zlib-${ZLIB_VER} && \
49+
source /opt/rh/devtoolset-7/enable && \
50+
./configure && \
51+
make -j$(nproc) && \
52+
make install && \
53+
cd ${WORKDIR} && rm -rf ./*
54+
55+
# Install cmake
56+
ARG CMAKE_VER=3.12.4
57+
ARG CMAKE_REPO=https://cmake.org/files
58+
RUN wget -O - ${CMAKE_REPO}/v${CMAKE_VER%.*}/cmake-${CMAKE_VER}.tar.gz | tar xz && \
59+
cd cmake-${CMAKE_VER} && \
60+
source /opt/rh/devtoolset-7/enable && \
61+
./bootstrap --prefix="/usr" --system-curl && \
62+
make -j$(nproc) && \
63+
make install && \
64+
cd ${WORKDIR} && rm -rf ./*
65+
66+
# Build YASM
67+
ARG YASM_VER=1.3.0
68+
ARG YASM_REPO=https://www.tortall.net/projects/yasm/releases/yasm-${YASM_VER}.tar.gz
69+
RUN wget --no-check-certificate -O - ${YASM_REPO} | tar xz && \
70+
cd yasm-${YASM_VER} && \
71+
sed -i "s/) ytasm.*/)/" Makefile.in && \
72+
source /opt/rh/devtoolset-7/enable && \
73+
./configure --prefix="/usr" --libdir=/usr/lib/x86_64-linux-gnu && \
74+
make -j$(nproc) && \
75+
make install && \
76+
cd ${WORKDIR} && rm -rf ./*
77+
78+
# Build CURL
79+
ARG CURL_VER=7.66.0
80+
ARG CURL_REPO=https://curl.haxx.se/download/curl-${CURL_VER}.tar.xz
81+
RUN wget --no-check-certificate ${CURL_REPO} && \
82+
xz -d curl-${CURL_VER}.tar.xz && \
83+
tar -xvf curl-${CURL_VER}.tar && \
84+
cd curl-${CURL_VER} && \
85+
source /opt/rh/devtoolset-7/enable && \
86+
./configure --with-darwinssl && \
87+
make -j$(nproc) && \
88+
make install && \
89+
cd ${WORKDIR} && rm -rf ./*
90+
91+
# Install BOOST
92+
ARG BOOST_REPO=https://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.tar.gz
93+
RUN wget --no-check-certificate -O - ${BOOST_REPO} | tar xz && \
94+
cd boost_1_63_0 && \
95+
source /opt/rh/devtoolset-7/enable && \
96+
./bootstrap.sh --without-libraries=python && \
97+
./b2 -a cxxflags="-D_GLIBCXX_USE_CXX11_ABI=0" -j`nproc` && \
98+
./b2 cxxflags="-D_GLIBCXX_USE_CXX11_ABI=0" install && \
99+
cd ${WORKDIR} && rm -rf ./boost_1_63_0*
100+
101+
# Install SVT
102+
RUN git clone https://github.com/OpenVisualCloud/SVT-HEVC.git && \
103+
cd SVT-HEVC && \
104+
source /opt/rh/devtoolset-7/enable && \
105+
git checkout ec0d95c7e0d5be20586e1b87150bdfb9ae97cf4d && \
106+
cd Build/linux/ && \
107+
./build.sh && \
108+
cd Release && \
109+
make install && \
110+
cd ${WORKDIR} && rm -rf ./SVT-HEVC
111+
112+
# Install glog
113+
RUN git clone https://github.com/google/glog.git && \
114+
cd glog && \
115+
git checkout v0.5.0 && \
116+
source /opt/rh/devtoolset-7/enable && \
117+
sed -i '23s/OFF/ON/' CMakeLists.txt && \
118+
cmake -H. -Bbuild -G "Unix Makefiles" && \
119+
cmake --build build && \
120+
cmake --build build --target install && \
121+
cd ${WORKDIR} && rm -rf ./glog
122+
123+
# Install lttng
124+
RUN source /opt/rh/devtoolset-7/enable && \
125+
wget --no-check-certificate -c https://lttng.org/files/urcu/userspace-rcu-latest-0.11.tar.bz2 && \
126+
tar -xjf userspace-rcu-latest-0.11.tar.bz2 && \
127+
cd userspace-rcu-0.11.* && \
128+
./configure && \
129+
make -j $(nproc) && \
130+
make install && ldconfig && \
131+
cd ../ && rm -rf userspace-rcu-0.11.* && \
132+
wget --no-check-certificate -c http://lttng.org/files/lttng-ust/lttng-ust-latest-2.11.tar.bz2 && \
133+
tar -xjf lttng-ust-latest-2.11.tar.bz2 && \
134+
cd lttng-ust-2.11.* && \
135+
./configure --disable-man-pages && \
136+
make -j $(nproc) && \
137+
make install && ldconfig && \
138+
cd ../ && rm -rf lttng-ust-2.11.*
139+
140+
# Copy source
141+
COPY ./src ${WORKDIR}
142+
COPY src/ffmpeg/dependency/*.so /usr/local/lib/
143+
COPY src/ffmpeg/dependency/*.pc /usr/local/lib/pkgconfig/
144+
COPY src/ffmpeg/dependency/*.h /usr/local/include/
145+
COPY src/ffmpeg/dependency/WorkerServer /root
146+
147+
# Install Thrift
148+
ARG THRIFT_VER=0.12.0
149+
ARG THRIFT_REPO=http://apache.osuosl.org/thrift/${THRIFT_VER}/thrift-${THRIFT_VER}.tar.gz
150+
RUN wget --no-check-certificate -O - ${THRIFT_REPO} | tar xz && \
151+
cd thrift-${THRIFT_VER} && \
152+
source /opt/rh/devtoolset-7/enable && \
153+
patch configure ../external/Disable_cxx11_abi_for_thrift.patch && \
154+
sed -i '21 a # include <unistd.h>' ./lib/cpp/src/thrift/transport/PlatformSocket.h && \
155+
./configure --with-boost=/usr/local --with-boost-libdir=/usr/local/lib --with-libevent=/usr --with-java=0 && \
156+
make -j`nproc` && \
157+
make install && \
158+
cd ${WORKDIR} && rm -rf ./thrift-${THRIFT_VER}*
159+
160+
# Install openHEVC
161+
RUN git clone https://github.com/OpenHEVC/openHEVC.git && \
162+
cd openHEVC && \
163+
source /opt/rh/devtoolset-7/enable && \
164+
git config --global user.email "[email protected]" && \
165+
git config --global user.name "Your Name" && \
166+
git checkout ffmpeg_update && \
167+
git am --whitespace=fix ../external/Update-buffer-operation-and-fix-stream-loop-coredump.patch && \
168+
./configure --libdir=/usr/lib64 --disable-sdl2 && \
169+
make -j `nproc` && \
170+
make install && \
171+
cd ${WORKDIR} && rm -rf ./openHEVC
172+
173+
# Build Nginx
174+
ARG NGINX_VER=1.13.1
175+
ARG NGINX_REPO=http://nginx.org/download/nginx-${NGINX_VER}.tar.gz
176+
RUN wget --no-check-certificate -O - ${NGINX_REPO} | tar xz && \
177+
cd nginx-${NGINX_VER} && \
178+
source /opt/rh/devtoolset-7/enable && \
179+
./configure --with-http_ssl_module && \
180+
make -j `nproc` && \
181+
make install && \
182+
cd ${WORKDIR} && rm -rf ./nginx*
183+
EXPOSE 443
184+
EXPOSE 8080
185+
186+
# Build safe string lib
187+
RUN git clone https://github.com/intel/safestringlib.git && \
188+
cd safestringlib && \
189+
source /opt/rh/devtoolset-7/enable && \
190+
cmake . && \
191+
make -j `nproc` -f Makefile && \
192+
cp libsafestring_shared.so /usr/local/lib/ && \
193+
mkdir -p /usr/local/include/safestringlib/ && \
194+
cp ./include/* /usr/local/include/safestringlib/ && \
195+
cd ${WORKDIR} && rm -rf ./safestringlib
196+
197+
# Configure And Run Nginx
198+
COPY nginx_conf /usr/local/nginx/conf
199+
200+
# Unset proxy if necessary
201+
RUN if [ -n "${http_proxy}" ]; then \
202+
sed -i '$d' /etc/yum.conf && \
203+
sed -i '1,$d' /etc/wgetrc && \
204+
git config --global --unset http.proxy && \
205+
git config --global --unset https.proxy ; \
206+
fi

src/external/install_FFmpeg.sh

+14-11
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
1-
#!/bin/bash -x
1+
#!/bin/bash -ex
22

33
TARGET=$1
44
REPO=$2
5+
FFMPEG_REPO=FFmpeg
56

67
cd ..
78
if [ "${REPO}" != "oss" ] ; then
8-
if [ ! -d "./FFmpeg" ] ; then
9-
if [ ! -f "./ffmpeg-4.3.1.tar.xz" ] ; then
10-
wget http://ffmpeg.org/releases/ffmpeg-4.3.1.tar.xz
11-
fi
12-
tar xf ffmpeg-4.3.1.tar.xz && mv ffmpeg-4.3.1 FFmpeg
9+
if [ ! -d "${FFMPEG_REPO}" ] ; then
10+
mkdir ${FFMPEG_REPO} && cd ${FFMPEG_REPO}
11+
git init
12+
git remote add origin https://github.com/FFmpeg/FFmpeg.git
13+
git fetch --depth 1 origin 6b6b9e593dd4d3aaf75f48d40a13ef03bdef9fdb
14+
git checkout FETCH_HEAD
15+
cd -
1316
fi
14-
if [ ! -f "FFmpeg/libavcodec/distributed_encoder.c" ] ; then
15-
cd FFmpeg
17+
if [ ! -f "${FFMPEG_REPO}/libavcodec/distributed_encoder.c" ] ; then
18+
cd ${FFMPEG_REPO}
1619
patch -p1 < ../ffmpeg/patches/FFmpeg_OMAF.patch
1720
cd ..
1821
fi
@@ -22,17 +25,17 @@ if [ "${TARGET}" == "server" ] ; then
2225

2326
mkdir -p build/external/ffmpeg_server
2427
cd build/external/ffmpeg_server
25-
../../../FFmpeg/configure --prefix=/usr --libdir=/usr/local/lib \
28+
../../../${FFMPEG_REPO}/configure --prefix=/usr --libdir=/usr/local/lib \
2629
--enable-static --enable-shared --enable-gpl --enable-nonfree \
27-
--disable-optimizations --disable-vaapi --disable-filter=erp2cubmap_mdf
30+
--disable-optimizations --disable-vaapi
2831
make -j $(nproc)
2932
sudo make install
3033

3134
elif [ "${TARGET}" == "client" ] ; then
3235

3336
mkdir -p build/external/ffmpeg_client
3437
cd build/external/ffmpeg_client
35-
../../../FFmpeg/configure --enable-shared --disable-filter=erp2cubmap_mdf
38+
../../../${FFMPEG_REPO}/configure --enable-shared
3639
make -j $(nproc)
3740
sudo make install
3841

0 commit comments

Comments
 (0)