diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b4ca70..4dafb73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +## Changes from 0.1.0-rc7 to 0.1.0 + +* switched to Alpine-Linux +* switched Mutlistage Dockerfiles for AMD64 and ARMHF (req. Docker 17.x) + * https://hub.docker.com/r/datarhei/ffmpeg/ + * https://hub.docker.com/r/datarhei/nginx-rtmp/ +* updated to FFmpeg 3.1.10 +* updated NPM/Bower packages +* fixed public-ip problem +* disabled FFmpeg "error-detection" for a vlc-like feeling + ## Changes from 0.1.0-rc7 to 0.1.0-rc.7.1 * fixed Kitematic auth failure diff --git a/Dockerfile b/Dockerfile index ced5a8c..a12eeeb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,133 +1,38 @@ -FROM node:5.9.0-slim +FROM datarhei/nginx-rtmp:1.9.9-1.1.7.10 as builder + +FROM node:8.1-alpine MAINTAINER datarhei -ENV FFMPEG_VERSION=2.8.6 \ - YASM_VERSION=1.3.0 \ - LAME_VERSION=3_99_5 \ - NGINX_VERSION=1.9.9 \ - NGINX_RTMP_VERSION=1.1.7.10 \ +ENV RS_USERNAME=admin \ + RS_PASSWORD=datarhei \ + SRC=/usr/local \ + LD_LIBRARY_PATH=/usr/local/lib \ + PKG_CONFIG_PATH=/usr/local/lib/pkgconfig - SRC="/usr/local" - -ENV LD_LIBRARY_PATH="${SRC}/lib" \ - PKG_CONFIG_PATH="${SRC}/lib/pkgconfig" \ - - BUILDDEPS="autoconf automake gcc g++ libtool make nasm zlib1g-dev libssl-dev xz-utils cmake build-essential libpcre3-dev" - -RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes curl git libpcre3 tar perl ca-certificates ${BUILDDEPS} && \ - rm -rf /var/lib/apt/lists/* && \ - - # yasm - DIR="$(mktemp -d)" && cd "${DIR}" && \ - curl -LOks "https://www.tortall.net/projects/yasm/releases/yasm-${YASM_VERSION}.tar.gz" && \ - tar xzvf "yasm-${YASM_VERSION}.tar.gz" && \ - cd "yasm-${YASM_VERSION}" && \ - ./configure \ - --prefix="${SRC}" \ - --bindir="${SRC}/bin" && \ - make -j"$(nproc)" && \ - make install && \ - make distclean && \ - rm -rf "${DIR}" && \ - - # x264 - DIR="$(mktemp -d)" && cd "${DIR}" && \ - git clone --depth 1 "git://git.videolan.org/x264" && \ - cd x264 && \ - ./configure \ - --prefix="${SRC}" \ - --bindir="${SRC}/bin" \ - --enable-static \ - --disable-cli && \ - make -j"$(nproc)" && \ - make install && \ - make distclean && \ - rm -rf "${DIR}" && \ - - # libmp3lame - DIR="$(mktemp -d)" && cd "${DIR}" && \ - curl -LOks "https://github.com/rbrito/lame/archive/RELEASE__${LAME_VERSION}.tar.gz" && \ - tar xzvf "RELEASE__${LAME_VERSION}.tar.gz" && \ - cd "lame-RELEASE__${LAME_VERSION}" && \ - ./configure \ - --prefix="${SRC}" \ - --bindir="${SRC}/bin" \ - --enable-nasm \ - --disable-shared && \ - make -j"$(nproc)" && \ - make install && \ - make distclean && \ - rm -rf "${DIR}" && \ - - # ffmpeg - # patch: andrew-shulgin Ignore invalid sprop-parameter-sets missing PPS - DIR="$(mktemp -d)" && cd "${DIR}" && \ - curl -LOks "https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.gz" && \ - tar xzvf "ffmpeg-${FFMPEG_VERSION}.tar.gz" && \ - cd "ffmpeg-${FFMPEG_VERSION}" && \ - curl -Lks "https://github.com/FFmpeg/FFmpeg/commit/1c7e2cf9d33968375ee4025d2279c937e147dae2.patch" | patch -p1 && \ - ./configure \ - --prefix="${SRC}" \ - --bindir="${SRC}/bin" \ - --extra-cflags="-I${SRC}/include" \ - --extra-ldflags="-L${SRC}/lib" \ - --extra-libs=-ldl \ - --enable-nonfree \ - --enable-gpl \ - --enable-version3 \ - --enable-avresample \ - --enable-libmp3lame \ - --enable-libx264 \ - --enable-openssl \ - --enable-postproc \ - --enable-small \ - --disable-debug \ - --disable-doc \ - --disable-ffserver && \ - make -j"$(nproc)" && \ - make install && \ - make distclean && \ - hash -r && \ - cd tools && \ - make qt-faststart && \ - cp qt-faststart "${SRC}/bin" && \ - rm -rf "${DIR}" && \ - echo "${SRC}/lib" > "/etc/ld.so.conf.d/libc.conf" && \ - ffmpeg -buildconf && \ - - # nginx-rtmp - DIR="$(mktemp -d)" && cd "${DIR}" && \ - curl -LOks "https://github.com/nginx/nginx/archive/release-${NGINX_VERSION}.tar.gz" && \ - tar xzvf "release-${NGINX_VERSION}.tar.gz" && \ - curl -LOks "https://github.com/sergey-dryabzhinsky/nginx-rtmp-module/archive/v${NGINX_RTMP_VERSION}.tar.gz" && \ - tar xzvf "v${NGINX_RTMP_VERSION}.tar.gz" && \ - cd "nginx-release-${NGINX_VERSION}" && \ - auto/configure \ - --with-http_ssl_module \ - --add-module="../nginx-rtmp-module-${NGINX_RTMP_VERSION}" && \ - make -j"$(nproc)" && \ - make install && \ - rm -rf "${DIR}" && \ - - apt-get purge -y --auto-remove ${BUILDDEPS} && \ - rm -rf /tmp/* +COPY --from=builder /usr/local/bin/ffmpeg /usr/local/bin/ffmpeg +COPY --from=builder /usr/local/bin/ffprobe /usr/local/bin/ffprobe +COPY --from=builder /usr/local/lib /usr/local/lib +COPY --from=builder /usr/local/nginx /usr/local/nginx COPY . /restreamer WORKDIR /restreamer -RUN npm install -g bower grunt grunt-cli nodemon public-ip eslint && \ +RUN apk add --no-cache --update git libssl1.0 pcre && \ + ffmpeg -buildconf && \ + npm install -g bower grunt grunt-cli nodemon eslint && \ npm install && \ grunt build && \ + bower cache clean --allow-root && \ + npm uninstall -g bower grunt grunt-cli nodemon eslint && \ npm prune --production && \ - npm cache clean && \ - bower cache clean --allow-root - -ENV RS_USERNAME admin -ENV RS_PASSWORD datarhei + npm cache clean --force && \ + apk del --no-cache --purge git && \ + rm -rf /var/cache/apk/* && \ + rm -rf /tmp/* EXPOSE 8080 + VOLUME ["/restreamer/db"] CMD ["./run.sh"] diff --git a/Dockerfile-armhf b/Dockerfile-armhf new file mode 100644 index 0000000..f4ec77e --- /dev/null +++ b/Dockerfile-armhf @@ -0,0 +1,38 @@ +FROM datarhei/nginx-rtmp:1.9.9-1.1.7.10-armhf as builder + +FROM resin/raspberry-pi-alpine-node:8.1-slim + +MAINTAINER datarhei + +ENV RS_USERNAME=admin \ + RS_PASSWORD=datarhei \ + SRC="/usr/local" \ + LD_LIBRARY_PATH="/usr/local/lib" \ + PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" + +COPY --from=builder /usr/local/bin/ffmpeg /usr/local/bin/ffmpeg +COPY --from=builder /usr/local/bin/ffprobe /usr/local/bin/ffprobe +COPY --from=builder /usr/local/lib /usr/local/lib +COPY --from=builder /usr/local/nginx /usr/local/nginx + +COPY . /restreamer +WORKDIR /restreamer + +RUN apk add --no-cache --update git libssl1.0 pcre && \ + ffmpeg -buildconf && \ + npm install -g bower grunt grunt-cli nodemon eslint && \ + npm install && \ + grunt build && \ + bower cache clean --allow-root && \ + npm uninstall -g bower grunt grunt-cli nodemon eslint && \ + npm prune --production && \ + npm cache clean --force && \ + apk del --purge git && \ + rm -rf /var/cache/apk/* && \ + rm -rf /tmp/* + +EXPOSE 8080 + +VOLUME ["/restreamer/db"] + +CMD ["./run.sh"] diff --git a/Dockerfile_aarch64 b/Dockerfile_aarch64 deleted file mode 100644 index e48a091..0000000 --- a/Dockerfile_aarch64 +++ /dev/null @@ -1,150 +0,0 @@ -FROM aarch64/debian:jessie - -MAINTAINER datarhei - -ENV NODE_VERSION=5.9.0 \ - NPM_VERSION=3.7.3 \ - - FFMPEG_VERSION=2.8.6 \ - YASM_VERSION=1.3.0 \ - LAME_VERSION=3_99_5 \ - NGINX_VERSION=1.9.9 \ - NGINX_RTMP_VERSION=1.1.7.10 \ - - SRC="/usr/local" - -ENV LD_LIBRARY_PATH="${SRC}/lib" \ - PKG_CONFIG_PATH="${SRC}/lib/pkgconfig" \ - - BUILDDEPS="autoconf automake gcc g++ libtool make nasm zlib1g-dev libssl-dev xz-utils cmake build-essential libpcre3-dev" - -RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes curl git libpcre3 tar perl ca-certificates ${BUILDDEPS} && \ - rm -rf /var/lib/apt/lists/* && \ - - # node - DIR="$(mktemp -d)" && cd "${DIR}" && \ - set -x && \ - curl -LOks "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-arm64.tar.gz" && \ - tar xzvf "node-v${NODE_VERSION}-linux-arm64.tar.gz" \ - -C "${SRC}" \ - --strip-components=1 && \ - npm install -g "npm@${NPM_VERSION}" --unsafe-perm && \ - npm cache clear && \ - npm config set unsafe-perm true -g --unsafe-perm && \ - rm -rf "${DIR}" && \ - - # yasm - DIR="$(mktemp -d)" && cd "${DIR}" && \ - curl -LOks "https://www.tortall.net/projects/yasm/releases/yasm-${YASM_VERSION}.tar.gz" && \ - tar xzvf "yasm-${YASM_VERSION}.tar.gz" && \ - cd "yasm-${YASM_VERSION}" && \ - cp /usr/share/automake-1.14/config.guess config.guess && \ - ./configure \ - --prefix="${SRC}" \ - --bindir="${SRC}/bin" && \ - make -j"$(nproc)" && \ - make install && \ - make distclean && \ - rm -rf "${DIR}" && \ - - # x264 - DIR="$(mktemp -d)" && cd "${DIR}" && \ - git clone --depth 1 "git://git.videolan.org/x264" && \ - cd x264 && \ - ./configure \ - --prefix="${SRC}" \ - --bindir="${SRC}/bin" \ - --enable-static \ - --disable-cli && \ - make -j"$(nproc)" && \ - make install && \ - make distclean && \ - rm -rf "${DIR}" && \ - - # libmp3lame - DIR="$(mktemp -d)" && cd "${DIR}" && \ - curl -LOks "https://github.com/rbrito/lame/archive/RELEASE__${LAME_VERSION}.tar.gz" && \ - tar xzvf "RELEASE__${LAME_VERSION}.tar.gz" && \ - cd "lame-RELEASE__${LAME_VERSION}" && \ - cp /usr/share/automake-1.14/config.guess config.guess && \ - ./configure \ - --prefix="${SRC}" \ - --bindir="${SRC}/bin" \ - --enable-nasm \ - --disable-shared && \ - make -j"$(nproc)" && \ - make install && \ - make distclean && \ - rm -rf "${DIR}" && \ - - # ffmpeg - # patch: andrew-shulgin Ignore invalid sprop-parameter-sets missing PPS - DIR="$(mktemp -d)" && cd "${DIR}" && \ - curl -LOks "https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.gz" && \ - tar xzvf "ffmpeg-${FFMPEG_VERSION}.tar.gz" && \ - cd "ffmpeg-${FFMPEG_VERSION}" && \ - curl -Lks "https://github.com/FFmpeg/FFmpeg/commit/1c7e2cf9d33968375ee4025d2279c937e147dae2.patch" | patch -p1 && \ - ./configure \ - --prefix="${SRC}" \ - --bindir="${SRC}/bin" \ - --extra-cflags="-I${SRC}/include" \ - --extra-ldflags="-L${SRC}/lib" \ - --extra-libs=-ldl \ - --enable-nonfree \ - --enable-gpl \ - --enable-version3 \ - --enable-avresample \ - --enable-libmp3lame \ - --enable-libx264 \ - --enable-openssl \ - --enable-postproc \ - --enable-small \ - --disable-debug \ - --disable-doc \ - --disable-ffserver && \ - make -j"$(nproc)" && \ - make install && \ - make distclean && \ - hash -r && \ - cd tools && \ - make qt-faststart && \ - cp qt-faststart "${SRC}/bin" && \ - rm -rf "${DIR}" && \ - echo "${SRC}/lib" > "/etc/ld.so.conf.d/libc.conf" && \ - ffmpeg -buildconf && \ - - # nginx-rtmp - DIR="$(mktemp -d)" && cd "${DIR}" && \ - curl -LOks "https://github.com/nginx/nginx/archive/release-${NGINX_VERSION}.tar.gz" && \ - tar xzvf "release-${NGINX_VERSION}.tar.gz" && \ - curl -LOks "https://github.com/sergey-dryabzhinsky/nginx-rtmp-module/archive/v${NGINX_RTMP_VERSION}.tar.gz" && \ - tar xzvf "v${NGINX_RTMP_VERSION}.tar.gz" && \ - cd "nginx-release-${NGINX_VERSION}" && \ - auto/configure \ - --with-http_ssl_module \ - --add-module="../nginx-rtmp-module-${NGINX_RTMP_VERSION}" && \ - make -j"$(nproc)" && \ - make install && \ - rm -rf "${DIR}" && \ - - apt-get purge -y --auto-remove ${BUILDDEPS} && \ - rm -rf /tmp/* - -COPY . /restreamer -WORKDIR /restreamer - -RUN npm install -g bower grunt grunt-cli nodemon public-ip && \ - npm install && \ - grunt build && \ - npm prune --production && \ - npm cache clean && \ - bower cache clean --allow-root - -ENV RS_USERNAME admin -ENV RS_PASSWORD datarhei - -EXPOSE 8080 -VOLUME ["/restreamer/db"] - -CMD ["./run.sh"] diff --git a/Dockerfile_armv6l b/Dockerfile_armv6l deleted file mode 100644 index 12a2a6a..0000000 --- a/Dockerfile_armv6l +++ /dev/null @@ -1,148 +0,0 @@ -FROM resin/rpi-raspbian:jessie - -MAINTAINER datarhei - -ENV NODE_VERSION=5.9.0 \ - NPM_VERSION=3.7.3 \ - - FFMPEG_VERSION=2.8.6 \ - YASM_VERSION=1.3.0 \ - LAME_VERSION=3_99_5 \ - NGINX_VERSION=1.9.9 \ - NGINX_RTMP_VERSION=1.1.7.10 \ - - SRC="/usr/local" - -ENV LD_LIBRARY_PATH="${SRC}/lib" \ - PKG_CONFIG_PATH="${SRC}/lib/pkgconfig" \ - - BUILDDEPS="autoconf automake gcc g++ libtool make nasm zlib1g-dev libssl-dev xz-utils cmake build-essential libpcre3-dev" - -RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes curl git libpcre3 tar perl ca-certificates ${BUILDDEPS} && \ - rm -rf /var/lib/apt/lists/* && \ - - # node - DIR="$(mktemp -d)" && cd "${DIR}" && \ - set -x && \ - curl -LOks "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-armv6l.tar.gz" && \ - tar xzvf "node-v${NODE_VERSION}-linux-armv6l.tar.gz" \ - -C "${SRC}" \ - --strip-components=1 && \ - npm install -g "npm@${NPM_VERSION}" --unsafe-perm && \ - npm cache clear && \ - npm config set unsafe-perm true -g --unsafe-perm && \ - rm -rf "${DIR}" && \ - - # yasm - DIR="$(mktemp -d)" && cd "${DIR}" && \ - curl -LOks "https://www.tortall.net/projects/yasm/releases/yasm-${YASM_VERSION}.tar.gz" && \ - tar xzvf "yasm-${YASM_VERSION}.tar.gz" && \ - cd "yasm-${YASM_VERSION}" && \ - ./configure \ - --prefix="${SRC}" \ - --bindir="${SRC}/bin" && \ - make -j"$(nproc)" && \ - make install && \ - make distclean && \ - rm -rf "${DIR}" && \ - - # x264 - DIR="$(mktemp -d)" && cd "${DIR}" && \ - git clone --depth 1 "git://git.videolan.org/x264" && \ - cd x264 && \ - ./configure \ - --prefix="${SRC}" \ - --bindir="${SRC}/bin" \ - --enable-static \ - --disable-cli && \ - make -j"$(nproc)" && \ - make install && \ - make distclean && \ - rm -rf "${DIR}" && \ - - # libmp3lame - DIR="$(mktemp -d)" && cd "${DIR}" && \ - curl -LOks "https://github.com/rbrito/lame/archive/RELEASE__${LAME_VERSION}.tar.gz" && \ - tar xzvf "RELEASE__${LAME_VERSION}.tar.gz" && \ - cd "lame-RELEASE__${LAME_VERSION}" && \ - ./configure \ - --prefix="${SRC}" \ - --bindir="${SRC}/bin" \ - --enable-nasm \ - --disable-shared && \ - make -j"$(nproc)" && \ - make install && \ - make distclean && \ - rm -rf "${DIR}" && \ - - # ffmpeg - # patch: andrew-shulgin Ignore invalid sprop-parameter-sets missing PPS - DIR="$(mktemp -d)" && cd "${DIR}" && \ - curl -LOks "https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.gz" && \ - tar xzvf "ffmpeg-${FFMPEG_VERSION}.tar.gz" && \ - cd "ffmpeg-${FFMPEG_VERSION}" && \ - curl -Lks "https://github.com/FFmpeg/FFmpeg/commit/1c7e2cf9d33968375ee4025d2279c937e147dae2.patch" | patch -p1 && \ - ./configure \ - --prefix="${SRC}" \ - --bindir="${SRC}/bin" \ - --extra-cflags="-I${SRC}/include" \ - --extra-ldflags="-L${SRC}/lib" \ - --extra-libs=-ldl \ - --enable-nonfree \ - --enable-gpl \ - --enable-version3 \ - --enable-avresample \ - --enable-libmp3lame \ - --enable-libx264 \ - --enable-openssl \ - --enable-postproc \ - --enable-small \ - --disable-debug \ - --disable-doc \ - --disable-ffserver && \ - make -j"$(nproc)" && \ - make install && \ - make distclean && \ - hash -r && \ - cd tools && \ - make qt-faststart && \ - cp qt-faststart "${SRC}/bin" && \ - rm -rf "${DIR}" && \ - echo "${SRC}/lib" > "/etc/ld.so.conf.d/libc.conf" && \ - ffmpeg -buildconf && \ - - # nginx-rtmp - DIR="$(mktemp -d)" && cd "${DIR}" && \ - curl -LOks "https://github.com/nginx/nginx/archive/release-${NGINX_VERSION}.tar.gz" && \ - tar xzvf "release-${NGINX_VERSION}.tar.gz" && \ - curl -LOks "https://github.com/sergey-dryabzhinsky/nginx-rtmp-module/archive/v${NGINX_RTMP_VERSION}.tar.gz" && \ - tar xzvf "v${NGINX_RTMP_VERSION}.tar.gz" && \ - cd "nginx-release-${NGINX_VERSION}" && \ - auto/configure \ - --with-http_ssl_module \ - --add-module="../nginx-rtmp-module-${NGINX_RTMP_VERSION}" && \ - make -j"$(nproc)" && \ - make install && \ - rm -rf "${DIR}" && \ - - apt-get purge -y --auto-remove ${BUILDDEPS} && \ - rm -rf /tmp/* - -COPY . /restreamer -WORKDIR /restreamer - -RUN npm install -g bower grunt grunt-cli nodemon public-ip && \ - npm install && \ - grunt build && \ - npm prune --production && \ - npm cache clean && \ - bower cache clean --allow-root - -ENV RS_USERNAME admin -ENV RS_PASSWORD datarhei - -EXPOSE 8080 -VOLUME ["/restreamer/db"] - -CMD ["./run.sh"] diff --git a/Dockerfile_armv7l b/Dockerfile_armv7l deleted file mode 100644 index fef552a..0000000 --- a/Dockerfile_armv7l +++ /dev/null @@ -1,148 +0,0 @@ -FROM resin/rpi-raspbian:jessie - -MAINTAINER datarhei - -ENV NODE_VERSION=5.9.0 \ - NPM_VERSION=3.7.3 \ - - FFMPEG_VERSION=2.8.6 \ - YASM_VERSION=1.3.0 \ - LAME_VERSION=3_99_5 \ - NGINX_VERSION=1.9.9 \ - NGINX_RTMP_VERSION=1.1.7.10 \ - - SRC="/usr/local" - -ENV LD_LIBRARY_PATH="${SRC}/lib" \ - PKG_CONFIG_PATH="${SRC}/lib/pkgconfig" \ - - BUILDDEPS="autoconf automake gcc g++ libtool make nasm zlib1g-dev libssl-dev xz-utils cmake build-essential libpcre3-dev" - -RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes curl git libpcre3 tar perl ca-certificates ${BUILDDEPS} && \ - rm -rf /var/lib/apt/lists/* && \ - - # node - DIR="$(mktemp -d)" && cd "${DIR}" && \ - set -x && \ - curl -LOks "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-armv7l.tar.gz" && \ - tar xzvf "node-v${NODE_VERSION}-linux-armv7l.tar.gz" \ - -C "${SRC}" \ - --strip-components=1 && \ - npm install -g "npm@${NPM_VERSION}" --unsafe-perm && \ - npm cache clear && \ - npm config set unsafe-perm true -g --unsafe-perm && \ - rm -rf "${DIR}" && \ - - # yasm - DIR="$(mktemp -d)" && cd "${DIR}" && \ - curl -LOks "https://www.tortall.net/projects/yasm/releases/yasm-${YASM_VERSION}.tar.gz" && \ - tar xzvf "yasm-${YASM_VERSION}.tar.gz" && \ - cd "yasm-${YASM_VERSION}" && \ - ./configure \ - --prefix="${SRC}" \ - --bindir="${SRC}/bin" && \ - make -j"$(nproc)" && \ - make install && \ - make distclean && \ - rm -rf "${DIR}" && \ - - # x264 - DIR="$(mktemp -d)" && cd "${DIR}" && \ - git clone --depth 1 "git://git.videolan.org/x264" && \ - cd x264 && \ - ./configure \ - --prefix="${SRC}" \ - --bindir="${SRC}/bin" \ - --enable-static \ - --disable-cli && \ - make -j"$(nproc)" && \ - make install && \ - make distclean && \ - rm -rf "${DIR}" && \ - - # libmp3lame - DIR="$(mktemp -d)" && cd "${DIR}" && \ - curl -LOks "https://github.com/rbrito/lame/archive/RELEASE__${LAME_VERSION}.tar.gz" && \ - tar xzvf "RELEASE__${LAME_VERSION}.tar.gz" && \ - cd "lame-RELEASE__${LAME_VERSION}" && \ - ./configure \ - --prefix="${SRC}" \ - --bindir="${SRC}/bin" \ - --enable-nasm \ - --disable-shared && \ - make -j"$(nproc)" && \ - make install && \ - make distclean && \ - rm -rf "${DIR}" && \ - - # ffmpeg - # patch: andrew-shulgin Ignore invalid sprop-parameter-sets missing PPS - DIR="$(mktemp -d)" && cd "${DIR}" && \ - curl -LOks "https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.gz" && \ - tar xzvf "ffmpeg-${FFMPEG_VERSION}.tar.gz" && \ - cd "ffmpeg-${FFMPEG_VERSION}" && \ - curl -Lks "https://github.com/FFmpeg/FFmpeg/commit/1c7e2cf9d33968375ee4025d2279c937e147dae2.patch" | patch -p1 && \ - ./configure \ - --prefix="${SRC}" \ - --bindir="${SRC}/bin" \ - --extra-cflags="-I${SRC}/include" \ - --extra-ldflags="-L${SRC}/lib" \ - --extra-libs=-ldl \ - --enable-nonfree \ - --enable-gpl \ - --enable-version3 \ - --enable-avresample \ - --enable-libmp3lame \ - --enable-libx264 \ - --enable-openssl \ - --enable-postproc \ - --enable-small \ - --disable-debug \ - --disable-doc \ - --disable-ffserver && \ - make -j"$(nproc)" && \ - make install && \ - make distclean && \ - hash -r && \ - cd tools && \ - make qt-faststart && \ - cp qt-faststart "${SRC}/bin" && \ - rm -rf "${DIR}" && \ - echo "${SRC}/lib" > "/etc/ld.so.conf.d/libc.conf" && \ - ffmpeg -buildconf && \ - - # nginx-rtmp - DIR="$(mktemp -d)" && cd "${DIR}" && \ - curl -LOks "https://github.com/nginx/nginx/archive/release-${NGINX_VERSION}.tar.gz" && \ - tar xzvf "release-${NGINX_VERSION}.tar.gz" && \ - curl -LOks "https://github.com/sergey-dryabzhinsky/nginx-rtmp-module/archive/v${NGINX_RTMP_VERSION}.tar.gz" && \ - tar xzvf "v${NGINX_RTMP_VERSION}.tar.gz" && \ - cd "nginx-release-${NGINX_VERSION}" && \ - auto/configure \ - --with-http_ssl_module \ - --add-module="../nginx-rtmp-module-${NGINX_RTMP_VERSION}" && \ - make -j"$(nproc)" && \ - make install && \ - rm -rf "${DIR}" && \ - - apt-get purge -y --auto-remove ${BUILDDEPS} && \ - rm -rf /tmp/* - -COPY . /restreamer -WORKDIR /restreamer - -RUN npm install -g bower grunt grunt-cli nodemon public-ip && \ - npm install && \ - grunt build && \ - npm prune --production && \ - npm cache clean && \ - bower cache clean --allow-root - -ENV RS_USERNAME admin -ENV RS_PASSWORD datarhei - -EXPOSE 8080 -VOLUME ["/restreamer/db"] - -CMD ["./run.sh"] diff --git a/README.md b/README.md index 845a081..2102df3 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -#Restreamer +# Restreamer -Datarhei/Restreamer offers smart free video streaming in real time. Stream H.264 video of IP cameras live to your website. Upload your live video on [YouTube-Live](https://www.youtube.com/), [Ustream](http://www.ustream.tv/), [Twitch](http://www.twitch.tv/), [Livestream.com](http://livestream.com/) or any other streaming solutions e.g. [Wowza-Streaming-Engine](https://www.wowza.com/). Our [Docker-Image](https://hub.docker.com/search/?q=restreamer&page=1&isAutomated=0&isOfficial=0&starCount=0&pullCount=0) is easy to install and runs on Linux, MacOS and Windows. Datarhei/Restreamer can be perfectly combined with single-board computers like [Raspberry Pi](https://www.raspberrypi.org/) and [Odroid](http://www.hardkernel.com/main/main.php). It is free (licensed under Apache 2.0) and you can use it for any purpose, private or commercial. +Datarhei/Restreamer offers smart free video streaming. Stream H.264 video of IP cameras live to your website. Upload your live video on [YouTube-Live](https://www.youtube.com/), [Ustream](http://www.ustream.tv/), [Twitch](http://www.twitch.tv/), [Livestream.com](http://livestream.com/) or any other streaming solutions e.g. [Wowza-Streaming-Engine](https://www.wowza.com/). Our [Docker-Image](https://hub.docker.com/search/?q=restreamer&page=1&isAutomated=0&isOfficial=0&starCount=0&pullCount=0) is easy to install and runs on Linux, MacOS and Windows. Datarhei/Restreamer can be perfectly combined with single-board computers like [Raspberry Pi](https://www.raspberrypi.org/) and [Odroid](http://www.hardkernel.com/main/main.php). It is free (licensed under Apache 2.0) and you can use it for any purpose, private or commercial. -##Features +## Features - User-Interface including login-security - JSON / HTTP-API @@ -11,36 +11,25 @@ Datarhei/Restreamer offers smart free video streaming in real time. Stream H.264 - Clappr-Player to embed your stream on your website - Docker and Kitematic (Docker-Toolbox) optimizations and very easy installation -## Upcomming releases - -- rc.8 (next 14 days) - -## Roadmap - -- backend refactoring -- full REST API -- optimizing FFmpeg handling -- debugging features - -##Documentation +## Documentation Documentation is available on [Datarhei/Restreamer GitHub pages](https://datarhei.github.io/restreamer/). We give you a lot of of informations from setting up a camera, embedding your player upon your website and streaming to services like e.g. YouTube-Live, Ustream and Livestream.com and many more things. More additional informations about streaming, cameras and so on you can find in our [Wiki](https://datarhei.github.com/restreamer/wiki). -##Help / Bugs +## Help / Bugs If you have problems or found a bug feel free to create a new issue upon the Github issue management. -Want to talk to us? Write an email to open@datarhei.org, go to [Support](../support.html) or choose a nickname speak to us in IRC: irc.freenode.net/#datarhei (webchat). You could ask a question in our (Forum) on Google Groups, too. +Want to talk to us? Write an email to open@datarhei.org or ask a question in our (Forum) on Google Groups. -##Authors +## Authors The Datarhei/Restreamer was created by [Julius Eitzen](https://github.com/jeitzen), [Sven Erbeck](https://github.com/svenerbeck), [Christoph Johannsdotter](https://github.com/christophjohannsdotter) and [Jan Stabenow](https://github.com/jstabenow). -Special thanks for supporting this project continuously to [Andrew Shulgin](https://github.com/andrew-shulgin). +Special thanks for supporting this project [Andrew Shulgin](https://github.com/andrew-shulgin). -##Copyright +## Copyright Code released under the [Apache license](LICENSE). Images are copyrighted by datarhei.org diff --git a/bower.json b/bower.json index 221c466..8ac1c9c 100644 --- a/bower.json +++ b/bower.json @@ -1,17 +1,17 @@ { - "name": "Restreamer", - "version": "0.1.0-rc.7.1", + "name": "restreamer", + "version": "0.1.0", "license": "Apache-2.0", "dependencies": { - "bootstrap": "3.3.6", - "jquery": "2.2.2", + "bootstrap": "3.3.7", + "jquery": "3.2.1", "html5shiv": "3.7.3", "respond": "1.4.2", - "angular-bootstrap": "~0.14.3", - "angular-animate": "1.5.0", - "ui-router": "0.2.18", - "angular-translate": "2.9.2", - "angular-translate-loader-static-files": "2.9.2" + "angular-bootstrap": "2.5.0", + "angular-animate": "1.6.6", + "angular-ui-router": "1.0.6", + "angular-translate": "2.15.2", + "angular-translate-loader-static-files": "2.15.2" }, "resolutions": { "angular": "1.5.0" diff --git a/conf/live.json b/conf/live.json index 175e989..4f00d29 100644 --- a/conf/live.json +++ b/conf/live.json @@ -39,7 +39,9 @@ "streaming": { "ip": "127.0.0.1", "rtmp_port": "1935", - "rtmp_hls_path": "/hls/" + "rtmp_hls_path": "/hls/", + "http_port": "8080", + "http_health_path": "/ping" } }, "envVars": [ diff --git a/conf/nginx.conf b/conf/nginx.conf index aa2889b..7346204 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -51,6 +51,11 @@ http { add_header Cache-Control no-cache; add_header Access-Control-Allow-Origin *; } + location = /ping { + add_header Content-Type text/plain; + return 200 "pong"; + access_log off; + } } } daemon off; diff --git a/package.json b/package.json index 9f8e1d8..fc4049e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "Restreamer", - "version": "0.1.0-rc.7.1", - "description": "Allows you to do h.264 real-time video streaming on your website without a streaming provider", + "version": "0.1.0", + "description": "Allows you to do h.264 video streaming on your website without a streaming provider", "author": "datarhei.org", "repository": { "type": "git", @@ -12,32 +12,35 @@ "start": "node ./src/start" }, "dependencies": { - "body-parser": "1.15.0", - "compression": "~1.6.1", - "cookie": "^0.2.3", - "cookie-parser": "1.4.1", - "express": "4.13.4", - "express-session": "^1.13.0", + "body-parser": "1.17.2", + "compression": "1.7.0", + "cookie": "0.3.1", + "cookie-parser": "1.4.3", + "express": "4.15.4", + "express-session": "1.15.5", "fluent-ffmpeg": "git://github.com/datarhei/node-fluent-ffmpeg", - "jsonschema": "^1.1.0", - "moment-timezone": "^0.5.2", - "node-json-db": "git://github.com/andrew-shulgin/node-json-db", - "semver": "^5.1.0", - "ps-find": "^1.1.0", - "q": "1.4.1", - "socket.io": "1.4.5" + "jsonschema": "1.2.0", + "moment-timezone": "0.5.13", + "node-json-db": "0.7.3", + "semver": "5.4.1", + "public-ip-cli": "1.1.2", + "ps-find": "1.1.0", + "q": "1.5.0", + "socket.io": "2.0.3" }, "devDependencies": { - "eslint": "2.4.0", - "babel-preset-es2015": "^6.6.0", - "grunt": "0.4.5", - "grunt-babel": "^6.0.0", - "grunt-contrib-csslint": "^1.0.0", - "grunt-contrib-cssmin": "~1.0.1", - "grunt-contrib-uglify": "~1.0.1", - "grunt-contrib-watch": "^1.0.0", - "grunt-ng-annotate": "~2.0.1", - "grunt-shell": "1.2.1", - "load-grunt-tasks": "~3.4.1" + "eslint": "4.5.0", + "babel-core": "6.26.0", + "babel-loader": "7.1.2", + "babel-preset-es2015": "6.24.1", + "grunt": "1.0.1", + "grunt-babel": "7.0.0", + "grunt-contrib-csslint": "2.0.0", + "grunt-contrib-cssmin": "2.2.1", + "grunt-contrib-uglify": "3.0.1", + "grunt-contrib-watch": "1.0.0", + "grunt-ng-annotate": "3.0.0", + "grunt-shell": "2.1.0", + "load-grunt-tasks": "3.5.2" } } diff --git a/run.sh b/run.sh index aa9d495..838e479 100755 --- a/run.sh +++ b/run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh CPU_TYPE=$(uname -m | cut -c 1-3) if [ "${MODE}" == "RASPICAM" ] && [ "$CPU_TYPE" == "arm" ]; then diff --git a/src/classes/Restreamer.js b/src/classes/Restreamer.js index a723d9d..6e05870 100644 --- a/src/classes/Restreamer.js +++ b/src/classes/Restreamer.js @@ -174,7 +174,9 @@ class Restreamer { ffmpegCommand.native(); // add -re if (streamType === 'repeatToLocalNginx') { if (Restreamer.data.options.rtspTcp && Restreamer.data.addresses.srcAddress.indexOf('rtsp') === 0) { - ffmpegCommand.inputOptions('-rtsp_transport tcp'); + ffmpegCommand.inputOptions('-err_detect','ignore_err','-rtsp_transport','tcp'); + } else { + ffmpegCommand.inputOptions('-err_detect','ignore_err'); } } } diff --git a/src/webserver/public/index.dev.html b/src/webserver/public/index.dev.html index a30385c..bbccfdf 100644 --- a/src/webserver/public/index.dev.html +++ b/src/webserver/public/index.dev.html @@ -23,7 +23,7 @@ - + diff --git a/src/webserver/public/index.prod.html b/src/webserver/public/index.prod.html index 5a5cd28..afbe748 100644 --- a/src/webserver/public/index.prod.html +++ b/src/webserver/public/index.prod.html @@ -23,7 +23,7 @@ - +