diff --git a/.bowerrc b/.bowerrc new file mode 100644 index 0000000..99d06ad --- /dev/null +++ b/.bowerrc @@ -0,0 +1,3 @@ +{ + "directory": "bin/webserver/public/libs" +} diff --git a/.csslintrc b/.csslintrc new file mode 100755 index 0000000..c96cca6 --- /dev/null +++ b/.csslintrc @@ -0,0 +1,20 @@ +{ + "adjoining-classes": false, + "box-sizing": false, + "box-model": false, + "compatible-vendor-prefixes": false, + "floats": false, + "font-sizes": false, + "gradients": false, + "important": false, + "known-properties": false, + "outline-none": false, + "qualified-headings": false, + "regex-selectors": false, + "shorthand": false, + "text-indent": false, + "unique-headings": false, + "universal-selector": false, + "unqualified-attributes": false, + "zero-units": false +} diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..7a7377d --- /dev/null +++ b/.dockerignore @@ -0,0 +1,13 @@ +# ignore dockerfiles +.dockerignore +Dockerfile +Dockerfile_armv6l +Dockerfile_armv7l +.git +.editorconfig +.gitignore +docs +node_modules +bin +db +src/webserver/public/lib/* diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..5a16b6b --- /dev/null +++ b/.editorconfig @@ -0,0 +1,15 @@ +# For more information about the properties used in +# this file, please see the EditorConfig documentation: +# http://editorconfig.org/ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 4 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..12a43f8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,68 @@ +# Compiled source # +################### +*.com +*.class +*.dll +*.exe +*.o +*.so + +# Packages # +############ +# it's better to unpack these files and commit the raw source +# git has its own built in compression methods +*.7z +*.dmg +*.gz +*.iso +*.jar +*.rar +*.tar +*.zip + +# Logs and databases # +###################### +logs +build/logs +*.log +*.sql +*.sqlite + +# OS generated files # +###################### +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db + +# IDE / Editor files # +###################### +.idea +.settings +nbproject + +# Grunt # +######### +.grunt + +# Vagrant / Docker # +#################### +.vagrant + +# Node # +######## +node_modules +bin +# Git # +####### +*.orig + +# Project files # +################# +static/webserver/public/libs/** +db/** +heapdump +*.map diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 0000000..c96d44e --- /dev/null +++ b/.jshintrc @@ -0,0 +1,4 @@ +{ + "esnext": true, + "node": true +} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b872f86 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,101 @@ +FROM node:4.2.3-slim + +MAINTAINER datarhei + +ENV FFMPEG_VERSION 2.8.1 +ENV YASM_VERSION 1.3.0 +ENV LAME_VERSION 3.99.5 +ENV NGINX_VERSION 1.8.0 + +ENV SRC /usr/local +ENV LD_LIBRARY_PATH ${SRC}/lib +ENV PKG_CONFIG_PATH ${SRC}/lib/pkgconfig + +ENV BUILDDEPS "autoconf automake gcc g++ libtool make nasm zlib1g-dev libssl-dev xz-utils cmake perl build-essential libpcre3-dev unzip" + +RUN rm -rf /var/lib/apt/lists/* && \ + apt-get update && \ + apt-get install -y curl wget git libpcre3 tar ${BUILDDEPS} + +# yasm +RUN DIR=$(mktemp -d) && cd ${DIR} && \ + curl -Os http://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 && \ + make install && \ + make distclean && \ + rm -rf ${DIR} + +# x264 +RUN DIR=$(mktemp -d) && cd ${DIR} && \ + git clone --depth 1 git://git.videolan.org/x264 && \ + cd x264 && \ + ./configure --prefix="$SRC" --bindir="${SRC}/bin" --enable-static && \ + make && \ + make install && \ + make distclean && \ + rm -rf ${DIR} + +# libmp3lame +RUN DIR=$(mktemp -d) && cd ${DIR} && \ + curl -L -Os http://downloads.sourceforge.net/project/lame/lame/${LAME_VERSION%.*}/lame-${LAME_VERSION}.tar.gz && \ + tar xzvf lame-${LAME_VERSION}.tar.gz && \ + cd lame-${LAME_VERSION} && \ + ./configure --prefix="${SRC}" --bindir="${SRC}/bin" --disable-shared --enable-nasm && \ + make && \ + make install && \ + make distclean&& \ + rm -rf ${DIR} + +# ffmpeg +RUN DIR=$(mktemp -d) && cd ${DIR} && \ + curl -Os http://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.gz && \ + tar xzvf ffmpeg-${FFMPEG_VERSION}.tar.gz && \ + cd ffmpeg-${FFMPEG_VERSION} && \ + ./configure --prefix="${SRC}" --extra-cflags="-I${SRC}/include" --extra-ldflags="-L${SRC}/lib" --bindir="${SRC}/bin" \ + --extra-libs=-ldl --enable-version3 --enable-libmp3lame --enable-libx264 --enable-gpl \ + --enable-postproc --enable-nonfree --enable-avresample --disable-debug --enable-small --enable-openssl && \ + make && \ + make install && \ + make distclean && \ + hash -r && \ + cd tools && \ + make qt-faststart && \ + cp qt-faststart ${SRC}/bin && \ + rm -rf ${DIR} +RUN echo "/usr/local/lib" > /etc/ld.so.conf.d/libc.conf +RUN ffmpeg -buildconf + +# nginx-rtmp +RUN DIR=$(mktemp -d) && cd ${DIR} && \ + curl -LOks http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz && \ + tar -zxvf nginx-${NGINX_VERSION}.tar.gz && \ + curl -LOks https://github.com/arut/nginx-rtmp-module/archive/master.zip && \ + unzip master.zip && \ + rm master.zip && \ + cd nginx-${NGINX_VERSION} && \ + ./configure --with-http_ssl_module --add-module=../nginx-rtmp-module-master && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN apt-get purge -y --auto-remove ${BUILDDEPS} && \ + apt-get install -y git && \ + rm -rf /tmp/* + +COPY . /restreamer +WORKDIR /restreamer + +RUN npm install -g bower grunt-bower grunt-cli public-ip && \ + npm install && \ + grunt build + +ENV RESTREAMER_USERNAME admin +ENV RESTREAMER_PASSWORD datarhei + +EXPOSE 8080 +VOLUME ["/restreamer/db"] + +CMD ["./run.sh"] diff --git a/Dockerfile_armv6l b/Dockerfile_armv6l new file mode 100644 index 0000000..28f37e1 --- /dev/null +++ b/Dockerfile_armv6l @@ -0,0 +1,115 @@ +FROM resin/rpi-raspbian:jessie + +MAINTAINER datarhei + +ENV NODE_VERSION 4.2.3 +ENV NPM_VERSION 2.14.7 + +ENV FFMPEG_VERSION 2.8.1 +ENV YASM_VERSION 1.3.0 +ENV LAME_VERSION 3.99.5 +ENV NGINX_VERSION 1.8.0 + +ENV SRC /usr/local +ENV LD_LIBRARY_PATH ${SRC}/lib +ENV PKG_CONFIG_PATH ${SRC}/lib/pkgconfig + +ENV BUILDDEPS "autoconf automake gcc g++ libtool make nasm zlib1g-dev libssl-dev xz-utils cmake perl build-essential libpcre3-dev unzip" + +RUN rm -rf /var/lib/apt/lists/* && \ + apt-get update && \ + apt-get install -y curl wget git libpcre3 tar ${BUILDDEPS} + +# node +RUN DIR=$(mktemp -d) && cd ${DIR} && \ + set -x && \ + wget "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-armv6l.tar.gz" && \ + tar -xzf "node-v$NODE_VERSION-linux-armv6l.tar.gz" -C /usr/local --strip-components=1 && \ + rm "node-v$NODE_VERSION-linux-armv6l.tar.gz" && \ + npm install -g npm@"$NPM_VERSION" --unsafe-perm && \ + npm cache clear && \ + npm config set unsafe-perm true -g --unsafe-perm && \ + rm -rf ${DIR} + +# yasm +RUN DIR=$(mktemp -d) && cd ${DIR} && \ + curl -Os http://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 && \ + make install && \ + make distclean && \ + rm -rf ${DIR} + +# x264 +RUN DIR=$(mktemp -d) && cd ${DIR} && \ + git clone --depth 1 git://git.videolan.org/x264 && \ + cd x264 && \ + ./configure --prefix="$SRC" --bindir="${SRC}/bin" --enable-static && \ + make && \ + make install && \ + make distclean && \ + rm -rf ${DIR} + +# libmp3lame +RUN DIR=$(mktemp -d) && cd ${DIR} && \ + curl -L -Os http://downloads.sourceforge.net/project/lame/lame/${LAME_VERSION%.*}/lame-${LAME_VERSION}.tar.gz && \ + tar xzvf lame-${LAME_VERSION}.tar.gz && \ + cd lame-${LAME_VERSION} && \ + ./configure --prefix="${SRC}" --bindir="${SRC}/bin" --disable-shared --enable-nasm && \ + make && \ + make install && \ + make distclean&& \ + rm -rf ${DIR} + +# ffmpeg +RUN DIR=$(mktemp -d) && cd ${DIR} && \ + curl -Os http://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.gz && \ + tar xzvf ffmpeg-${FFMPEG_VERSION}.tar.gz && \ + cd ffmpeg-${FFMPEG_VERSION} && \ + ./configure --prefix="${SRC}" --extra-cflags="-I${SRC}/include" --extra-ldflags="-L${SRC}/lib" --bindir="${SRC}/bin" \ + --extra-libs=-ldl --enable-version3 --enable-libmp3lame --enable-libx264 --enable-gpl \ + --enable-postproc --enable-nonfree --enable-avresample --disable-debug --enable-small --enable-openssl && \ + make && \ + make install && \ + make distclean && \ + hash -r && \ + cd tools && \ + make qt-faststart && \ + cp qt-faststart ${SRC}/bin && \ + rm -rf ${DIR} +RUN echo "/usr/local/lib" > /etc/ld.so.conf.d/libc.conf +RUN ffmpeg -buildconf + +# nginx-rtmp +RUN DIR=$(mktemp -d) && cd ${DIR} && \ + curl -LOks http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz && \ + tar -zxvf nginx-${NGINX_VERSION}.tar.gz && \ + curl -LOks https://github.com/arut/nginx-rtmp-module/archive/master.zip && \ + unzip master.zip && \ + rm master.zip && \ + cd nginx-${NGINX_VERSION} && \ + ./configure --with-http_ssl_module --add-module=../nginx-rtmp-module-master && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN apt-get purge -y --auto-remove ${BUILDDEPS} && \ + apt-get install -y --force-yes git && \ + rm -rf /tmp/* + +COPY . /restreamer +WORKDIR /restreamer + +RUN npm install -g bower grunt-bower grunt-cli public-ip && \ + npm install && \ + grunt build + +ENV RESTREAMER_USERNAME admin +ENV RESTREAMER_PASSWORD datarhei + +EXPOSE 8080 +VOLUME ["/restreamer/db"] + +CMD ["./run.sh"] diff --git a/Dockerfile_armv7l b/Dockerfile_armv7l new file mode 100644 index 0000000..64241a2 --- /dev/null +++ b/Dockerfile_armv7l @@ -0,0 +1,115 @@ +FROM armbuild/debian:jessie + +MAINTAINER datarhei + +ENV NODE_VERSION 4.2.3 +ENV NPM_VERSION 2.14.7 + +ENV FFMPEG_VERSION 2.8.1 +ENV YASM_VERSION 1.3.0 +ENV LAME_VERSION 3.99.5 +ENV NGINX_VERSION 1.8.0 + +ENV SRC /usr/local +ENV LD_LIBRARY_PATH ${SRC}/lib +ENV PKG_CONFIG_PATH ${SRC}/lib/pkgconfig + +ENV BUILDDEPS "autoconf automake gcc g++ libtool make nasm zlib1g-dev libssl-dev xz-utils cmake perl build-essential libpcre3-dev unzip" + +RUN rm -rf /var/lib/apt/lists/* && \ + apt-get update && \ + apt-get install -y curl wget git libpcre3 tar ${BUILDDEPS} + +# node +RUN DIR=$(mktemp -d) && cd ${DIR} && \ + set -x && \ + wget "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-armv7l.tar.gz" && \ + tar -xzf "node-v$NODE_VERSION-linux-armv7l.tar.gz" -C /usr/local --strip-components=1 && \ + rm "node-v$NODE_VERSION-linux-armv7l.tar.gz" && \ + npm install -g npm@"$NPM_VERSION" --unsafe-perm && \ + npm cache clear && \ + npm config set unsafe-perm true -g --unsafe-perm && \ + rm -rf ${DIR} + +# yasm +RUN DIR=$(mktemp -d) && cd ${DIR} && \ + curl -Os http://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 && \ + make install && \ + make distclean && \ + rm -rf ${DIR} + +# x264 +RUN DIR=$(mktemp -d) && cd ${DIR} && \ + git clone --depth 1 git://git.videolan.org/x264 && \ + cd x264 && \ + ./configure --prefix="$SRC" --bindir="${SRC}/bin" --enable-static && \ + make && \ + make install && \ + make distclean && \ + rm -rf ${DIR} + +# libmp3lame +RUN DIR=$(mktemp -d) && cd ${DIR} && \ + curl -L -Os http://downloads.sourceforge.net/project/lame/lame/${LAME_VERSION%.*}/lame-${LAME_VERSION}.tar.gz && \ + tar xzvf lame-${LAME_VERSION}.tar.gz && \ + cd lame-${LAME_VERSION} && \ + ./configure --prefix="${SRC}" --bindir="${SRC}/bin" --disable-shared --enable-nasm && \ + make && \ + make install && \ + make distclean&& \ + rm -rf ${DIR} + +# ffmpeg +RUN DIR=$(mktemp -d) && cd ${DIR} && \ + curl -Os http://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.gz && \ + tar xzvf ffmpeg-${FFMPEG_VERSION}.tar.gz && \ + cd ffmpeg-${FFMPEG_VERSION} && \ + ./configure --prefix="${SRC}" --extra-cflags="-I${SRC}/include" --extra-ldflags="-L${SRC}/lib" --bindir="${SRC}/bin" \ + --extra-libs=-ldl --enable-version3 --enable-libmp3lame --enable-libx264 --enable-gpl \ + --enable-postproc --enable-nonfree --enable-avresample --disable-debug --enable-small --enable-openssl && \ + make && \ + make install && \ + make distclean && \ + hash -r && \ + cd tools && \ + make qt-faststart && \ + cp qt-faststart ${SRC}/bin && \ + rm -rf ${DIR} +RUN echo "/usr/local/lib" > /etc/ld.so.conf.d/libc.conf +RUN ffmpeg -buildconf + +# nginx-rtmp +RUN DIR=$(mktemp -d) && cd ${DIR} && \ + curl -LOks http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz && \ + tar -zxvf nginx-${NGINX_VERSION}.tar.gz && \ + curl -LOks https://github.com/arut/nginx-rtmp-module/archive/master.zip && \ + unzip master.zip && \ + rm master.zip && \ + cd nginx-${NGINX_VERSION} && \ + ./configure --with-http_ssl_module --add-module=../nginx-rtmp-module-master && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN apt-get purge -y --auto-remove ${BUILDDEPS} && \ + apt-get install -y git && \ + rm -rf /tmp/* + +COPY . /restreamer +WORKDIR /restreamer + +RUN npm install -g bower grunt-bower grunt-cli public-ip && \ + npm install && \ + grunt build + +ENV RESTREAMER_USERNAME admin +ENV RESTREAMER_PASSWORD datarhei + +EXPOSE 8080 +VOLUME ["/restreamer/db"] + +CMD ["./run.sh"] diff --git a/README.md b/README.md index 5e409d6..5a97b71 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,28 @@ -# restreamer -Out of the box livestreaming solution without external services +# Restreamer +Datarhei/Restreamer allows smart free video streaming in real time. Stream H.264 video of IP cameras live to your website. Pump your live video to [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). + +## Features + +- User-Interface incl. Basic-Auth +- JSON / HTTP-API +- [FFmpeg](http://ffmpeg.org/) streamig/encoding the video/camera-stream, creating snapshots or pushing to a external streaming-endpoint +- [NGINX](http://nginx.org/) incl. [RTMP-Module](https://github.com/arut/nginx-rtmp-module) as streaming-backend and hls server +- [Clappr-Player](https://github.com/clappr/clappr) to embed your stream on your website +- [Docker](https://www.docker.com/) and [Kitematic](https://kitematic.com/) optimizations and very easy installation + +## Documentation +The documentation is available on the [Datarhei/Restreamer GitHub pages site](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 +If you have problems or found a bug feel free to create a new issue upon the [Github issue management](https://github.com/datarhei/restreamer/issues). + +Need personal help or want to talk to us? Write email open@datarhei.org, go to [Support](http://datarhei.org/restreamer/support.html) or choose a nickname and join us on #datarhei webchat on freenode. + +## Authors +The Datarhei/Restreamer was created by [Julius Eitzen](https://github.com/orgs/datarhei/people/ennitje), [Sven Erbeck](https://github.com/orgs/datarhei/people/svenerbeck), [Christoph Johannsdotter](https://github.com/orgs/datarhei/people/christophjohannsdotter) and [Jan Stabenow](https://github.com/jstabenow). + +## Copyright +Code released under the [Apache license](LICENSE). Images are copyrighted by datarhei.org diff --git a/bower.json b/bower.json new file mode 100644 index 0000000..2590a98 --- /dev/null +++ b/bower.json @@ -0,0 +1,19 @@ +{ + "name": "ReStreamer", + "version": "0.1.0-RC1", + "license": "Apache-2.0", + "dependencies": { + "bootstrap": "3.3.6", + "jquery": "2.1.4", + "html5shiv": "3.7.3", + "respond": "1.4.2", + "angular-bootstrap": "~0.13.3", + "angular-animate": "1.4.8", + "ui-router": "~0.2.15", + "angular-translate": "~2.8.1", + "angular-translate-loader-static-files": "~2.8.1" + }, + "resolutions": { + "angular": "1.4.8" + } +} diff --git a/conf/jsondb_v1_schema.json b/conf/jsondb_v1_schema.json new file mode 100644 index 0000000..216b558 --- /dev/null +++ b/conf/jsondb_v1_schema.json @@ -0,0 +1,87 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://jsonschema.net", + "type": "object", + "properties": { + "addresses": { + "id": "http://jsonschema.net/addresses", + "type": "object", + "properties": { + "srcAddress": { + "id": "http://jsonschema.net/addresses/srcAddress", + "type": "string" + }, + "optionalOutputAddress": { + "id": "http://jsonschema.net/addresses/optionalOutputAddress", + "type": "string" + } + }, + "required": [ + "srcAddress", + "optionalOutputAddress" + ] + }, + "states": { + "id": "http://jsonschema.net/states", + "type": "object", + "properties": { + "repeatToLocalNginx": { + "id": "http://jsonschema.net/states/repeatToLocalNginx", + "type": "object", + "properties": { + "type": { + "id": "http://jsonschema.net/states/repeatToLocalNginx/type", + "type": "string" + } + } + }, + "repeatToOptionalOutput": { + "id": "http://jsonschema.net/states/repeatToOptionalOutput", + "type": "object", + "properties": { + "type": { + "id": "http://jsonschema.net/states/repeatToOptionalOutput/type", + "type": "string" + } + } + } + } + }, + "userActions": { + "id": "http://jsonschema.net/userActions", + "type": "object", + "properties": { + "repeatToLocalNginx": { + "id": "http://jsonschema.net/userActions/repeatToLocalNginx", + "type": "string" + }, + "repeatToOptionalOutput": { + "id": "http://jsonschema.net/userActions/repeatToOptionalOutput", + "type": "string" + } + } + }, + "progresses": { + "id": "http://jsonschema.net/progresses", + "type": "object", + "properties": { + "repeatToLocalNginx": { + "id": "http://jsonschema.net/progresses/repeatToLocalNginx", + "type": "object", + "properties": {} + }, + "repeatToOptionalOutput": { + "id": "http://jsonschema.net/progresses/repeatToOptionalOutput", + "type": "object", + "properties": {} + } + } + } + }, + "required": [ + "addresses", + "states", + "userActions", + "progresses" + ] +} diff --git a/conf/live.json b/conf/live.json new file mode 100644 index 0000000..9847648 --- /dev/null +++ b/conf/live.json @@ -0,0 +1,49 @@ +{ + "name": "live", + "jsondb": "db/v1", + "auth": { + "username": "admin", + "password": "datarhei" + }, + "ffmpeg": { + "options": { + "native_h264":[ + "-c copy", + "-map_metadata -1", + "-metadata application=datarhei/ReStreamer", + "-metadata server=NGINX(RTMP-Module)", + "-f flv" + ], + "native_h264_soundless_aac":[ + "-ar 44100", + "-ac 2", + "-acodec pcm_s16le", + "-f s16le", + "-ac 2", + "-i /dev/zero", + "-c:v copy", + "-acodec aac", + "-ab 128k", + "-map_metadata -1", + "-metadata application=datarhei/ReStreamer", + "-metadata server=NGINX(RTMP-Module)", + "-f flv" + ], + "snapshot": "-vframes 1" + }, + "monitor": { + "restart_wait": "6000", + "retries": 10 + } + }, + "nginx": { + "exec": "/usr/local/nginx/sbin/nginx -c /restreamer/conf/nginx.conf", + "streaming": { + "ip": "127.0.0.1", + "rtmp_port": "1935", + "rtmp_path": "/live/", + "hls_port": "8080", + "hls_path": "/hls/" + } + } +} diff --git a/conf/nginx.conf b/conf/nginx.conf new file mode 100644 index 0000000..384c8b5 --- /dev/null +++ b/conf/nginx.conf @@ -0,0 +1,65 @@ +error_log stderr; +worker_processes 1; +events { + worker_connections 1024; +} +rtmp { + server { + listen 1935; + chunk_size 4000; + application live { + live on; + meta copy; + allow publish 127.0.0.1; + deny publish all; + } + application hls { + live on; + hls on; + hls_playlist_length 60s; + hls_fragment 2s; + hls_path /tmp/hls; + meta copy; + allow publish 127.0.0.1; + deny publish all; + } + } +} +http { + sendfile off; + tcp_nopush on; + server { + listen 8080; + location / { + proxy_pass http://127.0.0.1:3000; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host $host; + } + location /player.html { + root /restreamer/bin/webserver/public; + allow all; + } + location /libs { + root /restreamer/bin/webserver/public; + allow all; + include /usr/local/nginx/conf/mime.types; + add_header Access-Control-Allow-Origin *; + } + location /images { + root /restreamer/bin/webserver/public; + allow all; + } + location /hls { + types { + application/vnd.apple.mpegurl m3u8; + video/mp2t ts; + } + root /tmp; + add_header Cache-Control no-cache; + add_header Access-Control-Allow-Origin *; + } + } +} +daemon off; diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..bd5d188 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,2 @@ +_site/ + diff --git a/docs/Dockerfile b/docs/Dockerfile new file mode 100644 index 0000000..8696172 --- /dev/null +++ b/docs/Dockerfile @@ -0,0 +1,14 @@ +FROM node:4.2.2-slim + +RUN apt-get update && \ + apt-get install -y gem ruby-dev make autoconf python-dev + +COPY . /restreamer +WORKDIR /restreamer + +RUN apt-get install -y ruby rubygems-integration build-essential + +RUN gem install RedCloth bundler +RUN bundle install + +CMD ["bundle", "exec", "jekyll", "serve", "-H", "0.0.0.0", "-w"] diff --git a/docs/Gemfile b/docs/Gemfile new file mode 100644 index 0000000..e0aa7cd --- /dev/null +++ b/docs/Gemfile @@ -0,0 +1,25 @@ +source 'https://rubygems.org' + +# Jekyll +gem "jekyll" +gem "jekyll-coffeescript" +gem "jekyll-sass-converter" + +# Converters +gem "kramdown" +gem "maruku" +gem "rdiscount" +gem "redcarpet" +gem "RedCloth" + +# Liquid +gem "liquid" + +# Highlighters +gem "pygments.rb" + +# Plugins +#gem "jemoji" +#gem "jekyll-mentions" +gem "jekyll-redirect-from" +gem "jekyll-sitemap" diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock new file mode 100644 index 0000000..2028e99 --- /dev/null +++ b/docs/Gemfile.lock @@ -0,0 +1,87 @@ +GEM + remote: https://rubygems.org/ + specs: + RedCloth (4.2.9) + blankslate (2.1.2.4) + celluloid (0.16.0) + timers (~> 4.0.0) + classifier-reborn (2.0.3) + fast-stemmer (~> 1.0) + coffee-script (2.4.1) + coffee-script-source + execjs + coffee-script-source (1.9.1.1) + colorator (0.1) + execjs (2.5.2) + fast-stemmer (1.0.2) + ffi (1.9.10) + hitimes (1.2.2) + jekyll (2.5.3) + classifier-reborn (~> 2.0) + colorator (~> 0.1) + jekyll-coffeescript (~> 1.0) + jekyll-gist (~> 1.0) + jekyll-paginate (~> 1.0) + jekyll-sass-converter (~> 1.0) + jekyll-watch (~> 1.1) + kramdown (~> 1.3) + liquid (~> 2.6.1) + mercenary (~> 0.3.3) + pygments.rb (~> 0.6.0) + redcarpet (~> 3.1) + safe_yaml (~> 1.0) + toml (~> 0.1.0) + jekyll-coffeescript (1.0.1) + coffee-script (~> 2.2) + jekyll-gist (1.2.1) + jekyll-paginate (1.1.0) + jekyll-redirect-from (0.8.0) + jekyll (>= 2.0) + jekyll-sass-converter (1.3.0) + sass (~> 3.2) + jekyll-sitemap (0.8.1) + jekyll-watch (1.2.1) + listen (~> 2.7) + kramdown (1.8.0) + liquid (2.6.2) + listen (2.10.1) + celluloid (~> 0.16.0) + rb-fsevent (>= 0.9.3) + rb-inotify (>= 0.9) + maruku (0.7.2) + mercenary (0.3.5) + parslet (1.5.0) + blankslate (~> 2.0) + posix-spawn (0.3.11) + pygments.rb (0.6.3) + posix-spawn (~> 0.3.6) + yajl-ruby (~> 1.2.0) + rb-fsevent (0.9.5) + rb-inotify (0.9.5) + ffi (>= 0.5.0) + rdiscount (2.1.8) + redcarpet (3.3.2) + safe_yaml (1.0.4) + sass (3.4.16) + timers (4.0.1) + hitimes + toml (0.1.2) + parslet (~> 1.5.0) + yajl-ruby (1.2.1) + +PLATFORMS + ruby + +DEPENDENCIES + RedCloth + jekyll + jekyll-coffeescript + jekyll-redirect-from + jekyll-sass-converter + jekyll-sitemap + kramdown + liquid + maruku + pygments.rb + rdiscount + redcarpet diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..b6f1dde --- /dev/null +++ b/docs/README.md @@ -0,0 +1,44 @@ +# ReStreamer Docs and Website + +## Setup + +1. Clone the ReStreamer repository + +2. Change into the "docs" directory where docs live + + $ cd docs + +3. Build the Dockerfile + + $ docker build -t rs-docs . + +4. Start the web server + + $ docker run -d -p 4000:4000 -v $PWD:/restreamer rs-docs + +5. Visit the site at + http://docker-host-ip:4000/restreamer/ + +## Deployment + +1. Clone a separate copy of the ReStreamer repo as a sibling of your normal + ReStreamer project directory and name it "restreamer-gh-pages". + + $ git clone git@github.com:datarhei/restreamer.git restreamer-gh-pages + +2. Check out the "gh-pages" branch. + + $ cd /path/to/restreamer-gh-pages + $ git checkout gh-pages + +3. Copy the contents of the "docs" directory in master to the root of your + restreamer-gh-pages directory. + + $ cd /path/to/restreamer + $ cp -r docs/** ../restreamer-gh-pages + +4. Change to the small-restreamer-gh-pages directory, commit, and push the changes + + $ cd /path/to/restreamer-gh-pages + $ git commit . -m "Syncing docs with master branch" + $ git push diff --git a/docs/_config.yml b/docs/_config.yml new file mode 100644 index 0000000..bd2bf9c --- /dev/null +++ b/docs/_config.yml @@ -0,0 +1,41 @@ +defaults: + - + scope: + path: "" + values: + layout: default + - + scope: + path: "docs" + values: + layout: docs + tab: docs + - + scope: + path: "wiki" + values: + layout: wiki + tab: wiki + - + scope: + path: "wiki/basic_know_how" + values: + layout: wiki-basic + - + scope: + path: "wiki/general_instructions" + values: + layout: wiki-general + +sass: + sass_dir: _sass + style: :compressed + +baseurl: "/restreamer" +highlighter: pygments +lsi: false +markdown: redcarpet +redcarpet: + extensions: [with_toc_data, tables] +safe: true +source: . diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html new file mode 100644 index 0000000..bf0efaa --- /dev/null +++ b/docs/_layouts/default.html @@ -0,0 +1,57 @@ + + + + + + + ReStreamer: {{ page.title }} + + + + + +
+ +
+
+ {{content}} + +
+
+
+ + + + diff --git a/docs/_layouts/docs.html b/docs/_layouts/docs.html new file mode 100644 index 0000000..a8f5df6 --- /dev/null +++ b/docs/_layouts/docs.html @@ -0,0 +1,106 @@ +--- +layout: pages +--- + + diff --git a/docs/_layouts/pages.html b/docs/_layouts/pages.html new file mode 100644 index 0000000..fddd53f --- /dev/null +++ b/docs/_layouts/pages.html @@ -0,0 +1,58 @@ + + + + + + + ReStreamer: {{ page.title }} + + + + + + +
+
+ {{content}} + +
+ + + + + diff --git a/docs/_layouts/wiki-basic.html b/docs/_layouts/wiki-basic.html new file mode 100644 index 0000000..b691d24 --- /dev/null +++ b/docs/_layouts/wiki-basic.html @@ -0,0 +1,86 @@ +--- +layout: pages +--- + + + + + \ No newline at end of file diff --git a/docs/_layouts/wiki-general.html b/docs/_layouts/wiki-general.html new file mode 100644 index 0000000..c026502 --- /dev/null +++ b/docs/_layouts/wiki-general.html @@ -0,0 +1,82 @@ +--- +layout: pages +--- + diff --git a/docs/_layouts/wiki.html b/docs/_layouts/wiki.html new file mode 100644 index 0000000..77e2438 --- /dev/null +++ b/docs/_layouts/wiki.html @@ -0,0 +1,74 @@ +--- +layout: pages +--- +
+ +
+ {{ content }} +
+
diff --git a/docs/_sass/_base.scss b/docs/_sass/_base.scss new file mode 100644 index 0000000..6b00587 --- /dev/null +++ b/docs/_sass/_base.scss @@ -0,0 +1,128 @@ +@font-face { + font-family: 'Montserrat'; + font-style: normal; + font-weight: 400; + src: local('Montserrat-Regular'), url(https://themes.googleusercontent.com/static/fonts/montserrat/v4/zhcz-_WihjSQC0oHJ9TCYL3hpw3pgy2gAi-Ip7WPMi0.woff) format('woff'); +} + +h1, .h1, +h2, .h2, +h3, .h3, +h4, .h4 { + font-family: Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif; +} + +h5, .h5 { + font-size: 16px; +} + +body { + background-color: #f6f6f6; + color: #323539; + line-height: 1.7; + font-size: 16px; + padding-top: 20px; +} + +footer { + margin-bottom: 20px; + margin-top: 20px; +} + +html, body { + height:100%; + margin:0; + padding:0 +} + +.site-wrapper { + height:100%; + display:table; + width: 100%; + padding: 0; + background: url(../img/bg.png) no-repeat center center fixed; + -webkit-background-size: cover; + -moz-background-size: cover; + -o-background-size: cover; + background-size: cover; + background-color: #3d3d38; +} + +.site-wrapper-body { + float: none; + margin: 0 auto; + max-width: 500px; + border-color: #ac1527; + border-width: 1px; + border-style: solid; + border-radius: 10px; + padding: 50px; + font-weight: bold; +} + +.site-wrapper-row { + height: 100%; + display:table-cell; + vertical-align: middle; +} + +.row { + margin-right: -5px; + margin-left: -5px; +} + +.container { + max-width: 1280px; +} + +hr { + border-color: #ddd; +} + +.hr-landingpage { + border-bottom: 1px solid #454543; + border-top: 1px solid #2b2b2a; + margin-top: 40px; + margin-bottom: 40px; +} + +pre { + background-color: #fff; +} + +.btn-success { + background-color: #57945c; + border-color: #57945c; +} + +.navbar { + border: none; +} + +.navbar-inverse { + background-color: #3d3d38; + border-color: transparent; + font-weight: 200; +} + +.navbar-inverse .navbar-brand, +.navbar-inverse .nav > li > a { + color: #fff; +} + +.navbar-inverse .navbar-nav > li > a:hover { + color: #fff; + background-color: transparent; + font-weight: bold; +} + +.navbar-inverse .navbar-nav>.active>a, .navbar-inverse .navbar-nav>.active>a:hover, .navbar-inverse .navbar-nav>.active>a:focus { + color: #fff; + background-color: transparent; + font-weight: bold; +} + +a { + color: #57945c; + text-decoration: none; +} diff --git a/docs/css/style.scss b/docs/css/style.scss new file mode 100644 index 0000000..9c288c5 --- /dev/null +++ b/docs/css/style.scss @@ -0,0 +1,4 @@ +--- +--- + +@import "base"; diff --git a/docs/docs/depricated_guides-embed-player.md b/docs/docs/depricated_guides-embed-player.md new file mode 100644 index 0000000..03e8477 --- /dev/null +++ b/docs/docs/depricated_guides-embed-player.md @@ -0,0 +1,30 @@ +--- +title: Embed the Player +--- + +# Embed the Player + +Für die Einbindung findest Du in der Oberfläche die erforderlichen Code-Beispiele, sobald Du auf den Link "Player öffnen" klickst. + +Damit die Dienste aber auch über Deinen Internet-Anschluss verfügbar sind, musst Du als Erstes Deinen Router entsprechend konfigurieren und den Port 8080 auf das Gerät weiterleiten, auf dem Du den ReStreamer betreibst. Bitte schaue dafür ggf. in das Handbuch Deines Routers und suche nach "Port-Weiterleitung". + +Kopiere anschließend den iFrame-Code von der Playerseite, füge ihn in dem gewünschten Bereich auf Deiner Webseite ein (HTML-Kenntnisse sind minimal erforderlich) und veröffentliche die Änderung. Sofern die Port-Weiterleitung korrekt eingerichtet ist und der ReStreamer korrekt läuft sollte der clappr-Player zu laden und Dein Kamera-Stream abrufbar sein. + +[![UI-Preview](../img/embed-player.png)](http://datarhei.org/showroom/) + +**Hinweis:** +Da die meisten Internet-Anbieter dynamische IP-Adressen zuweisen, sollte man sich ggf. bei einem DynDNS-Service (z.B. dnydns.org) anbmelden. Die meisten Router bieten dafür schon auf der Web-Oberfläche entsprechende Funktionen, welche eine seperate Installation nicht mehr erforderlich macht. Sobald Du Dir solch eine Domain (z.b. max-mustermann.dnydns.org) eingerichtet und diese aktiviert hast, kann Du in dem Code-Beispielen die Source wie folgt abändern: + +```html + +```` + +```html + +``` + +--- + +Want to talk to us? Write email open@datarhei.org, go to [Support](../support.html) or choose a nickname and join us on #datarhei webchat on freenode. + +If you're having a weird problem while developing, see [Known Issues](https://github.com/datarhei/small-restreamer-internal/issues/). diff --git a/docs/docs/development-architecture.md b/docs/docs/development-architecture.md new file mode 100644 index 0000000..39f67c6 --- /dev/null +++ b/docs/docs/development-architecture.md @@ -0,0 +1,32 @@ +--- +title: Architecture +--- + +# Architecture + +Der Datarhei/Restreamer besteht grundlegend aus vier verschiedenen Applikationen: + +* Frontend basierend auf Angular und Node.js für das Prozessmanagement +* NGINX inkl. dem RTMP-Modul +* ffmpeg als universeller Video-Prozessor +* clappr als Video-Player + +--- + +![UI-Preview](../img/architecture.png) + +--- + +### Prozesse: + +1. die Applikation stellt das User-Interface/HTTP-API bereit und startet den NGINX-Webserver mit der mitgelieferten Config (/restreamer/config/nginx.conf) +2. ffmpeg holt den Kamera-Stream und leitet ihn weiter an den lokalen NGINX-RTMP-Server auf rtmp://127.0.0.1:1935/live/live.stream und rtmp://127.0.0.1:1935/hls/live.stream.m3u8 +3. ab jetzt stellt der NGINX-RTMP den Stream unter der Adressen http://...:8080/live/live.stream.m3u8 bereit +4. der clappr-Player ruft den Stream per HTTP (HLS) ab +5. zusätzlich wird, sofern konfiguriert, per ffmpeg den am lokalen NGINX-RTMP anliegenden Kamera-Stream von rtmp://127.0.0.1:1935/live/live.stream ab und leitet diesen zu der eingetragenen Adresse weiter + +--- + +Want to talk to us? Write email open@datarhei.org, go to [Support](../support.html) or choose a nickname and join us on #datarhei webchat on freenode. + +If you're having a weird problem while developing, see [Known Issues](https://github.com/datarhei/small-restreamer-internal/issues/). diff --git a/docs/docs/docker-setup.md b/docs/docs/docker-setup.md new file mode 100644 index 0000000..fd87121 --- /dev/null +++ b/docs/docs/docker-setup.md @@ -0,0 +1,71 @@ +--- +title: Easy setup with Docker +--- + +# Easy setup with Docker +There are three different and ready to start repo images avaiable upon Docker-Hub. Follow examples to run the Restreamer in 5-10 minutes. (other platforms may need different instructions but can be the same): + +* **ARMv6l** + * [Raspberry Pi 1](#raspberry-pi-1) +* **ARMv7l** + * [Raspberry Pi 2](#raspberry-pi-2) + * [Odroid U3](#odroid-u3) +* **Intel/AMD 64bit** + * [OSX & Windows](#osx-windows) + * [Linux)](#linux) (e.g. Ubuntu, Debian) + +*[Here](hints.html) are some additional hints of running docker containers* + +--- + +### ARMv6l +Requires a armv6 cpu like Raspberry Pi 1 + +#### Raspberry Pi 1 +1. Copy [Hypriot-Image](http://blog.hypriot.com/getting-started-with-docker-on-your-arm-device/) to your SD-Card +3. Run `docker run -d -p 8080:8080 datarhei/restreamer-armv6l:latest` +4. Browse to http://your-device-ip:8080 + +--- + +### ARMv7l +Requires ARMv7 CPU like Raspberry Pi 2 or Odroid U3 + +#### Raspberry Pi 2 +1. Copy [Hypriot-Image](http://blog.hypriot.com/getting-started-with-docker-on-your-arm-device/) to your SD-Card +3. Run `docker run -d -p 8080:8080 datarhei/restreamer-armv6l:latest` +4. Browse to http://your-device-ip:8080 +5. Default Login: admin / datarhei + +#### Odroid U3 +1. Download and copy Ubunut 14.04 image to your SD-Card +2. Boot your device +3. Install Docker: `apt-get install -y docker-engine` +4. Run `docker run -d -p 8080:8080 datarhei/restreamer-armv7l:latest` +5. Browse http://your-device-ip:8080 +6. Default Login: admin / datarhei + +--- + +### Intel/AMD 64bit +Requires a 64bit Intel or AMD CPU + +#### OSX / Windows +1. Install **Docker Toolbox** for [OSX](https://docs.docker.com/engine/installation/mac/) or [Windows](https://docs.docker.com/engine/installation/windows/) of Docker.com +2. Open Kitematic and next the CLI +3. Run `docker run -d -p 8080:8080 datarhei/restreamer:latest` +4. Read our [VirtualBox hints](hints.html#kitematic-virtualbox) to path through external requests on your virtual machine +5. Browse to http://192.168.99.100:8080 (or click on the previewpage upon your kitematc user-interface) +5. Default Login: admin / datarhei + +#### Linux +1. Install [Docker Engine](https://docs.docker.com/engine/installation/ubuntulinux/) by docker.com +2. Run `docker run -d -p 8080:8080 datarhei/restreamer:latest` +3. Browse to http://your-device-ip:8080 +4. Default Login: admin / datarhei + +--- + +Want to talk to us? Write email open@datarhei.org, go to [Support](../support.html) or choose a nickname and join us on #datarhei webchat on freenode. + +If you're having a weird problem while developing, see [Known Issues](https://github.com/datarhei/restreamer/issues/). diff --git a/docs/docs/guides-embed-player.md b/docs/docs/guides-embed-player.md new file mode 100644 index 0000000..f683d23 --- /dev/null +++ b/docs/docs/guides-embed-player.md @@ -0,0 +1,19 @@ +--- +title: guides-embed-player +--- +#How to embed Snapshot +To embed your Snapshot follow the next steps: + +1. Open your Datarhei/Restreamer GUI via local IP of your Datarhei/Restreamer device in the webbrowser of you choice +2. Open the Datarhei/Restreamer player (marked red in screenshot) ![Open your player in GUI](http://datarhei.org/wiki/pic/screenshot_player.jpg) +3. The HTML Snippet for the video iframe code will be generated under the videoplayer (marked red in screenshot). Add your own dynamic IP and put it on your own website. ![Copy the code and embedd where ever you want](http://datarhei.org/wiki/pic/screenshot_player_iframecode.jpg) +4. Datarhei/Restreamer generates the html tag with your public internet IP. You can add your own dynamic IP like: `scr="http://123.245.789.123:8008/player.html"` with your [[dynamic IP|dynamic IP]] - for example if your dynamic ip is: foobar.zapto.org the Datarhei/Restreamer link has to be: `http://foobar.zapto.org:8080`. The complete html tag should be like this: `` +5. Change the size over width and height. **Be patient of the correct aspect ratio for a pretty video!*** + +**Datarhei Hint ☺** ► Do not forget forwarding the TCP Port 8080 and 1934 ([Keyword: Porforwarding](/restreamer/wiki/portforwarding_en.html)) to use the html code successful on your website. How to do portforwarding should be explained in the manual of your router. + +--- + +Want to talk to us? Write email open@datarhei.org, go to [Support](../support.html) or choose a nickname and join us on #datarhei webchat on freenode. + +If you're having a weird problem while developing, see [Known Issues](https://github.com/datarhei/small-restreamer-internal/issues/). \ No newline at end of file diff --git a/docs/docs/guides-embed-snapshot.md b/docs/docs/guides-embed-snapshot.md new file mode 100644 index 0000000..2a73d31 --- /dev/null +++ b/docs/docs/guides-embed-snapshot.md @@ -0,0 +1,18 @@ +--- +title: guides-embed-snapshot +--- +#In the following discription we explain how to embed the static snapshot. + +1. Open the Datarhei GUI with the local IP of Datarhei in your Browser. +2. Open the player (marked red in the following Screenshot) ![Open your player in GUI](http://datarhei.org/wiki/pic/screenshot_player.jpg) +3. You will find the embedd html code under the videoplayer (marked red on the screenshot). Add the HTML with your dynamic IP and put it on your website.![Copy the code and embedd wherever you want](http://datarhei.org/wiki/pic/screenshot_player_snapshot.jpg) +4. Datarhei generates the html tag with your public internet IP. You can add your own dynamic IP like: `` +5. The snapshot will be updated default every 60 seconds. You could change this value in the configuration file of Datarhei. [How to change Snapshotinterval](/restreamer/wiki/modifysnapshotinterval) + +**Datarhei Hint ☺** ► Do not forget to forward HTTP Port 8080 and 1934 for a successful Snapshot (Keyword: Porforwarding). Take a look at the manual of your router if you do not know how to do it. + +--- + +Want to talk to us? Write email open@datarhei.org, go to [Support](../support.html) or choose a nickname and join us on #datarhei webchat on freenode. + +If you're having a weird problem while developing, see [Known Issues](https://github.com/datarhei/small-restreamer-internal/issues/). diff --git a/docs/docs/guides-optional-streaming.md b/docs/docs/guides-optional-streaming.md new file mode 100644 index 0000000..16a136a --- /dev/null +++ b/docs/docs/guides-optional-streaming.md @@ -0,0 +1,32 @@ +--- +title: guides-optional-streaming +--- +# Stream to external services +--- +For the forwarding of your video stream to an external video service provider or other external services like YouTube, you can use the field "Additional RTMP streaming server". The check box is accessible once the connection is established to your camera. + +**These are some examples of the most well-known services:** + +Prerequisite is a registration or a channel with the providers , you will also receive the required address information . After logging in , you will find here the standard addresses that you need for streaming with Datarhei / Restreamer : + +- Youtube-Live ([Help](https://support.google.com/youtube/topic/6136989?hl=de&ref_topic=2853712)) + rtmp://a.rtmp.youtube.com/live2/[your_channel] +- UStream ([Help](https://support.ustream.tv/hc/en-us/articles/207851987-How-to-stream-to-Ustream-using-Wirecast-FMLE-TriCaster-or-any-RTMP-encoder)) + e.g. rtmp://1.21452594.fme.ustream.tv/ustreamVideo/[user]/[your_channel] +- Livestream.com ([Help](http://original.livestream.com/userguide/index.php?title=Main_Page&title=Use_Flash_Media_Encoder_On2_Flix_live_or_Wirecast_with_Livestream)) + rtmp://publish.livestream.com/mogulus/[your_channel]/username=[username]/password=[password]/isAutoLive=true + +Next, you are adding the destination address in your Datarhei/Restreamer: + +![UI-Preview](../img/optional-stream.png) + +Once the process has been successfully established, the stream should also be seen at the external provider (it can sometimes take a couple of seconds - be patient ). + +1. Add Adress +2. Start Proces + +--- + +Want to talk to us? Write email open@datarhei.org, go to [Support](../support.html) or choose a nickname and join us on #datarhei webchat on freenode. + +If you're having a weird problem while developing, see [Known Issues](https://github.com/datarhei/small-restreamer-internal/issues/). diff --git a/docs/docs/guides-raspicam.md b/docs/docs/guides-raspicam.md new file mode 100644 index 0000000..7a8a0e1 --- /dev/null +++ b/docs/docs/guides-raspicam.md @@ -0,0 +1,15 @@ +--- +title: RaspiCam +--- + +## RaspiCam + +1. Setup your RaspiCam +2. Start the Docker-Image: `docker run -d -v /mnt/restreamer/db:/restreamer/db --restart always --name restreamer -p 8080:8080 -v /opt/vc:/opt/vc --privileged -e "MODE=RASPICAM" datarhei/restreamer-armv7l:latest` +3. Put the adress `rtmp://127.0.0.1/live/raspicam.stream` into the "RTMP/RTSP Video Source" field + +--- + +Want to talk to us? Write email open@datarhei.org, go to [Support](../support.html) or choose a nickname and join us on #datarhei webchat on freenode. + +If you're having a weird problem while developing, see [Known Issues](https://github.com/datarhei/small-restreamer-internal/issues/). diff --git a/docs/docs/guides-setup-video-device.md b/docs/docs/guides-setup-video-device.md new file mode 100644 index 0000000..860a405 --- /dev/null +++ b/docs/docs/guides-setup-video-device.md @@ -0,0 +1,28 @@ +--- +title: guides-setup-video-device +--- +# Setup your video device +For the integration of an H.264 -enabled network camera you need the address, on which you can retrieve the video live stream from the camera. +Take a look at your camera manual and look after RTSP/RTP. + +For this purpose, please look in the manual of your camera and search for " RTSP " . Alternatively you can find already many templates on the Soleratec company website: [https://www.soleratec.com/support/rtsp/rtsp_listing](https://www.soleratec.com/support/rtsp/rtsp_listing) + +**Two examples:** +AXIS: rtsp://ip-address:554/axis-media/media.amp +Samsung: rtsp://ip-address:554/profile2/media.smp + +*You can finde the IP address of your camera, if necessary, in the DHCP table of your router. You can use a LAN scanner like http://angryip.org/ which displays you all the devices on your network too if you are unsure what the correct IP is.* + +Next step: Put your rtsp-link in “RTMP/RTSP Video Source” field in the Datarhei/Restreamer-Web-GUI. + +![UI-Preview](../img/setup-video-device.png) + +Last step: Start process + +Once the process has been successfully established , you can open the Datarhei/Restramer player and, if necessary, forward the stream to an external provider the player. + +--- + +Want to talk to us? Write email open@datarhei.org, go to [Support](../support.html) or choose a nickname and join us on #datarhei webchat on freenode. + +If you're having a weird problem while developing, see [Known Issues](https://github.com/datarhei/small-restreamer-internal/issues/). diff --git a/docs/docs/guides-snapshot-interval.md b/docs/docs/guides-snapshot-interval.md new file mode 100644 index 0000000..566e50f --- /dev/null +++ b/docs/docs/guides-snapshot-interval.md @@ -0,0 +1,15 @@ +--- +title: guides-snapshot-interval +--- +#Modify Snapshot Interval + +By default a snapshot is captured every 60 seconds. You can modify this by starting your Docker-Image with the additional command + "-e "SNAPSHOT_REFRESH_INTERVAL=60000" + +The 60000 is in msec. If you want to create a snapshot every 10 seconds you have to enter 10000 + +--- + +Want to talk to us? Write email open@datarhei.org, go to [Support](../support.html) or choose a nickname and join us on #datarhei webchat on freenode. + +If you're having a weird problem while developing, see [Known Issues](https://github.com/datarhei/small-restreamer-internal/issues/). diff --git a/docs/docs/guides-usb-camera.md b/docs/docs/guides-usb-camera.md new file mode 100644 index 0000000..e43add8 --- /dev/null +++ b/docs/docs/guides-usb-camera.md @@ -0,0 +1,18 @@ +--- +title: USB-Cameras +--- + +## USB-Cameras + +1. Connect you USB-Camera +2. Run Docker-Image: `docker run -d --name restreamer -p 8080:8080 -v /mnt/restreamer/db:/restreamer/db --device /dev/video0 datarhei/restreamer-armv7l:latest` +3. Install additional software: `docker exec -it restreamer /bin/bash` + * apt-get install v4l-utils libv4l-0 + * ffmpeg -f v4l2 -r 25 -s 1280x720 -i /dev/video0 -f flv rtmp://127.0.0.1:1935/live/usb.stream +4. Now you can put the adress `rtmp://127.0.0.1/live/usb.stream` into the "RTMP/RTSP Video Source" field + +--- + +Want to talk to us? Write email open@datarhei.org, go to [Support](../support.html) or choose a nickname and join us on #datarhei webchat on freenode. + +If you're having a weird problem while developing, see [Known Issues](https://github.com/datarhei/small-restreamer-internal/issues/). diff --git a/docs/docs/hints.md b/docs/docs/hints.md new file mode 100644 index 0000000..e14f9f8 --- /dev/null +++ b/docs/docs/hints.md @@ -0,0 +1,67 @@ +--- +title: Hints +--- + +# Datarhei Hints ☺ + +* [Docker](#docker) +* [Kitematic/VirtualBox](#kitematic-virtualbox) + +### Docker + +We prefer starting the Docker image aldways e.g.: + +```sh +docker run \ + -d \ + --name restreamer \ + -v /mnt/restreamer/db:/restreamer/db \ + --restart always \ + -p 8080:8080 \ + datarhei/restreamer:latest +``` + +#### Persistent data +If you want to save your configs export the small json database on your device-disc. +Add: `-v /mnt/restreamer/db:/restreamer/db` + +#### Restarting on failer +The Docker-Daemon is monitoring your container and will start it it again, if it runs into errors. Add: +`--restart always` + +#### Starting on boot +Small Linux example: + +```sh +description "datarhei/ReStreamer" +author "datarhei.org" +start on filesystem and started docker +stop on runlevel [!2345] +respawn +script + /usr/bin/docker start -a restreamer +end script +``` + +1. Exec `vim /etc/init/restreamer.conf` and paste guiding code: +2. Save doc +3. Start container `--name restreamer` + +### Kitematic / VirtualBox + +1. start your ReStreamer with Kitematic +2. open the user-interface and copy the port +3. open VirtualBox and and by the running virtualmachnine named "default" on edit + ![vbox-1](../img/vbox-port-1.png) +4. select the tab "network" and click on the button "port-forwarding" + ![vbox-1](../img/vbox-port-2.png) +5. create new rule and paste the copyed port-number into "host-port" and "guest-port" + ![vbox-1](../img/vbox-port-3.png) +6. save this changes by closing alls the windows with "ok" +7. open the ReStreamer upon your browser by "http://127.0.0.1:copyed-port" + +--- + +Want to talk to us? Write email open@datarhei.org, go to [Support](../support.html) or choose a nickname and join us on #datarhei webchat on freenode. + +If you're having a weird problem while developing, see [Known Issues](https://github.com/datarhei/restreamer/issues/). diff --git a/docs/docs/index.md b/docs/docs/index.md new file mode 100644 index 0000000..cc2b163 --- /dev/null +++ b/docs/docs/index.md @@ -0,0 +1,9 @@ +--- +title: Welcome +--- +# Welcome to our docs! +Welcome to the Datarhei/Restreamer documentation, it should help you to install and configure Restreamer for your device. All other questions round streaming microcosm and technical facts are explained in our [Wiki](../wiki/). + +* want to talk to us? write email open@datarhei.org, go to [Support](../support.html) or choose a nickname and join us on #datarhei webchat on freenode. +* if you're having a weird problem while developing, see [Known Issues](https://github.com/datarhei/restreamer/issues/) +* small installation guide how to start the app with Docker could be found [here](docker-setup.html) diff --git a/docs/docs/references-config.md b/docs/docs/references-config.md new file mode 100644 index 0000000..fdce724 --- /dev/null +++ b/docs/docs/references-config.md @@ -0,0 +1,72 @@ +--- +title: Config +--- + +# Config + +```json +{ + // default conf + "name": "live", + // path to jsondb file + "jsondb": "db/v1", + "auth": { + // user-interface username + "username": "admin", + // user-interface password + "password": "datarhei" + }, + "ffmpeg": { + "options": { + // ffmpeg-options for streams with audio + "native_h264":[ + "-c copy", + "-f flv" + ], + // ffmpeg-options for streams without audio (req. for youtube-live) + "native_h264_soundless_aac":[ + "-ar 44100", + "-ac 2", + "-acodec pcm_s16le", + "-f s16le", + "-ac 2", + "-i /dev/zero", + "-c:v copy", + "-acodec aac", + "-ab 128k", + "-f flv" + ], + // ffmpeg-options for the snapshot + "snapshot": "-vframes 1" + }, + "monitor": { + // time to wait before retry (in ms) + "restart_wait": "6000", + // count for retry + "retries": 10 + } + }, + "nginx": { + // path to nginx-bin + "exec": "/usr/local/nginx/sbin/nginx -c /restreamer/conf/nginx.conf", + "streaming": { + // nginx ip + "ip": "127.0.0.1", + // nginx rtmp port + "rtmp_port": "1935", + // nginx rtmp path + "rtmp_path": "/live/", + // nginx hls port + "hls_port": "8080", + // nginx hls path + "hls_path": "/hls/" + } + } +} +``` + +--- + +Want to talk to us? Write email open@datarhei.org, go to [Support](../support.html) or choose a nickname and join us on #datarhei webchat on freenode. + +If you're having a weird problem while developing, see [Known Issues](https://github.com/datarhei/small-restreamer-internal/issues/). diff --git a/docs/docs/references-environment-vars.md b/docs/docs/references-environment-vars.md new file mode 100644 index 0000000..4067a51 --- /dev/null +++ b/docs/docs/references-environment-vars.md @@ -0,0 +1,73 @@ +--- +title: Environment Variables +--- + +# Enviroment Variables + +--- + +```sh +[INFO] _ _ _ _ +[INFO] __| | __ _| |_ __ _ _ __| |___ ___(_) +[INFO] / _ |/ _ | __/ _ | __| _ |/ _ | | +[INFO] | (_| | (_| | || (_| | | | | | | __/| | +[INFO] |_____|_____|_||_____|_| |_| |_|____||_| +[INFO] +[INFO] ReStreamer v0.0.1 +[INFO] +[INFO] ENVIRONMENTS +[INFO] ENV "NODEJS_PORT=3000" +[INFO] ENV "LOGGER_LEVEL=3" +[INFO] ENV "TIMEZONE=Europe/Berlin" +[INFO] ENV "SNAPSHOT_REFRESH_INTERVAL=60000" +[INFO] ENV "CREATE_HEAPDUMPS=false" +[INFO] +``` + +--- + +**Docker example:** + +```sh +docker run ... + -e "LOGGER_LEVEL=4" \ + -e "SNAPSHOT_REFRESH_INTERVAL=10000" \ + ... +``` + +--- + +#### NODEJS_PORT + +Webserver port of application + +--- + +#### LOGGER_LEVEL + +Logger level to defined, what should be logged + +--- + +#### TIMEZONE + +Set the timezone for logging + +--- + +#### SNAPSHOT_REFRESH_INTERVAL + +Interval to create a new Snapshot in milliseconds + +--- + +#### CREATE_HEAPDUMPS (dev.) + +Create Heapdumps of application (needs g++, make and python to run, please install heapdump with 'npm install heapdump' afterwords) + +--- + +Want to talk to us? Write email open@datarhei.org, go to [Support](../support.html) or choose a nickname and join us on #datarhei webchat on freenode. + +If you're having a weird problem while developing, see [Known Issues](https://github.com/datarhei/small-restreamer-internal/issues/). + diff --git a/docs/docs/references-http-api.md b/docs/docs/references-http-api.md new file mode 100644 index 0000000..b7b9f18 --- /dev/null +++ b/docs/docs/references-http-api.md @@ -0,0 +1,76 @@ +--- +title: JSON / HTTP API +--- + +# JSON / HTTP API + +Small http api for additional webapps + +* [GET /v1/states](#get-v1-states) +* [GET /v1/progresses](#get-v1-progresses) + +--- + +#### GET /v1/states + +Request: + +```sh +GET /v1/states HTTP/1.1 +Accept: */* +``` + +Response: + +```sh +HTTP/1.1 200 OK +Content-Type: application/json + +{ + "repeat_to_local_nginx": { + "type": "connected" + }, + "repeat_to_optional_output": { + "type": "disconnected" + } +} +``` + +#### GET /v1/progresses + +Request: + +```sh +GET /v1/progresses HTTP/1.1 +Accept: */* +``` + +Response: + +```sh +HTTP/1.1 200 OK +Content-Type: application/json + +{ + "repeat_to_local_nginx": { + "frames": 12843, + "current_fps": 24, + "current_kbps": 1417.2, + "target_size": 92653, + "timemark": "00:08:55.59" + }, + "repeat_to_optional_output": { + "frames": 220, + "current_fps": 37, + "current_kbps": 1246.2, + "target_size": 1438, + "timemark": "00:00:09.45" + } +} +``` + +--- + +Want to talk to us? Write email open@datarhei.org, go to [Support](../support.html) or choose a nickname and join us on #datarhei webchat on freenode. + +If you're having a weird problem while developing, see [Known Issues](https://github.com/datarhei/small-restreamer-internal/issues/). diff --git a/docs/img/architecture.png b/docs/img/architecture.png new file mode 100644 index 0000000..c6a22d1 Binary files /dev/null and b/docs/img/architecture.png differ diff --git a/docs/img/bg.png b/docs/img/bg.png new file mode 100644 index 0000000..d3dff9a Binary files /dev/null and b/docs/img/bg.png differ diff --git a/docs/img/btn_donate_SM.gif b/docs/img/btn_donate_SM.gif new file mode 100644 index 0000000..97acd3f Binary files /dev/null and b/docs/img/btn_donate_SM.gif differ diff --git a/docs/img/embed-player.png b/docs/img/embed-player.png new file mode 100644 index 0000000..b37ef16 Binary files /dev/null and b/docs/img/embed-player.png differ diff --git a/docs/img/favicon.ico b/docs/img/favicon.ico new file mode 100644 index 0000000..48ccd42 Binary files /dev/null and b/docs/img/favicon.ico differ diff --git a/docs/img/flattr-badge-large.png b/docs/img/flattr-badge-large.png new file mode 100644 index 0000000..1105305 Binary files /dev/null and b/docs/img/flattr-badge-large.png differ diff --git a/docs/img/flattr.png b/docs/img/flattr.png new file mode 100644 index 0000000..e206806 Binary files /dev/null and b/docs/img/flattr.png differ diff --git a/docs/img/intro_banner.png b/docs/img/intro_banner.png new file mode 100644 index 0000000..2e3c7f0 Binary files /dev/null and b/docs/img/intro_banner.png differ diff --git a/docs/img/intro_docker.png b/docs/img/intro_docker.png new file mode 100644 index 0000000..9d7ee49 Binary files /dev/null and b/docs/img/intro_docker.png differ diff --git a/docs/img/intro_powerd.png b/docs/img/intro_powerd.png new file mode 100644 index 0000000..790b6c6 Binary files /dev/null and b/docs/img/intro_powerd.png differ diff --git a/docs/img/ipchicken.png b/docs/img/ipchicken.png new file mode 100644 index 0000000..a3cb5f8 Binary files /dev/null and b/docs/img/ipchicken.png differ diff --git a/docs/img/marathon-favicon.ico b/docs/img/marathon-favicon.ico new file mode 100644 index 0000000..c4afff9 Binary files /dev/null and b/docs/img/marathon-favicon.ico differ diff --git a/docs/img/optional-stream.png b/docs/img/optional-stream.png new file mode 100644 index 0000000..e4cf103 Binary files /dev/null and b/docs/img/optional-stream.png differ diff --git a/docs/img/screenshot_player.jpg b/docs/img/screenshot_player.jpg new file mode 100644 index 0000000..c415c54 Binary files /dev/null and b/docs/img/screenshot_player.jpg differ diff --git a/docs/img/screenshot_player_embedded.jpg b/docs/img/screenshot_player_embedded.jpg new file mode 100644 index 0000000..7f48b9b Binary files /dev/null and b/docs/img/screenshot_player_embedded.jpg differ diff --git a/docs/img/screenshot_player_iframecode.jpg b/docs/img/screenshot_player_iframecode.jpg new file mode 100644 index 0000000..0a97df6 Binary files /dev/null and b/docs/img/screenshot_player_iframecode.jpg differ diff --git a/docs/img/screenshot_player_snapshot.jpg b/docs/img/screenshot_player_snapshot.jpg new file mode 100644 index 0000000..74db0af Binary files /dev/null and b/docs/img/screenshot_player_snapshot.jpg differ diff --git a/docs/img/setup-video-device.png b/docs/img/setup-video-device.png new file mode 100644 index 0000000..7ecb486 Binary files /dev/null and b/docs/img/setup-video-device.png differ diff --git a/docs/img/twitter_transparent.png b/docs/img/twitter_transparent.png new file mode 100644 index 0000000..d16d589 Binary files /dev/null and b/docs/img/twitter_transparent.png differ diff --git a/docs/img/twitterbutton.png b/docs/img/twitterbutton.png new file mode 100644 index 0000000..fc3dcf9 Binary files /dev/null and b/docs/img/twitterbutton.png differ diff --git a/docs/img/twitterbutton_sm.png b/docs/img/twitterbutton_sm.png new file mode 100644 index 0000000..7dbfab1 Binary files /dev/null and b/docs/img/twitterbutton_sm.png differ diff --git a/docs/img/vbox-port-1.png b/docs/img/vbox-port-1.png new file mode 100644 index 0000000..5403c5f Binary files /dev/null and b/docs/img/vbox-port-1.png differ diff --git a/docs/img/vbox-port-2.png b/docs/img/vbox-port-2.png new file mode 100644 index 0000000..11b163b Binary files /dev/null and b/docs/img/vbox-port-2.png differ diff --git a/docs/img/vbox-port-3.png b/docs/img/vbox-port-3.png new file mode 100644 index 0000000..5faa77e Binary files /dev/null and b/docs/img/vbox-port-3.png differ diff --git a/docs/img/vlc_screenshot.png b/docs/img/vlc_screenshot.png new file mode 100644 index 0000000..f260f7b Binary files /dev/null and b/docs/img/vlc_screenshot.png differ diff --git a/docs/img/youtube_drgui.png b/docs/img/youtube_drgui.png new file mode 100644 index 0000000..f44ff79 Binary files /dev/null and b/docs/img/youtube_drgui.png differ diff --git a/docs/img/youtube_rtmp.png b/docs/img/youtube_rtmp.png new file mode 100644 index 0000000..6bf6956 Binary files /dev/null and b/docs/img/youtube_rtmp.png differ diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..e3e07ef --- /dev/null +++ b/docs/index.md @@ -0,0 +1,32 @@ +--- +title: Restreamer +--- + +
+
+

Live video streaming on your website without
streaming providers

+ +

datarhei/ReStreamer allows smart free video streaming in real time. Stream H.264 video of IP cameras live to your website. Pump your live video to YouTube, Ustream, Twitch, Livestream.com or any other streaming-solutions e.g. Wowza-Streaming-Engine. Our Docker-Image is easy to install and runs on Linux, MacOS and Windows. datarhei/ReStreamer can be perfectly combined with single-board computers like Raspberry Pi and Odroid.

+

It is free (licensed under Apache 2.0) and you can use it for any purpose, personal or commercial.

+

+ Learn more + Docker quick start +

+
+

Multiplattform support through Docker

+ +

Tested on: OSX 10.10/10.11, Raspberry Pi 1/2, Odroid U3

+

+ OSX/Windows Setup + Linux AMD64 Setup + Linux ARMv6/v7 Setup +

+
+

Powered by...

+ +
+
+
+ +
+
diff --git a/docs/support.md b/docs/support.md new file mode 100644 index 0000000..aee8af1 --- /dev/null +++ b/docs/support.md @@ -0,0 +1,10 @@ +--- +layout: pages +tab: support +title: Getting Support for Datarhei/Restreamer +--- +# Getting Support for Datarhei/Restreamer + +Want to talk to us? Write email open@datarhei.org, go to [Support](../support.html) or choose a nickname and join us on #datarhei webchat on freenode. + +If you're having a weird problem while developing, see [Known Issues](https://github.com/datarhei/restreamer/issues). diff --git a/docs/wiki/adsl_en.md b/docs/wiki/adsl_en.md new file mode 100644 index 0000000..728236f --- /dev/null +++ b/docs/wiki/adsl_en.md @@ -0,0 +1,6 @@ +--- +title: adsl_en +--- +######[Network](/restreamer/wiki/networktechnology_en.html) > ADSL +#ADSL +Asymmetric digital subscriber line (ADSL) is a type of digital subscriber line (DSL) technology, a data communications technology that enables faster data transmission over copper telephone lines than a conventional voiceband modem can provide. ADSL differs from the less common symmetric digital subscriber line (SDSL). Bandwidth (and bit rate) is greater toward the customer premises (known as downstream) than the reverse (known as upstream). This is why it is called asymmetric. Providers usually market ADSL as a service for consumers to receive Internet access in a relatively passive mode: able to use the higher speed direction for the download from the Internet but not needing to run servers that would require high speed in the other direction. Wikipedia diff --git a/docs/wiki/api_en.md b/docs/wiki/api_en.md new file mode 100644 index 0000000..0d77584 --- /dev/null +++ b/docs/wiki/api_en.md @@ -0,0 +1,6 @@ +--- +title: api_en +--- +######[Basic Know How](/restreamer/wiki/basic_know_how.html) > [Videosoftware](/restreamer/wiki/videosoftware_en.html) > API +#API +In computer programming, an application programming interface (API) is a set of routines, protocols, and tools for building software applications. An API expresses a software component in terms of its operations, inputs, outputs, and underlying types, defining functionalities that are independent of their respective implementations, which allows definitions and implementations to vary without compromising the interface. A good API makes it easier to develop a program by providing all the building blocks, which are then put together by the programmer. Wikipedia. diff --git a/docs/wiki/autofocus_en.md b/docs/wiki/autofocus_en.md new file mode 100644 index 0000000..ce45ea2 --- /dev/null +++ b/docs/wiki/autofocus_en.md @@ -0,0 +1,8 @@ +--- +title: autofocus_en +--- +######[Camera](/restreamer/wiki/cameratechnology_en.html) > Autofocus +#Autofocus +An autofocus (or AF) optical system uses a sensor, a control system and a motor or tunable optical element to focus automatically or on a manually selected point or area. An electronic rangefinder has a display instead of the motor; the adjustment of the optical system has to be done manually until indication. Autofocus methods are distinguished by their type as being either active, passive or hybrid variants. Wikipedia + +**Datarhei Hint** ☺ ► Basically, the autofocus should be parked if full automatic is avaiable, as otherwise problems occur at night or in fog. Once the automatic no longer finds the subject again to focus, the auto focus function starts up and down what results an ugly video. Try your hand at a preset with autofocus and then set the autofocus off and save your preset. diff --git a/docs/wiki/axiscommunications_en.md b/docs/wiki/axiscommunications_en.md new file mode 100644 index 0000000..b2280d6 --- /dev/null +++ b/docs/wiki/axiscommunications_en.md @@ -0,0 +1,5 @@ +--- +title: axiscommunications_en +--- +######[Basic Know How](/restreamer/wiki/basic_know_how.html) > [Camera Manufacturer](/restreamer/wiki/cameramanufacturer_en.html) > AXIS Communications +#AXIS Communications \ No newline at end of file diff --git a/docs/wiki/basic_know_how.md b/docs/wiki/basic_know_how.md new file mode 100644 index 0000000..40fcbe4 --- /dev/null +++ b/docs/wiki/basic_know_how.md @@ -0,0 +1,21 @@ +--- +title: handbookbasicknowhow_en +--- +#Basic Know How +Overview with basic information on everything you may run into when dealing with Datarhei/Restreamer. The list is always further completed in the course of time. + +**Datarhei Hint ☺** ► you can find small hints regularly with tips and tricks or for Datarhei/Restreamer relevant information among the explanations. + +**List of video technical terms** +For advanced users and those interested you can find an extensive Wikipedia. + +#####1. [Open Source Software](/restreamer/wiki/oss_en.html) +#####2. [Videoplayer](/restreamer/wiki/videoplayer_en.html) +#####3. [Cameramanufacturer](/restreamer/wiki/cameramanufacturer_en.html) +#####4. [Transport Protocol](/restreamer/wiki/transportprotocol_en.html) +#####5. [Streaming Server](/restreamer/wiki/streamingserver_en.html) +#####6. [Videosoftware](/restreamer/wiki/videosoftware_en.html) +#####7. [Videosurveillance](/restreamer/wiki/videosurveillance_en.html) +#####8. [Streaming Service](/restreamer/wiki/streamingservice_en.html) +#####9. [Webcamportals](/restreamer/wiki/webcamportals_en.html) +#####10. [Monetization](/restreamer/wiki/monetization_en.html) \ No newline at end of file diff --git a/docs/wiki/basic_know_how/cameratechnology_en.md b/docs/wiki/basic_know_how/cameratechnology_en.md new file mode 100644 index 0000000..5e848f7 --- /dev/null +++ b/docs/wiki/basic_know_how/cameratechnology_en.md @@ -0,0 +1,22 @@ +--- +title: cameratechnology_en +--- +#Camera +You will find the most important terms associated with cameras in this wiki section. + +**Datarhei Hint** ☺ ► you can find regular small hints and tips & tricks or relevant for Datarhei information among the explanations. + +#####1. [Live Streaming](/restreamer/wiki/livestreaming_en.html) +#####2. [Video Compression](/restreamer/wiki/videocompression_en.html) +#####3. [MJPEG](/restreamer/wiki/mjpeg_en.html) +#####4. [H.264](/restreamer/wiki/h264_en.html) +#####5. [Iris Control](/restreamer/wiki/iriscontrol.html) +#####6. [Autofocus](/restreamer/wiki/autofocus.html) +#####7. [Time-Block](/restreamer/wiki/timeblock_en.html) +#####8. [PTZ](/restreamer/wiki/ptz_en.html) +#####9. [Snapshot](/restreamer/wiki/snapshot_en.html) +#####10. [Time Lapse](/restreamer/wiki/timelapse_en.html) +#####11. [Frame Rate](/restreamer/wiki/framerate_en.html) +#####12. [iFrame/GOP/GOV](/restreamer/wiki/iframe_en.html) +#####13. [Video Resolution](/restreamer/wiki/videoresolution_en.html) +#####14. [Encoding](/restreamer/wiki/encoding_en.html) \ No newline at end of file diff --git a/docs/wiki/basic_know_how/index.md b/docs/wiki/basic_know_how/index.md new file mode 100644 index 0000000..1b91b87 --- /dev/null +++ b/docs/wiki/basic_know_how/index.md @@ -0,0 +1,85 @@ +--- +title: handbookbasicknowhow_en +--- +#Basic Know How +Overview with basic information on everything you may run into when dealing with Datarhei/Restreamer. The list is always further completed in the course of time. + +**Datarhei Hint ☺** ► you can find small hints regularly with tips and tricks or for Datarhei/Restreamer relevant information among the explanations. + +**List of video technical terms** +For advanced users and those interested you can find an extensive Wikipedia. + + + + + + \ No newline at end of file diff --git a/docs/wiki/basic_know_how/networktechnology_en.md b/docs/wiki/basic_know_how/networktechnology_en.md new file mode 100644 index 0000000..c18610f --- /dev/null +++ b/docs/wiki/basic_know_how/networktechnology_en.md @@ -0,0 +1,39 @@ +--- +title: networktechnology_en +--- +#Network +Who operates with live video streaming will will get in contact with of hardware and misc IT technologies. We have put the main parts together for you: + +##### 1. Hardware +* [IP Camera](/restreamer/wiki/ipcamera_en.html) +* [USB-Camera](/restreamer/wiki/usbcamera_en.html) +* [POE](/restreamer/wiki/poe_en.html) +* [Network Power Socket](/restreamer/wiki/networkpowersocket_en.html) +* [SMS Power Socket](/restreamer/wiki/smspowersocket_en.html) +* [Router](/restreamer/wiki/router_en.html) +* [Network Switch](/restreamer/wiki/networkswitch.html) + +##### 2. Internet Access +* [Firewall](firewall_en.html) +* [Port 1935](/restreamer/wiki/port1935_en.html) +* [Port 554](/restreamer/wiki/port554_en.html) +* [ADSL](/restreamer/wiki/adsl_en.html) +* [SDSL](/restreamer/wiki/sdsl_en.html) +* [VDSL](/restreamer/wiki/vdsl_en.html) +* [LTE](/restreamer/wiki/lte_en.html) +* [Data Volume](/restreamer/wiki/datavolume.html) +* [Upload](/restreamer/wiki/upload_en.html) +* [Download](/restreamer/wiki/download_en.html) + +##### 3. Server +* [Webhosting](/restreamer/wiki/webhosting_en.html) +* [Rootserver](/restreamer/wiki/rootserver_en.html) + +##### 4. Software Development +* [Node.js](/restreamer/wiki/nodejs_en.html) +* [Docker](/restreamer/wiki/docker_en.html) + +##### 5. Miscellaneous +* [Dynamic DNS](/restreamer/wiki/dynamicdns_en.html) +* [Dynamic IP DHCP](/restreamer/wiki/dynamicip_en.html) +* [Static IP](/restreamer/wiki/staticip_en.html) \ No newline at end of file diff --git a/docs/wiki/brickcom_en.md b/docs/wiki/brickcom_en.md new file mode 100644 index 0000000..00153f8 --- /dev/null +++ b/docs/wiki/brickcom_en.md @@ -0,0 +1,5 @@ +--- +title: brickcom_en +--- +######[Basic Know How](/restreamer/wiki/basic_know_how.html) > [Camera Manufacturer](/restreamer/wiki/cameramanufacturer_en.html) > Brickcom +#Brickcom \ No newline at end of file diff --git a/docs/wiki/buyersguide_en.md b/docs/wiki/buyersguide_en.md new file mode 100644 index 0000000..481cb7c --- /dev/null +++ b/docs/wiki/buyersguide_en.md @@ -0,0 +1,17 @@ +--- +title: buyersguide_en +--- +#Buyersguide +You want to buy you a network camera and want to know what is needed for operation with Datarhei/Restreamer? + +The following basic data should be a function in your camera: +**1. [RTSP](rtsp en) protocol** +**2. [H.264](h.264 en) video output** +**3. Network connection via WiFi / LAN / 3G / 4G / WAN** + +**Datarhei Hint** ☺ ► 720p (1280x720 px) resolution is a good measure of streaming video on the internet. YouTube & Ustream accept any video live streams at 720p or higher. + +#####Camera hardware list and equipment for your Datarhei/Restreamer project in the [Datarhei/Restreamer wiki](shop de). + +**Build your own DIY IP-Camera with Datarhei/Restreamer** +If you like to be a part of the global DIY community try building your own ip-camera with a Raspberry PI and Datarhei/Restreamer. [Some great tutorials could be found here.](DIY-IP-Kamera) \ No newline at end of file diff --git a/docs/wiki/camerabuyersguide_en.md b/docs/wiki/camerabuyersguide_en.md new file mode 100644 index 0000000..496b92c --- /dev/null +++ b/docs/wiki/camerabuyersguide_en.md @@ -0,0 +1,17 @@ +--- +title: camerabuyersguide_en +--- +#Camera Buyers Guide +You want to buy you a network camera and want to know what is needed for operation with Datarhei/Restreamer? + +The following basic data should be a function in your camera: +**1. [RTSP](/restreamer/wiki/rtsp_en_camerabuyersguide.html) protocol** +**2. [H.264](/restreamer/wiki/h264_en_camerabuyersguide.html) video output** +**3. Network connection via WiFi / LAN / 3G / 4G / WAN** + +**Datarhei Hint** ☺ ► 720p (1280x720 px) resolution is a good measure of streaming video on the internet. YouTube & Ustream accept any video live streams at 720p or higher. + +#####Camera hardware list and equipment for your Datarhei/Restreamer project in the [Datarhei/Restreamer wiki](/restreamer/wiki/guide-buy-hardware.html). + +**Build your own DIY IP-Camera with Datarhei/Restreamer** +If you like to be a part of the global DIY community try building your own ip-camera with a Raspberry PI and Datarhei/Restreamer. [Some great tutorials could be found here.](/restreamer/wiki/diy-stuff.html) \ No newline at end of file diff --git a/docs/wiki/cameramanufacturer_en.md b/docs/wiki/cameramanufacturer_en.md new file mode 100644 index 0000000..202bfd5 --- /dev/null +++ b/docs/wiki/cameramanufacturer_en.md @@ -0,0 +1,18 @@ +--- +title: cameramanufacturer_en +--- +######[Basic Know How](/restreamer/wiki/basic_know_how.html) > Camera Manufacturer +#Camera Manufacturer +For good video streaming you need an IP camera or a USB camera that is suitable for streaming. An almost limitless range of hardware in every price category is available. A distinction is made in static and PTZ cameras. Here again, in indoor and outdoor ready cameras. +It is not a good decision to make outdoor capable to a indoor cameras because special technologies such as: Auto-Iris, DC-iris, auto-focus or heating re not built for indoor cameras. + +Here is a list of the largest provider of commercial IP cameras, there are good manufacturers: + +* [Mobotix](/restreamer/wiki/mobotix_en.html) +* [AXIS Communications](/restreamer/wiki/axiscommunications_en.html) +* [SONY](/restreamer/wiki/sony_en.html) +* [JVC](/restreamer/wiki/jvc_en.html) +* [Brickcom](/restreamer/wiki/brickcom_en.html) +* [Samsung](/restreamer/wiki/samsung_en.html) + +If you have not found a suitable network camera with us, or would want to use your own manufacturer, we have for you a [Hint Page](/restreamer/wiki/camerabuyersguide_en.html) created on what you need to look for when buying, so that your new camera works well with Datarhei/Smallstreamer. \ No newline at end of file diff --git a/docs/wiki/cameratechnology_en.md b/docs/wiki/cameratechnology_en.md new file mode 100644 index 0000000..cfa5f0f --- /dev/null +++ b/docs/wiki/cameratechnology_en.md @@ -0,0 +1,22 @@ +--- +title: cameratechnology_en +--- +#Camera +You will find the most important terms associated with cameras in this wiki section. + +**Datarhei Hint** ☺ ► you can find regular small hints and tips & tricks or relevant for Datarhei information among the explanations. + +#####1. [Live Streaming](/restreamer/wiki/livestreaming_en.html) +#####2. [Video Compression](/restreamer/wiki/videocompression_en.html) +#####3. [MJPEG](/restreamer/wiki/mjpeg_en.html) +#####4. [H.264](/restreamer/wiki/h264_en.html) +#####5. [Iris Control](/restreamer/wiki/iriscontrol_en.html) +#####6. [Autofocus](/restreamer/wiki/autofocus_en.html) +#####7. [Time-Block](/restreamer/wiki/timeblock_en.html) +#####8. [PTZ](/restreamer/wiki/ptz_en.html) +#####9. [Snapshot](/restreamer/wiki/snapshot_en.html) +#####10. [Time Lapse](/restreamer/wiki/timelapse_en.html) +#####11. [Frame Rate](/restreamer/wiki/framerate_en.html) +#####12. [iFrame/GOP/GOV](/restreamer/wiki/iframe_en.html) +#####13. [Video Resolution](/restreamer/wiki/videoresolution_en.html) +#####14. [Encoding](/restreamer/wiki/encoding_en.html) \ No newline at end of file diff --git a/docs/wiki/datavolume_en.md b/docs/wiki/datavolume_en.md new file mode 100644 index 0000000..faf33e7 --- /dev/null +++ b/docs/wiki/datavolume_en.md @@ -0,0 +1,8 @@ +--- +title: datavolume_en +--- +######[Network](/restreamer/wiki/networktechnology_en.html) > Data Volume +#Data Volume +The amount of data is a measure of the amount of data. The basic unit of data amount is the bit. Data are used for storing and transmitting information, bearing in mind that the information content of a message is not equal to the amount of data, even if is often used in this context, the word information when data are meant. The information content, in contrast to the amount of data can not be read immediately, and there are different approaches to determine him. The amount of data that is stored in a file is referred to as file size. For storage media, the amount of data to indicate the free and the maximum storable data volume (capacity) is used. Wikipedia + +**Datarhei Hint** ☺ ► Useful informatoin for dataset / data volume of a live stream can be found [Topic Video-Compression](/restreamer/wiki/videocompression.html)! \ No newline at end of file diff --git a/docs/wiki/deutsch.md b/docs/wiki/deutsch.md new file mode 100644 index 0000000..10c9f72 --- /dev/null +++ b/docs/wiki/deutsch.md @@ -0,0 +1,20 @@ +--- +title: Deutsch +--- + +#####1. [[FAQ - Frequently Asked Questions|FAQ Deutsch]] +Viele Fragen kurz beantwortet! +#####2. [[Installation von Datarhei/Restreamer|Installation Datarhei]] +Wie installiere ich Datarhei/Restreamer, um es mit meiner Hardware zu nutzen? +#####3. [[Allgemeine Anleitungen|Anleitungen]] +Wie finde ich den RTSP Links für meine Kamera? Wie teste ich meine Stream mit VLC? Wie stream ich mit Datarhei/Restreamer zu Youtube oer Ustream? Und wie bau ich den Snapshot in meine Webseite ein? Hier wird Dir geholfen... +#####4. [[Kamera Kaufberatung|Kamera Kaufberatung]] +Du willst Dir eine Netzwerkkamera kaufen um endlich auch ein Projekt mit Datarhei/Restreamer umsetzen zu können. Auf was Du beim kauf deiner IP-Kamera achten musst findest du hier. +#####5. [[Partner Streaming|Partner Streaming]] +Du hast großes vor und benötigst professionelles Streaming für große Zuschauermengen oder anspruchsvolle Kunden. Hier findest du zuverlässige Partner, die dich in dein Ideen unterstützen können. +#####6. [[Leitfaden Basis Wissen|Leitfaden Basis Wissen]] +Du bist interessiert an Livestreaming und Webvideo. Hier findest du Informationen und weiterführende Links zum Thema um dein Wissen zu vertiefen – Wird nicht zum Betrieb von Datarhei/Restreamer benötigt, schadet aber nicht. +#####7. [[Datarhei Unterstützen|Datarhei Unterstützen]] +Unterstütze Datarhei und helfe das Projekt am leben zu halten. + + diff --git a/docs/wiki/diy-stuff.md b/docs/wiki/diy-stuff.md new file mode 100644 index 0000000..5cd5c11 --- /dev/null +++ b/docs/wiki/diy-stuff.md @@ -0,0 +1,17 @@ +--- +Title: diy-stuff +--- +#Things for playing around - Have Fun! + +####1. DIY IP-Camera +http://www.codeproject.com/Articles/665518/Raspberry-Pi-as-low-cost-HD-surveillance-camera +####2. DIY PT-Camera +http://www.sonsoftone.com/?page_id=287 +http://makezine.com/projects/raspberry-eye-remote-servo-cam/ +####3. Upgrading NoIR with Zoom und Focus +https://www.thingiverse.com/thing:439386 +http://myrobotlab.org/content/upgrading-raspberry-pi-camera +####5. DIY Raspi-Cam with 3G and Solarpower +http://projectsmax246.blogspot.co.uk/2013/01/webcam-over-3g-with-raspberry-pi.html +####6. PTZ with Raspberry Pi +http://emmanuelgranatello.blogspot.it/2013/03/ptz-camera-wifi-onraspberry-pi.html \ No newline at end of file diff --git a/docs/wiki/docker_en.md b/docs/wiki/docker_en.md new file mode 100644 index 0000000..e5cbcfb --- /dev/null +++ b/docs/wiki/docker_en.md @@ -0,0 +1,8 @@ +--- +title: docker_en +--- +######[Network](/restreamer/wiki/networktechnology_en.html) > Docker +#Docker +Docker is an open-source project that automates the deployment of applications inside software containers, by providing an additional layer of abstraction and automation of operating-system-level virtualization on Linux. Docker uses resource isolation features of the Linux kernel such as cgroups and kernel namespaces to allow independent "containers" to run within a single Linux instance, avoiding the overhead of starting and maintaining virtual machines. Wikipedia + +**Datarhei Hint ☺** ► How to run docker read our [wiki](https://github.com/datarhei/small-restreamer-internal/wiki/Smart-Streamer-Installation-EN) or in readme files that come with the software download. diff --git a/docs/wiki/download_en.md b/docs/wiki/download_en.md new file mode 100644 index 0000000..6c2cd91 --- /dev/null +++ b/docs/wiki/download_en.md @@ -0,0 +1,6 @@ +--- +title: download_en +--- +######[Network](/restreamer/wiki/networktechnology_en.html) > Download +#Download +Download is the opposite of [Upload](/restreamer/wiki//upload_en.html) and doesnt matter for your live stream with Datarhei, cause you want to send large amounts of data during the streaming and want not to receive data. diff --git a/docs/wiki/dynamicdns_en Kopie.md b/docs/wiki/dynamicdns_en Kopie.md new file mode 100644 index 0000000..c682ddd --- /dev/null +++ b/docs/wiki/dynamicdns_en Kopie.md @@ -0,0 +1,18 @@ +--- +title: dynamicdns_en +--- +#Dynamic DNS +Dynamic DNS (DDNS or DynDNS) is a method of automatically updating a name server in the Domain Name System (DNS), often in Not Real Time, with the active DDNS configuration of its configured hostnames, addresses or other information. +The term is used to describe two different concepts. The first is "dynamic DNS updating" which refers to systems that are used to update traditional DNS records without manual editing. These mechanisms are explained in RFC 2136, and use the TSIG mechanism to provide security. The second kind of dynamic DNS permits lightweight and immediate updates often using an update client, which do not use the RFC2136 standard for updating DNS records. These clients provide a persistent addressing method for devices that change their location, configuration or IP address frequently. Wikipedia + +Popular service on the Internet are DynDNS and No-IP. While Dyn DNS is no longer free, No-IP still has a free basic account, which you even have to keep alive in the month with one click or two clicks. Owners a Fritz box can house your own DNS Service MyFritz.net directly in their Fritzbox GUI. + +Other free services: +- **TIP** 100% free and no monthly activate needed! selfhost.de +- **TIP** 100% free www.changeip.com +- DNSExit +- Dynns +- Free DNS +- DTDNS + +**Datarhei Hint** ☺ ► Many routers have No-IP, implemented already as preset. The simplest method is to use this service in the router, if the above-mentioned services are not to be found in your router. You can of course always fit each of the services in your Datarhei/Restreamer, but it's something SSH knowledge required for this purpose. Simple instructions are available in all languages penny via Google search. \ No newline at end of file diff --git a/docs/wiki/dynamicdns_en.md b/docs/wiki/dynamicdns_en.md new file mode 100644 index 0000000..5c59a04 --- /dev/null +++ b/docs/wiki/dynamicdns_en.md @@ -0,0 +1,9 @@ +--- +title: dynamicdns_en +--- +######[General Instructions](/restreamer/wiki/general_instructions_en.html) > Dynamic DNS +#Dynamic DNS +Dynamic DNS (DDNS or DynDNS) is a method of automatically updating a name server in the Domain Name System (DNS), often in Not Real Time, with the active DDNS configuration of its configured hostnames, addresses or other information. +The term is used to describe two different concepts. The first is "dynamic DNS updating" which refers to systems that are used to update traditional DNS records without manual editing. These mechanisms are explained in RFC 2136, and use the TSIG mechanism to provide security. The second kind of dynamic DNS permits lightweight and immediate updates often using an update client, which do not use the RFC2136 standard for updating DNS records. These clients provide a persistent addressing method for devices that change their location, configuration or IP address frequently. Wikipedia + +**Datarhei Hint** ☺ ► Most routers are set as the default on DHCP. How your machine is configured, you can see after a login with your user data in the web interface of your router. Here you also all connected devices with IP display. Instructions you'll find in the manual of your device. \ No newline at end of file diff --git a/docs/wiki/dynamicip_en.md b/docs/wiki/dynamicip_en.md new file mode 100644 index 0000000..ddc6a65 --- /dev/null +++ b/docs/wiki/dynamicip_en.md @@ -0,0 +1,8 @@ +--- +title: dynamicip_en +--- +######[Network](/restreamer/wiki/networktechnology_en.html) > Dynamic IP +#Dynamic IP +The Dynamic Host Configuration Protocol (DHCP) is a standardized network protocol used on Internet Protocol (IP) networks for dynamically distributing network configuration parameters, such as IP addresses for interfaces and services. With DHCP, computers request IP addresses and networking parameters automatically from a DHCP server, reducing the need for a network administrator or a user to configure these settings manually. Wikipedia + +**Datarhei Hint** ☺ ► Most routers are set as the default on DHCP. How your machine is configured, you can see after a login with your user data in the web interface of your router. Here you also all connected devices with IP display. Instructions you'll find in the manual of your device. \ No newline at end of file diff --git a/docs/wiki/earthcam_en.md b/docs/wiki/earthcam_en.md new file mode 100644 index 0000000..d794115 --- /dev/null +++ b/docs/wiki/earthcam_en.md @@ -0,0 +1,4 @@ +--- +title: earthcam_en +--- +#Earthcam.com \ No newline at end of file diff --git a/docs/wiki/embeddediframe_en.md b/docs/wiki/embeddediframe_en.md new file mode 100644 index 0000000..ba9644f --- /dev/null +++ b/docs/wiki/embeddediframe_en.md @@ -0,0 +1,14 @@ +--- +title: embeddediframe_en +--- +######[General Instructions](/restreamer/wiki/general_instructions_en.html) > How to embed Snapshot +#How to embed Snapshot +To embed your Snapshot follow the next steps: + +1. Open your Datarhei/Restreamer GUI via local IP of your Datarhei/Restreamer device in the webbrowser of you choice +2. Open the Datarhei/Restreamer player (marked red in screenshot) ![Open your player in GUI](http://datarhei.org/wiki/pic/screenshot_player.jpg) +3. The HTML Snippet for the video iframe code will be generated under the videoplayer (marked red in screenshot). Add your own dynamic IP and put it on your own website. ![Copy the code and embedd where ever you want](http://datarhei.org/wiki/pic/screenshot_player_iframecode.jpg) +4. Datarhei/Restreamer generates the html tag with your public internet IP. You can add your own dynamic IP like: `scr="http://123.245.789.123:8008/player.html"` with your [[dynamic IP|dynamic IP]] - for example if your dynamic ip is: foobar.zapto.org the Datarhei/Restreamer link has to be: `http://foobar.zapto.org:8080`. The complete html tag should be like this: `` +5. Change the size over width and height. **Be patient of the correct aspect ratio for a pretty video!*** + +**Datarhei Hint ☺** ► Do not forget forwarding the TCP Port 8080 and 1934 ([Keyword: Porforwarding](/restreamer/wiki/portforwarding_en.html)) to use the html code successful on your website. How to do portforwarding should be explained in the manual of your router. \ No newline at end of file diff --git a/docs/wiki/embeddsnapshot_en.md b/docs/wiki/embeddsnapshot_en.md new file mode 100644 index 0000000..2de0847 --- /dev/null +++ b/docs/wiki/embeddsnapshot_en.md @@ -0,0 +1,13 @@ +--- +title: embeddsnapshot_en +--- +######[General Instructions](/restreamer/wiki/general_instructions_en.html) > Embedd Snapshot +#In the following discription we explain how to embed the static snapshot. + +1. Open the Datarhei GUI with the local IP of Datarhei in your Browser. +2. Open the player (marked red in the following Screenshot) ![Open your player in GUI](http://datarhei.org/wiki/pic/screenshot_player.jpg) +3. You will find the embedd html code under the videoplayer (marked red on the screenshot). Add the HTML with your dynamic IP and put it on your website.![Copy the code and embedd wherever you want](http://datarhei.org/wiki/pic/screenshot_player_snapshot.jpg) +4. Datarhei generates the html tag with your public internet IP. You can add your own dynamic IP like: `` +5. The snapshot will be updated default every 60 seconds. You could change this value in the configuration file of Datarhei. [How to change Snapshotinterval](/restreamer/wiki/modifysnapshotinterval) + +**Datarhei Hint ☺** ► Do not forget to forward HTTP Port 8080 and 1934 for a successful Snapshot (Keyword: Porforwarding). Take a look at the manual of your router if you do not know how to do it. \ No newline at end of file diff --git a/docs/wiki/encoding_en.md b/docs/wiki/encoding_en.md new file mode 100644 index 0000000..e96f082 --- /dev/null +++ b/docs/wiki/encoding_en.md @@ -0,0 +1,10 @@ +--- +title: encoding_en +--- +######[Camera](/restreamer/wiki/cameratechnology_en.html) > Encoding +#Encoding +In connection with "Video" "Encoding" means a process in which an existing video format is converted into another. Normaly , a video encoder hardware or software is used. + +Good article about Encoding. + +**Datarhei Hint ☺** ► If you want to encode with Datarhei take care that your hardware has enough CPU-Power available. We will gladly help you look for the encoding to the correct settings. \ No newline at end of file diff --git a/docs/wiki/encoding_en_generalinstructions.md b/docs/wiki/encoding_en_generalinstructions.md new file mode 100644 index 0000000..28b1819 --- /dev/null +++ b/docs/wiki/encoding_en_generalinstructions.md @@ -0,0 +1,10 @@ +--- +title: encoding_en +--- +######[General Instructions](/restreamer/wiki/general_instructions_en.html) > Encoding +#Encoding +In connection with "Video" "Encoding" means a process in which an existing video format is converted into another. Normaly , a video encoder hardware or software is used. + +Good article about Encoding. + +**Datarhei Hint ☺** ► If you want to encode with Datarhei take care that your hardware has enough CPU-Power available. We will gladly help you look for the encoding to the correct settings. \ No newline at end of file diff --git a/docs/wiki/english.md b/docs/wiki/english.md new file mode 100644 index 0000000..d3e874b --- /dev/null +++ b/docs/wiki/english.md @@ -0,0 +1,18 @@ +--- +title: english +--- +#English +#####1. [FAQ - Frequently Asked Questions](/restreamer/wiki/faq_en.html) +Short answers on many questions. +#####2. [Datarhei/Restreamer Installation](/restreamer/wiki/installation_en.html) +How to install Datarhei/Restreamer on my hardware +#####3. [General Instructions](/restreamer/wiki/generalinstructions_en.html) +Where is the RTSP URL of my IP-Cam? How can I test a stream with VLC? How to stream with Datarhei/Restreamer to YouTube or Ustream? How to catch a snapshot? Get some help in this section. +#####4. [Kamera Buyers Guide](/restreamer/wiki/camerabuyersguide_en.html) +You want to buy a IP-Camera to start a project with Datarhei/Restreamer. What important things to take care of you - here. +#####5. [Partner Streaming](/restreamer/wiki/partnerstreaming_en.html) +You are planning a big thing. Contact some of our partners for a smooth implementation. +#####6. [Handbook Basic Knowledge](/restreamer/wiki/handbookbasicknowhow_en.html) +You want to dive deeper into livestreaming and webvideo? Expert information for to get deep. Not necessary but would not be a miss... +#####7. [Support Datarhei](/restreamer/wiki/supportdatarhei_en.html) +Find out how to support the Datarhei/Restreamer keep the project alive in the future. \ No newline at end of file diff --git a/docs/wiki/faq_en.md b/docs/wiki/faq_en.md new file mode 100644 index 0000000..f6e532e --- /dev/null +++ b/docs/wiki/faq_en.md @@ -0,0 +1,48 @@ +--- +title: faq_en +--- +#Frequently Asked Questions +#####1. What's Datarhei/Restreamer? +► Datarhei/Restreamer is software which allows you to do free real-time video streaming for example to transfer video signals of webcams or other video-inputs direct on your website! You can get your own Datarhei/Restreamer streaming provider. +#####2. How do I make video streaming without Datarhei/Restreamer? +► The classic way is the data transfer with a streaming provider that collects monthly fees. Some services are supported by advertising, other additionally sell you own hardware then sell even your live stream, as result you lose the control of your video signal. The added value of so-called "Content syndication" are not measurable for you in most cases. +Datarhei/Restreamer allows you to transfer H.264 video in TV quality on your own website without these middlemen. The best part is, you're entitled to choose your hardware for your self, the use is without monthly charges and you remain in possession of your data! +#####3. For whom is it suitable? +► Datarhei/Restreamer is suitable for all kinds of live video. Private, professional Webcams for events or tourism marketing, in-house TV in hotels or restaurants, industrial monitoring or safety monitoring or surveillance are just a few applications. Your imagination knows no boundaries. The physical limit is at the attendances. For a lot of crowds and professional applications you need technology in the background on which you can easily connect you with Datarhei/Restreamer. +#####4. What is different from the "others"? +► Datarhei/Restreamer has no monthly fees and the streaming is completely free, because it uses your own internet connection. You're going to be your own streaming provider. You can really do whatever you want with Datarhei/Restreamer. It is free to use for both private and commercial use. +#####5. How old is Datarhei/Restreamer? +► Datarhei/Restreamer was presented to the public in late 2015th +#####6. Is there Datarhei/Restreamer for my operating system? +► Datarhei/Restreamer can be used on any type of operating system. Windows, MacOS, Linux, BSD and Solaris are supported. +#####7. What kind of hardware can Datarhei/Restreamer be installed? +► Datarhei/Restreamer had been tested with Raspberry Pi1, Pi2, ODROID, Windows, MacOS and Linux. More information about the [Hardware](Embedded Hardware). +#####8. Datarhei/Restreamer Notice? +► Datarhei/Restreamer provides the technology to transmit video data in real time. We request every user to respect the privacy policy of your country and the privacy requirements of every human being! +# Datarhei/Restreamer Basics +#####9. What kind of hardware is supported by Datarhei/Restreamer? +► Datarhei/Restreamer had been tested with Raspberry Pi1, Pi2, ODROID, Windows, MacOS and Linux. More information about the [Hardware](Embedded Hardware). +#####10. What should my network camera support, to work with Datarhei/Restreamer? +► What your camera may need to work with Datarhei/Restreamer could be read in our [Camera-Buyers-Guide](/restreamer/wiki/camerabuyersguide_en.html). +#####11. What should I consider when I transfer my live stream itself over Datarhei/Restreamer on my website? +► Any pitfalls we tell you here MISSING LINK +#####12. How much data upload is needed to produce a proper video live stream? +► Rule of thump for required upload and data volume of your video streams in the [wiki chapter about compression](/restreamer/wiki/videocompression_en.html). +#####13. Works Datarhei/Restreamer with UMTS / G3 or LTE / G4? +► Yes - But regard carefully on your bandwidth. An HD Live Stream can quickly consume over 1 GB of data per day. If you host yourself we recommend you to use a DSL or VDSL connection. +#####14. Where can I find a suitable network camera from? +► We have you a [selection of suitable network cameras on Amazon](/restreamer/wiki/shop_en.html) together. +#####15. How do I set a static IP? +► For more information about Dynamic DNS take a look [here in Wiki](/restreamer/wiki/dynamicdns_en.html). +#####16.Streaming on Apple mobile devices and Android possible? +► Yes - There we natively supports iPod Touch, iPhone and iPad. Android devices make no difference too. +#####17. Is a professional use of Datarhei/Restreamer possible? +► The use is possible. You should definitely get in touch with us and let us advise you. It must be decided individually for your project, what steps you have to go to carry out your project. +# Support +#####18. How can I support Datarhei/Restreamer? +► The easiest way to support us is certainly to tell everyone how cool you Datarhei/Restreamer find! Poste it on Facebook, Twitter or G + .☺ +A financial method is flatter Flattr this oder über Paypal zu spenden +. +As a software developer, you can easily appeal to us or upload your unasked modules in GitHub. + +If you like Datarhei/Restreamer and you want to help even if you are not a Softwaredeveloper get in contact with us. We have a lot of things to do around the Datarhei/Restreamer project. \ No newline at end of file diff --git a/docs/wiki/ffmpeg_en.md b/docs/wiki/ffmpeg_en.md new file mode 100644 index 0000000..866e33e --- /dev/null +++ b/docs/wiki/ffmpeg_en.md @@ -0,0 +1,8 @@ +--- +title: ffmpeg_en +--- +######[Basic Know How](/restreamer/wiki/basic_know_how.html) > [Videosoftware](/restreamer/wiki/videosoftware_en.html) > FFMPEG +#FFMPEG +FFmpeg is a free software project that produces libraries and programs for handling multimedia data. FFmpeg includes libavcodec, an audio/video codec library used by several other projects, libavformat, an audio/video container mux and demux library, and the ffmpeg command line program for transcoding multimedia files. FFmpeg is published under the GNU Lesser General Public License 2.1+ or GNU General Public License 2+ (depending on which options are enabled). Wikipedia + +**Datarhei Hint** ☺ ► FFmpeg Rockz! diff --git a/docs/wiki/findrtspurl_en.md b/docs/wiki/findrtspurl_en.md new file mode 100644 index 0000000..a991f55 --- /dev/null +++ b/docs/wiki/findrtspurl_en.md @@ -0,0 +1,18 @@ +--- +title: findrtspurl_en +--- +######[General Instructions](/restreamer/wiki/general_instructions_en.html) > Find RTSP URL +#Find RTSP URL +How to find the RTSP/RTP URL of your IP camera. First move to the following website and pick up your cam manufacturer and navigate to your camera model: http://www.soleratec.com/support/rtsp/rtsp_listing + +**Attention** - Please take care of the right Username:Password if you deactivated anonymous RTSP/RTP in your camera. The syntax is always the same: rtsp://Username:Passwort@CamIP/ManufacturerLink + +How to check the RTSP/RTP link on your local network with VLC: + +> 1. Open VLC +> 2. Open Network +> 3. Insert RTSP URL + +
![VLC RTSP Screenshot](http://datarhei.org/wiki/pic/vlc_screenshot.png)
+ +**Attention** If you open the RTSP connection for the first time i could take a few seconds until it opens - Be patient! If the stream did not open take a look at the Errormessage protocol in VLC. \ No newline at end of file diff --git a/docs/wiki/firewall_en.md b/docs/wiki/firewall_en.md new file mode 100644 index 0000000..d749951 --- /dev/null +++ b/docs/wiki/firewall_en.md @@ -0,0 +1,8 @@ +--- +title: firewall_en +--- +######[Network](/restreamer/wiki/networktechnology_en.html) > Firewall +#Firewall +In computing, a firewall is a network security system that monitors and controls the incoming and outgoing network traffic based on predetermined security rules. A firewall typically establishes a barrier between a trusted, secure internal network and another outside network, such as the Internet, that is assumed to not be secure or trusted. Firewalls are often categorized as either network firewalls or host-based firewalls. Network firewalls are a software appliance running on general purpose hardware or hardware-based firewall computer appliances that filter traffic between two or more networks. Host-based firewalls provide a layer of software on one host that controls network traffic in and out of that single machine. Routers that pass data between networks contain firewall components and can often perform basic routing functions as well, Firewall appliances may also offer other functionality to the internal network they protect such as acting as a DHCP or VPN server for that network. Wikipedia + +**Datarhei Hint ☺** ► If you are running Datarhei on a PC or in a network with firewall look sharp on port 8080 and 1934 necessarily release next to the port forwarding ports in the firewall so that your embedded code to communicate from your web site with Datarhei in your network. \ No newline at end of file diff --git a/docs/wiki/framerate_en.md b/docs/wiki/framerate_en.md new file mode 100644 index 0000000..64e1fd6 --- /dev/null +++ b/docs/wiki/framerate_en.md @@ -0,0 +1,8 @@ +--- +title: framerate_en +--- +######[Camera](/restreamer/wiki/cameratechnology_en.html) > Framerate (FPS) +#Framerate (FPS) +Frame rate, also known as frame frequency, is the frequency (rate) at which an imaging device displays consecutive images called frames. The term applies equally to film and video cameras, computer graphics, and motion capture systems. Frame rate is expressed in frames per second (FPS). Wikipedia + +**Datarhei Hint ☺** ► If you want to reduce your upload bandwith, descend your frame rate down to max. 16 FPS to reduce the amount of data. \ No newline at end of file diff --git a/docs/wiki/general_instructions.md b/docs/wiki/general_instructions.md new file mode 100644 index 0000000..13479c8 --- /dev/null +++ b/docs/wiki/general_instructions.md @@ -0,0 +1,20 @@ +--- +title: general_instructions +--- +#General Instructions +**Datarhei Tip** ☺ ► Read the Datarhei/Restreamer installation instructions for your hardware [Installation Instructions](/restreamer/wiki/installation_en.html). +
General Instructions
+#####1. [Portforwarding](/restreamer/wiki/portforwarding_en.html) +#####2. [Dynamic DNS](/restreamer/wiki/dynamicdns_en.html) +#####3. [Show Public IP](/restreamer/wiki/showpublicip_en.html) +#####4. [Find and test RTSP/RTP URL](/restreamer/wiki/findrtspurl_en.html) +#####5. [How to streamen USB Camera](/restreamer/wiki/howtostreamusbcamera_en.html) +#####6. [Embedd Snapshot](/restreamer/wiki/embeddsnapshot_en.html) +#####7. [Modify Snapshotinterva](/restreamer/wiki/modifysnapshotinterval_en.html) +#####8. [Livestreaming with YouTube](/restreamer/wiki/livestreamingyoutube_en.html) +#####9. [Livestreaming with Ustream](/restreamer/wiki/livestreaminglivestreamcom_en.html) +#####10. [Livestreaming with Twitch.tv](/restreamer/wiki/livestreamingtwitch_en.html) +#####11. [Embedded HTML video iFrame](/restreamer/wiki/embeddediframe_en.html) +#####12. [iFrame/GOP/GOV](/restreamer/wiki/iframe_en.html) +#####13. [Video Resolution](/restreamer/wiki/videoresolution_en.html) +#####14. [Encoding](/restreamer/wiki/encoding_en.html) \ No newline at end of file diff --git a/docs/wiki/general_instructions_en.md b/docs/wiki/general_instructions_en.md new file mode 100644 index 0000000..b36b1f3 --- /dev/null +++ b/docs/wiki/general_instructions_en.md @@ -0,0 +1,16 @@ +--- +title: general_instructions_en +--- +#General Instructions +**Datarhei Hint** ☺ ► Read the Datarhei/Restreamer installation instructions for your hardware [Installation Instructions](/restreamer/wiki/installation_en.html). + +#####1. [Portforwarding](/restreamer/wiki/portforwarding_en.html) +#####2. [Dynamic DNS](/restreamer/wiki/dynamicdns_en.html) +#####3. [Show Public IP](/restreamer/wiki/showpublicip_en.html) +#####4. [Find and test RTSP/RTP URL](/restreamer/wiki/findrtspurl_en.html) +#####5. [Livestreaming with YouTube](/restreamer/wiki/livestreamingyoutube_en.html) +#####6. [Livestreaming with Ustream](/restreamer/wiki/livestreaminglivestreamcom_en.html) +#####7. [Livestreaming with Twitch.tv](/restreamer/wiki/livestreamingtwitch_en.html) +#####8. [iFrame/GOP/GOV](/restreamer/wiki/iframe_en_generalinstructions.html) +#####9. [Video Resolution](/restreamer/wiki/videoresolution_en_generalinstructions.html) +#####10. [Encoding](/restreamer/wiki/encoding_en_generalinstructions.html) \ No newline at end of file diff --git a/docs/wiki/globocam_en.md b/docs/wiki/globocam_en.md new file mode 100644 index 0000000..70c5ace --- /dev/null +++ b/docs/wiki/globocam_en.md @@ -0,0 +1,4 @@ +--- +title: globocam_en +--- +#GLobocam \ No newline at end of file diff --git a/docs/wiki/guide-buy-hardware.md b/docs/wiki/guide-buy-hardware.md new file mode 100644 index 0000000..fad9048 --- /dev/null +++ b/docs/wiki/guide-buy-hardware.md @@ -0,0 +1,12 @@ +--- +Title: guide-buy-hardware +--- +#Hardware Buying Guide +#####1. [Raspberry Pi](/wiki/guide-buy-pi.html) +#####2. [USB-Camera](wiki/guide-buy-usb-cam.html) - The entry in your streaming experience! +#####3. [WiFi-Camera](/wiki/guide-buy-wifi-cam.htm) - Indoor Network Cameras with wireless LAN. +#####4. [Indoor Static](/wiki/guide-buy-in-static.html) - The entry into the network camera world. +#####5. [Outdoor Static](/wiki/guide-buy-out-static.html) - For most projects a static outdoor camera is the first choice +#####6. [Outdoor PTZ](/wiki/guide-buy-out-ptz.html) - The all-rounder for ambitious projects. +#####7. [DIY IP-Camera](/wiki/guide-buy-diy-ip-cam.html) - To build their own network camera is not so difficult as you think! +#####8. [Accessories](/wiki/guide-buy-accessories.html) - Anything you can still use project for your camera. \ No newline at end of file diff --git a/docs/wiki/h264_en.md b/docs/wiki/h264_en.md new file mode 100644 index 0000000..8f838b7 --- /dev/null +++ b/docs/wiki/h264_en.md @@ -0,0 +1,9 @@ +--- +title: h264_en +--- +######[Camera](/restreamer/wiki/cameratechnology_en.html) > H.264 +#H.264 +H.264 or MPEG-4 Part 10, Advanced Video Coding (MPEG-4 AVC) is a video coding format that is currently one of the most commonly used formats for the recording, compression, and distribution of video content. The final drafting work on the first version of the standard was completed in May 2003, and various extensions of its capabilities have been added in subsequent editions. +H.264/MPEG-4 AVC is a block-oriented motion-compensation-based video compression standard developed by the ITU-T Video Coding Experts Group (VCEG) together with the ISO/IEC JTC1 Moving Picture Experts Group (MPEG). The project partnership effort is known as the Joint Video Team (JVT). The ITU-T H.264 standard and the ISO/IEC MPEG-4 AVC standard (formally, ISO/IEC 14496-10 – MPEG-4 Part 10, Advanced Video Coding) are jointly maintained so that they have identical technical content. Wikipedia + +**Datarhei Hint** ☺ ► For the use of Datarhei/Restreamer it is best to have a video stream in H.264 Input. If your network camera has no H.264 support, you need your video stream in H.264 convert (Encoding). \ No newline at end of file diff --git a/docs/wiki/h264_en_camerabuyersguide.md b/docs/wiki/h264_en_camerabuyersguide.md new file mode 100644 index 0000000..b030d42 --- /dev/null +++ b/docs/wiki/h264_en_camerabuyersguide.md @@ -0,0 +1,9 @@ +--- +title: h264_en +--- +######[Cameras Buyers Guide](/restreamer/wiki/camerabuyersguide_en) > H.264 +#H.264 +H.264 or MPEG-4 Part 10, Advanced Video Coding (MPEG-4 AVC) is a video coding format that is currently one of the most commonly used formats for the recording, compression, and distribution of video content. The final drafting work on the first version of the standard was completed in May 2003, and various extensions of its capabilities have been added in subsequent editions. +H.264/MPEG-4 AVC is a block-oriented motion-compensation-based video compression standard developed by the ITU-T Video Coding Experts Group (VCEG) together with the ISO/IEC JTC1 Moving Picture Experts Group (MPEG). The project partnership effort is known as the Joint Video Team (JVT). The ITU-T H.264 standard and the ISO/IEC MPEG-4 AVC standard (formally, ISO/IEC 14496-10 – MPEG-4 Part 10, Advanced Video Coding) are jointly maintained so that they have identical technical content. Wikipedia + +**Datarhei Hint** ☺ ► For the use of Datarhei/Restreamer it is best to have a video stream in H.264 Input. If your network camera has no H.264 support, you need your video stream in H.264 convert (Encoding). \ No newline at end of file diff --git a/docs/wiki/hlshttp_en.md b/docs/wiki/hlshttp_en.md new file mode 100644 index 0000000..698014b --- /dev/null +++ b/docs/wiki/hlshttp_en.md @@ -0,0 +1,7 @@ +--- +title: hlshttp_en +--- +#HLS +Push, or server push, describes a style of Internet-based communication where the request for a given transaction is initiated by the publisher or central server. It is contrasted with pull/get, where the request for the transmission of information is initiated by the receiver or client. Wikipedia + +**Datarhei Hint** ☺ ► The default player of Datarhei/Restreamer embedded iFrame is supporting HLS streaming for iOS and Safari. \ No newline at end of file diff --git a/docs/wiki/howtostreamusbcamera_en.md b/docs/wiki/howtostreamusbcamera_en.md new file mode 100644 index 0000000..a287a8c --- /dev/null +++ b/docs/wiki/howtostreamusbcamera_en.md @@ -0,0 +1,5 @@ +--- +title: howtostreamusbcamera_en +--- +######[General Instructions](/restreamer/wiki/general_instructions_en.html) > How to stream USB-Video-Devices +#How to stream USB-Video-Devices diff --git a/docs/wiki/hugin_en.md b/docs/wiki/hugin_en.md new file mode 100644 index 0000000..dda3c3f --- /dev/null +++ b/docs/wiki/hugin_en.md @@ -0,0 +1,6 @@ +--- +title: hugin_en +--- +######[Basic Know How](/restreamer/wiki/basic_know_how.html) > [Videosoftware](/restreamer/wiki/videosoftware_en.html) > Hugin +#HUGIN +Hugin is a cross-platform open source panorama photo stitching and HDR merging program developed by Pablo d'Angelo and others. It is a GUI front-end for Helmut Dersch's Panorama Tools and Andrew Mihal's Enblend and Enfuse. Stitching is accomplished by using several overlapping photos taken from the same location, and using control points to align and transform the photos so that they can be blended together to form a larger image. Hugin allows for the easy (optionally automatic) creation of control points between two images, optimization of the image transforms along with a preview window so the user can see whether the panorama is acceptable. Once the preview is correct, the panorama can be fully stitched, transformed and saved in a standard image format. Wikipedia \ No newline at end of file diff --git a/docs/wiki/hyperlapse_en.md b/docs/wiki/hyperlapse_en.md new file mode 100644 index 0000000..3302328 --- /dev/null +++ b/docs/wiki/hyperlapse_en.md @@ -0,0 +1,4 @@ +--- +title: hyperlapse +--- +#Hyperlapse \ No newline at end of file diff --git a/docs/wiki/iframe_en.md b/docs/wiki/iframe_en.md new file mode 100644 index 0000000..3950067 --- /dev/null +++ b/docs/wiki/iframe_en.md @@ -0,0 +1,14 @@ +--- +title: iframe_en +--- +######[Camera](/restreamer/wiki/cameratechnology_en.html) > iFrame +#iFrame +In the field of video compression a video frame is compressed using different algorithms with different advantages and disadvantages, centered mainly around amount of data compression. These different algorithms for video frames are called picture types or frame types. The three major picture types used in the different video algorithms are I, P and B. They are different in the following characteristics: +I‑frames are the least compressible but don't require other video frames to decode. +P‑frames can use data from previous frames to decompress and are more compressible than I‑frames. +B‑frames can use both previous and forward frames for data reference to get the highest amount of data compression. Wikipedia + +**Datarhei Hint ☺** ► In this context also dive often the terms GOP (Group of Pictures) or on GOV. The higher the parameter in your ip-camera the lower is the bandwidth required but the lower the quality of your video gets. We recommend an optimal GOP of 25 but no more than 61st + + + diff --git a/docs/wiki/iframe_en_generalinstructions.md b/docs/wiki/iframe_en_generalinstructions.md new file mode 100644 index 0000000..5908331 --- /dev/null +++ b/docs/wiki/iframe_en_generalinstructions.md @@ -0,0 +1,14 @@ +--- +title: iframe_en +--- +######[General Instructions](/restreamer/wiki/general_instructions_en.html) > iFrame +#iFrame +In the field of video compression a video frame is compressed using different algorithms with different advantages and disadvantages, centered mainly around amount of data compression. These different algorithms for video frames are called picture types or frame types. The three major picture types used in the different video algorithms are I, P and B. They are different in the following characteristics: +I‑frames are the least compressible but don't require other video frames to decode. +P‑frames can use data from previous frames to decompress and are more compressible than I‑frames. +B‑frames can use both previous and forward frames for data reference to get the highest amount of data compression. Wikipedia + +**Datarhei Hint ☺** ► In this context also dive often the terms GOP (Group of Pictures) or on GOV. The higher the parameter in your ip-camera the lower is the bandwidth required but the lower the quality of your video gets. We recommend an optimal GOP of 25 but no more than 61st + + + diff --git a/docs/wiki/imagemagick_en.md b/docs/wiki/imagemagick_en.md new file mode 100644 index 0000000..b87461c --- /dev/null +++ b/docs/wiki/imagemagick_en.md @@ -0,0 +1,6 @@ +--- +title: imagemagick_en +--- +######[Basic Know How](/restreamer/wiki/basic_know_how.html) > [Videosoftware](/restreamer/wiki/videosoftware_en.html) > ImageMagick +#ImageMagick +ImageMagick is a free and open-source software suite for displaying, converting, and editing raster image and vector image files. It can read and write over 200 image file formats. ImageMagick is licensed under the Apache 2.0 license. Wikipedia \ No newline at end of file diff --git a/docs/wiki/index Kopie.md b/docs/wiki/index Kopie.md new file mode 100644 index 0000000..28a163d --- /dev/null +++ b/docs/wiki/index Kopie.md @@ -0,0 +1,7 @@ +--- +title: generalinstructions_en +--- + +#General Instructions +**Datarhei Tip** ☺ ► Read the Datarhei/Restreamer installation instructions for your hardware [Installation Instructions](/restreamer/wiki/installation_en.html). + diff --git a/docs/wiki/index.md b/docs/wiki/index.md new file mode 100644 index 0000000..2933cb4 --- /dev/null +++ b/docs/wiki/index.md @@ -0,0 +1,9 @@ +--- +title: Wiki +--- +# Welcome to Datarhei/Restreamer wiki +Some wiki posts are still partially under construction. +*** +####See doc's for up-to-date [documentation](https://github.com/datarhei/small-restreamer-internal/tree/master/docs). +####Want to talk to us? Just choose a nickname and join us on #datarhei webchat on freenode. +####If you're having a weird problem while developing, see [Known Issues](https://github.com/datarhei/restreamer/issues). \ No newline at end of file diff --git a/docs/wiki/installation_en.md b/docs/wiki/installation_en.md new file mode 100644 index 0000000..11f5f97 --- /dev/null +++ b/docs/wiki/installation_en.md @@ -0,0 +1,7 @@ +--- +title: installation_en +--- +#Installation +####See doc's for up-to-date [documentation](https://github.com/datarhei/small-restreamer-internal/tree/master/docs). +####Want to talk to us? Just choose a nickname and join us on #datarhei webchat on freenode. +####If you're having a weird problem while developing, see [Known Issues](https://github.com/datarhei/small-restreamer-internal/issues). \ No newline at end of file diff --git a/docs/wiki/ipcamera_en.md b/docs/wiki/ipcamera_en.md new file mode 100644 index 0000000..edb7f03 --- /dev/null +++ b/docs/wiki/ipcamera_en.md @@ -0,0 +1,14 @@ +--- +title: ipcamera_en +--- +######[Network](/restreamer/wiki/networktechnology_en.html) > IP Camera +#IP Camera +An Internet protocol camera, or IP camera, is a type of digital video camera commonly employed for surveillance, and which, unlike analog closed circuit television (CCTV) cameras, can send and receive data via a computer network and the Internet. Although most cameras that do this are webcams, the term "IP camera" or "netcam" is usually applied only to those used for surveillance. The first centralized IP camera was Axis Neteye 200, released in 1996 by Axis Communications. + +There are two kinds of IP cameras: + +Centralized IP cameras, which require a central network video recorder (NVR) to handle the recording, video and alarm management. + +Decentralized IP cameras, which do not require a central NVR, as the cameras have recording function built-in and can thus record directly to any standard storage media, such as SD cards, NAS (network attached storage) or a PC/server. + +Wikipedia \ No newline at end of file diff --git a/docs/wiki/iriscontrol.md b/docs/wiki/iriscontrol.md new file mode 100644 index 0000000..c59a858 --- /dev/null +++ b/docs/wiki/iriscontrol.md @@ -0,0 +1,11 @@ +--- +title: iriscontrol_en +--- + +An auto iris adjusts to the ever-changing light under outdoor conditions like the human eye. When the sun shines, the iris closes automatically so that less light to the image processor falls. Is it, for example darker through a cloud, it opens the iris to allow more light to come in. + +There are in addition to the auto-iris still: Fixed Iris, Manual Iris and P-Iris. A full explanation can be found here at AXIS Communications. + +Nice article about Iris control. + +**Datarhei Hint** ☺ ► Only Auto-Iris allows camera using a in outdoor areas. Without this feature, a camera is not suitable for all light conditions and not for perfect outdoor use. \ No newline at end of file diff --git a/docs/wiki/iriscontrol_en.md b/docs/wiki/iriscontrol_en.md new file mode 100644 index 0000000..50e7d4f --- /dev/null +++ b/docs/wiki/iriscontrol_en.md @@ -0,0 +1,12 @@ +--- +title: iriscontrol_en +--- +######[Camera](/restreamer/wiki/cameratechnology_en.html) > Iris Control +#Iris Control +An auto iris adjusts to the ever-changing light under outdoor conditions like the human eye. When the sun shines, the iris closes automatically so that less light to the image processor falls. Is it, for example darker through a cloud, it opens the iris to allow more light to come in. + +There are in addition to the auto-iris still: Fixed Iris, Manual Iris and P-Iris. A full explanation can be found here at AXIS Communications. + +Nice article about Iris control. + +**Datarhei Hint** ☺ ► Only Auto-Iris allows camera using a in outdoor areas. Without this feature, a camera is not suitable for all light conditions and not for perfect outdoor use. \ No newline at end of file diff --git a/docs/wiki/jvc_en.md b/docs/wiki/jvc_en.md new file mode 100644 index 0000000..abbba06 --- /dev/null +++ b/docs/wiki/jvc_en.md @@ -0,0 +1,5 @@ +--- +title: jvc_en +--- +######[Basic Know How](/restreamer/wiki/basic_know_how.html) > [Camera Manufacturer](/restreamer/wiki/cameramanufacturer_en.html) > JVC +#JVC \ No newline at end of file diff --git a/docs/wiki/kmotion_en.md b/docs/wiki/kmotion_en.md new file mode 100644 index 0000000..a36e2d3 --- /dev/null +++ b/docs/wiki/kmotion_en.md @@ -0,0 +1,11 @@ +--- +title: kmotion_en +--- +######[Basic Know How](/restreamer/wiki/basic_know_how.html) > [Videosoftware](/restreamer/wiki/videosoftware_en.html) > Kmotion +#Kmotion +Kmotion is a GUI for [Motion](/restreamer/wiki/motion_en.html). Motion aka Kmotion has some nice wokring security features. Many tutorials and references help you to handle Motion for your security case. + +Webseite Kmotion. + +A good start is this nice Link: +An Introduction to Video Surveillance with 'Motion' \ No newline at end of file diff --git a/docs/wiki/linuxuvc_en.md b/docs/wiki/linuxuvc_en.md new file mode 100644 index 0000000..3ef2a00 --- /dev/null +++ b/docs/wiki/linuxuvc_en.md @@ -0,0 +1,12 @@ +--- +title: linuxuvc_en +--- +######[Basic Know How](/restreamer/wiki/basic_know_how.html) > [Videosoftware](/restreamer/wiki/videosoftware_en.html) > Linux UVC +#Linux UVC +UVC - USB Video Class is a large collection of USB-Linux device driver for USB cameras at home. +It includes a V4L2 kernel device drivers and patches and numerous cameras are supported. List of supported cameras. + +Projectpage: http://www.ideasonboard.org/uvc/ + +**Datarhei Hint** ☺ ► If you are using a USB Webcam with Datarhei BE SURE if your camera is supported by UVC. If a USB camera Linux be able this is a good sign for functionality with Datarhei. \ No newline at end of file diff --git a/docs/wiki/livestreamcom_en.md b/docs/wiki/livestreamcom_en.md new file mode 100644 index 0000000..6a8d969 --- /dev/null +++ b/docs/wiki/livestreamcom_en.md @@ -0,0 +1,8 @@ +--- +title: livestreamcom_en +--- +######[General Instructions](/restreamer/wiki/general_instructions_en.html) > Livestream.com +#Livestream.com +Like [[Ustream|Ustream EN]]LiveStream.com had a free ad-supported usable. Nowadays, it is possible to use a free 30-day trial account. From then it costs each month. The prices can be viewed here.. + +**Datarhei Hinweis** ☺ ► Livestream.com should workd with Datarhei smoothly. Has not been tested so far. [Instructions can be found here](/restreamer/wiki/ivestreaminglivestream.com) \ No newline at end of file diff --git a/docs/wiki/livestreaming_en.md b/docs/wiki/livestreaming_en.md new file mode 100644 index 0000000..6ecda26 --- /dev/null +++ b/docs/wiki/livestreaming_en.md @@ -0,0 +1,9 @@ +--- +title: livestreaming_en +--- +######[Camera](/restreamer/wiki/cameratechnology_en.html) > Livestreaming +#Livestreaming +Streaming media is multimedia that is constantly received by and presented to an end-user while being delivered by a provider. The verb "to stream" refers to the process of delivering media in this manner; the term refers to the delivery method of the medium, rather than the medium itself, and is an alternative to downloading. + +Live streaming, which refers to content delivered live over the Internet, requires a form of source media (e.g. a video camera, an audio interface, screen capture software), an encoder to digitize the content, a media publisher, and a content delivery network to distribute and deliver the content. Wikipedia + diff --git a/docs/wiki/livestreaminglivestreamcom_en.md b/docs/wiki/livestreaminglivestreamcom_en.md new file mode 100644 index 0000000..547f2c3 --- /dev/null +++ b/docs/wiki/livestreaminglivestreamcom_en.md @@ -0,0 +1,5 @@ +--- +title: livestreaminglivestreamcom_en +--- +######[General Instructions](/restreamer/wiki/general_instructions_en.html) > Livestream.com +#Livestreaming to Livestream.com diff --git a/docs/wiki/livestreamingtwitch_en.md b/docs/wiki/livestreamingtwitch_en.md new file mode 100644 index 0000000..ab4f666 --- /dev/null +++ b/docs/wiki/livestreamingtwitch_en.md @@ -0,0 +1,5 @@ +--- +title: livestreamingtwitch_en +--- +######[General Instructions](/restreamer/wiki/general_instructions_en.html) > Livestreaming to Twitch.tv +#Livestreaming to Twitch.tv \ No newline at end of file diff --git a/docs/wiki/livestreamingustream_en.md b/docs/wiki/livestreamingustream_en.md new file mode 100644 index 0000000..8293dfb --- /dev/null +++ b/docs/wiki/livestreamingustream_en.md @@ -0,0 +1,5 @@ +--- +title: livestreamingustream_en +--- +######[General Instructions](/restreamer/wiki/general_instructions_en.html) > Livestreaming to Ustream.tv +#Livestreaming to Ustream.tv \ No newline at end of file diff --git a/docs/wiki/livestreamingyoutube_en.md b/docs/wiki/livestreamingyoutube_en.md new file mode 100644 index 0000000..826a954 --- /dev/null +++ b/docs/wiki/livestreamingyoutube_en.md @@ -0,0 +1,5 @@ +--- +title: livestreamingyoutube +--- +######[General Instructions](/restreamer/wiki/general_instructions_en.html) > Livestreaming to YouTube.com +#Livestreaming to Youtube.com \ No newline at end of file diff --git a/docs/wiki/lookr_en.md b/docs/wiki/lookr_en.md new file mode 100644 index 0000000..0bfe750 --- /dev/null +++ b/docs/wiki/lookr_en.md @@ -0,0 +1,4 @@ +--- +title: lookr_en +--- +#Lookr.com \ No newline at end of file diff --git a/docs/wiki/lte_en.md b/docs/wiki/lte_en.md new file mode 100644 index 0000000..dbbea6d --- /dev/null +++ b/docs/wiki/lte_en.md @@ -0,0 +1,9 @@ +--- +title: lte_en +--- +######[Network](/restreamer/wiki/networktechnology_en.html) > LTE +#LTE +LTE, an abbreviation for Long-Term Evolution, commonly marketed as 4G LTE, is a standard for wireless communication of high-speed data for mobile phones and data terminals. It is based on the GSM/EDGE and UMTS/HSPA network technologies, increasing the capacity and speed using a different radio interface together with core network improvements.The standard is developed by the 3GPP (3rd Generation Partnership Project) and is specified in its Release 8 document series, with minor enhancements described in Release 9. +LTE is the natural upgrade path for carriers with both GSM/UMTS networks and CDMA2000 networks. The different LTE frequencies and bands used in different countries will mean that only multi-band phones will be able to use LTE in all countries where it is supported. Wikipedia + +**Datarhei Hint ☺** ► **G4 definitely pay attention on the data volume when using LTE for streaming!** With G4 you can safely transferred a 450p stream. 720p is relatively expensive with the most data plans. ** TIP: Turn off night and downsize frame rate to 16 FPS helps reduce bandwidth **! diff --git a/docs/wiki/mjpeg_en.md b/docs/wiki/mjpeg_en.md new file mode 100644 index 0000000..9a4197c --- /dev/null +++ b/docs/wiki/mjpeg_en.md @@ -0,0 +1,9 @@ +--- +title: mjpeg_en +--- +######[Camera](/restreamer/wiki/cameratechnology_en.html) > MJPEG +#MJPEG +In Motion JPEG or MJPG full image information is transmitted as a JPG graphic. Unlike H.264 this results in increased data rates for smooth frame rates. Motion JPG streams are rapidly noticed as "bumpy" for the audience. MJPEG is pure 90´es! Wikipedia + +**Datarhei Hint ☺** ► Motion JPEG is supported by Data Rhei. But the encoding requires processing power. Raspberry Pi is not suitable for this. Datarhei/Restreamer relies on [H.264](restreamer/wiki/h264_en) via [RTSP](/restreamer/wiki/rtsp_en.html) to allow even at low bandwidths liquid streaming. + diff --git a/docs/wiki/mobotix_en.md b/docs/wiki/mobotix_en.md new file mode 100644 index 0000000..748d3ad --- /dev/null +++ b/docs/wiki/mobotix_en.md @@ -0,0 +1,5 @@ +--- +title: mobotix_en +--- +######[Basic Know How](/restreamer/wiki/basic_know_how.html) > [Camera Manufacturer](/restreamer/wiki/cameramanufacturer_en.html) > Mobotix +#Mobotix \ No newline at end of file diff --git a/docs/wiki/modifysnapshotinterval_en.md b/docs/wiki/modifysnapshotinterval_en.md new file mode 100644 index 0000000..2099789 --- /dev/null +++ b/docs/wiki/modifysnapshotinterval_en.md @@ -0,0 +1,5 @@ +--- +title: modyfiysnapshotinterval_en +--- +######[General Instructions](/restreamer/wiki/general_instructions_en.html) > Modify Snapshot Interval +#Modify Snapshot Interval \ No newline at end of file diff --git a/docs/wiki/monetization_en.md b/docs/wiki/monetization_en.md new file mode 100644 index 0000000..c8a3bdc --- /dev/null +++ b/docs/wiki/monetization_en.md @@ -0,0 +1,22 @@ +--- +title: moneytization_en +--- +######[Basic Know How](/restreamer/wiki/basic_know_how.html) > Moneytization +#Moneytization +Earn money with your live stream is a nice thing. From experience, however, this is possible only on advertising for large portals with millions of page views. + +A nice livestream is quickly becoming magnet for visitors of each website. This is to position it well for small sites possible date content or advertising in the player environment and to benefit from the fact that the visitors come back to throw every day at a glance at the live stream. + +**Datarhei Hint** ☺ ► **Our advice if you want to earn money: herself commercialize and distribute the video stream locally** to eg the Tourist Hotel next door or the Stadtwerke or the city marketing your residence is the most lucrative for the webcam owner. Here is not paid by TKP but per month and it depends on your own negotiating skills from what you get! 100-1000 euros per year have been quite already achieved. It is possibly to have advertising in addition to the players not sexy of butcher or bakery Hackmann Bullermann but effective! + +Did you still with video advertising before your streams earn here are a few comments and good luck. + +There are 3 ways your video stream with advertising to monetize. + +**Datarhei Hint** ☺ ► The merit in advertising is CPM (cost per thousand), that sum will be XY Schütte 1000 Views defined. + +1. Big marketer contracts with advertisers who, like DoubleClick, Gruner & Jahr, SmartClip etc. offer CPM for small pages 5-10 Euro, if you accept you at all as a customer. Often the "big" talk only from one million to 10 million users with you about TKP's. If you have so much to users in the month of sometimes 25-35 euro drop in campaigns. + +2. Google Adsense - TKP 100,000 Views 50 Euro as a rule of thumb (without Google DoubleClick). + +3. Player environment advertise on affiliate ** CPM varies greatly 10 Cent - 10 Euro. \ No newline at end of file diff --git a/docs/wiki/motion_en.md b/docs/wiki/motion_en.md new file mode 100644 index 0000000..f53615c --- /dev/null +++ b/docs/wiki/motion_en.md @@ -0,0 +1,9 @@ +--- +title: motion_en +--- +######[Basic Know How](/restreamer/wiki/basic_know_how.html) > [Videosoftware](/restreamer/wiki/videosoftware_en.html) > Motion +#Motion +Motion, a software motion detector, is a free, open source CCTV software application developed for Linux. +It can monitor video signal from one or more cameras and is able to detect if a significant part of the picture has changed saving away video when it detects that motion is occurring (it can also do time lapse videos, et al.). +The program is written in C and is made for Linux (exploiting video4linux interface). Motion is a command line based tool whose output can be either jpeg, netpbm files or mpeg video sequences. It is strictly command line driven and can run as a daemon with a rather small footprint and low CPU usage. +It is operated mainly via config files, though the end video streams can be viewed from a web browser. It can also call to user configurable "triggers" when certain events occur. Wikipedia \ No newline at end of file diff --git a/docs/wiki/mpegdash_en.md b/docs/wiki/mpegdash_en.md new file mode 100644 index 0000000..8671182 --- /dev/null +++ b/docs/wiki/mpegdash_en.md @@ -0,0 +1,7 @@ +--- +title: mpegdash_en +--- +#MPEG DASH +Dynamic Adaptive Streaming over HTTP (DASH), also known as MPEG-DASH, is an adaptive bitrate streaming technique that enables high quality streaming of media content over the Internet delivered from conventional HTTP web servers. Similar to Apple's HTTP Live Streaming (HLS) solution, MPEG-DASH works by breaking the content into a sequence of small HTTP-based file segments, each segment containing a short interval of playback time of content that is potentially many hours in duration, such as a movie or the live broadcast of a sports event. The content is made available at a variety of different bit rates, i.e., alternative segments encoded at different bit rates covering aligned short intervals of play back time are made available. While the content is being played back by an MPEG-DASH client, the client automatically selects from the alternatives the next segment to download and play back based on current network conditions. The client selects the segment with the highest bit rate possible that can be downloaded in time for play back without causing stalls or re-buffering events in the playback. Thus, an MPEG-DASH client can seamlessly adapt to changing network conditions, and provide high quality play back with fewer stalls or re-buffering events. Wikipedia + +**Datarhei Hinweis** ☺ ► Basically, MPEG-DASH with Datarhei is possible, but it is not out of the box avaiable! Whoever urgently needed - please contact us! We are happy to help. \ No newline at end of file diff --git a/docs/wiki/networkpowersocket_en.md b/docs/wiki/networkpowersocket_en.md new file mode 100644 index 0000000..1b93041 --- /dev/null +++ b/docs/wiki/networkpowersocket_en.md @@ -0,0 +1,16 @@ +--- +title: networkpowersocket_en +--- +######[Network](/restreamer/wiki/networktechnology_en.html) > Network Power Socket +#Network Power Socket +Network-compatible power sockets are a good choice to reduce the support of your system. About the GSM (mobile), network (LAN) or internet (WWW), the socket can be switched. To powercycle is very easy with this hardware. + +Watchdog is often supported. The watchdog automatically restarts your equipment as soon as they are no longer accessible on the network. + +DIY circuit with Raspberry Pi and FHEM are to build for much less than 50 euros. With the search words "Raspberry Pi and power socket" and maybe "FHEM" to quickly find many tutorials on the subject on the Internet. + +Professional providers of beautiful solutions are, for example: + +* Anel +* GMS-One +* ISocket \ No newline at end of file diff --git a/docs/wiki/networkswitch_en.md b/docs/wiki/networkswitch_en.md new file mode 100644 index 0000000..a8df0d3 --- /dev/null +++ b/docs/wiki/networkswitch_en.md @@ -0,0 +1,8 @@ +--- +title: networkswitch_en +--- +######[Network](/restreamer/wiki/networktechnology_en.html) > Network Switch +#Network Switch +A network switch (also called switching hub, bridging hub, officially MAC bridge) is a computer networking device that connects devices together on a computer network, by using packet switching to receive, process and forward data to the destination device. Unlike less advanced network hubs, a network switch forwards data only to one or multiple devices that need to receive it, rather than broadcasting the same data out of each of its ports. Wikipedia + +**Datarhei Hint ☺** ► A network switch is a helper if you dont have enough RJ45 connectors, it is easy to extend your connectors with this hardware. \ No newline at end of file diff --git a/docs/wiki/networktechnology_en.md b/docs/wiki/networktechnology_en.md new file mode 100644 index 0000000..28f4355 --- /dev/null +++ b/docs/wiki/networktechnology_en.md @@ -0,0 +1,39 @@ +--- +title: networktechnology_en +--- +#Network +Who operates with live video streaming will will get in contact with of hardware and misc IT technologies. We have put the main parts together for you: + +##### 1. Hardware +* [IP Camera](/restreamer/wiki/ipcamera_en.html) +* [USB-Camera](/restreamer/wiki/usbcamera_en.html) +* [POE](/restreamer/wiki/poe_en.html) +* [Network Power Socket](/restreamer/wiki/networkpowersocket_en.html) +* [SMS Power Socket](/restreamer/wiki/smspowersocket_en.html) +* [Router](/restreamer/wiki/router_en.html) +* [Network Switch](/restreamer/wiki/networkswitch_en.html) + +##### 2. Internet Access +* [Firewall](firewall_en.html) +* [Port 1935](/restreamer/wiki/port1935_en.html) +* [Port 554](/restreamer/wiki/port554_en.html) +* [ADSL](/restreamer/wiki/adsl_en.html) +* [SDSL](/restreamer/wiki/sdsl_en.html) +* [VDSL](/restreamer/wiki/vdsl_en.html) +* [LTE](/restreamer/wiki/lte_en.html) +* [Data Volume](/restreamer/wiki/datavolume_en.html) +* [Upload](/restreamer/wiki/upload_en.html) +* [Download](/restreamer/wiki/download_en.html) + +##### 3. Server +* [Webhosting](/restreamer/wiki/webhosting_en.html) +* [Rootserver](/restreamer/wiki/rootserver_en.html) + +##### 4. Software Development +* [Node.js](/restreamer/wiki/nodejs_en.html) +* [Docker](/restreamer/wiki/docker_en.html) + +##### 5. Miscellaneous +* [Dynamic DNS](/restreamer/wiki/dynamicdns_en.html) +* [Dynamic IP (DHCP)](/restreamer/wiki/dynamicip_en.html) +* [Static IP](/restreamer/wiki/staticip_en.html) \ No newline at end of file diff --git a/docs/wiki/nodejs_en.md b/docs/wiki/nodejs_en.md new file mode 100644 index 0000000..b1316ad --- /dev/null +++ b/docs/wiki/nodejs_en.md @@ -0,0 +1,8 @@ +--- +title: nodejs_en +--- +######[Network](/restreamer/wiki/networktechnology_en.html) > Node.js +#Node.js +Node.js is an open-source, cross-platform runtime environment for developing server-side web applications. Node.js applications are written in JavaScript and can be run within the Node.js runtime on OS X, Microsoft Windows, Linux, FreeBSD, NonStop, IBM AIX, IBM System z and IBM i. Its work is hosted and supported by the Node.js Foundation, a collaborative project at Linux Foundation. Wikipedia + +**Datarhei Hint** ☺ ► Node.js is part of the Datarhei software. More info in our area for software developers or on the [Datarhei Github](https://github.com/datarhei/) developer section. diff --git a/docs/wiki/oss_en.md b/docs/wiki/oss_en.md new file mode 100644 index 0000000..58fc917 --- /dev/null +++ b/docs/wiki/oss_en.md @@ -0,0 +1,7 @@ +--- +title: oss_en +--- +######[Basic Know How](/restreamer/wiki/basic_know_how.html) > Open-Source software (OSS) +#Open-Source software (OSS) +Open-source software (OSS) is computer software with its source code made available with a license in which the copyright holder provides the rights to study, change, and distribute the software to anyone and for any purpose. Open-source software may be developed in a collaborative public manner. Open-source software is the most prominent example of open-source development and often compared to (technically defined) user-generated content or (legally defined) open-content movements. +Wikipedia \ No newline at end of file diff --git a/docs/wiki/page.md b/docs/wiki/page.md new file mode 100644 index 0000000..5986f96 --- /dev/null +++ b/docs/wiki/page.md @@ -0,0 +1,5 @@ +--- +title: Pansenklopper +--- + +# Pansenklopper diff --git a/docs/wiki/panoramablick_en.md b/docs/wiki/panoramablick_en.md new file mode 100644 index 0000000..0ba7359 --- /dev/null +++ b/docs/wiki/panoramablick_en.md @@ -0,0 +1,3 @@ +--- +title: panoramablick_en +--- \ No newline at end of file diff --git a/docs/wiki/partnerstreaming_en.md b/docs/wiki/partnerstreaming_en.md new file mode 100644 index 0000000..0e4c695 --- /dev/null +++ b/docs/wiki/partnerstreaming_en.md @@ -0,0 +1,7 @@ +--- +title: partnerstreaming_en +--- +#Professional Streaming +A professional streaming partner for video streaming hosting is the premier source for effective and reliable live streaming with Datarhei/Restreamer. Our friendly partner from http://www.video-stream-hosting.com/ is the 1st address for you. + +***You are unsure what to do? We advise you completely neutral and independent, so you can find your streaming partner for a successful project! Email to open@datarhei.org*** \ No newline at end of file diff --git a/docs/wiki/poe_en.md b/docs/wiki/poe_en.md new file mode 100644 index 0000000..9a6b4d6 --- /dev/null +++ b/docs/wiki/poe_en.md @@ -0,0 +1,8 @@ +--- +title: poe_en +--- +######[Network](/restreamer/wiki/networktechnology_en.html) > Power over Ethernet (POE) +#Power over Ethernet (POE) +Power over Ethernet or PoE describes any of several standardized or ad-hoc systems which pass electrical power along with data on Ethernet cabling. This allows a single cable to provide both data connection and electrical power to devices such as wireless access points or IP cameras. Unlike standards such as Universal Serial Bus which also power devices over the data cables, PoE allows long cable lengths. Power may be carried on the same conductors as the data, or it may be carried on dedicated conductors in the same cable. Wikipedia + +**Datarhei Hint ☺** ► Many manufacturers such as [AXIS Communications](/restreamer/wiki/axiscommunications_en.html) build its own proprietary devices. So be careful when POE purchasing! \ No newline at end of file diff --git a/docs/wiki/port1935_en.md b/docs/wiki/port1935_en.md new file mode 100644 index 0000000..39771e4 --- /dev/null +++ b/docs/wiki/port1935_en.md @@ -0,0 +1,8 @@ +--- +title: port1935_en +--- +######[Network](/restreamer/wiki/networktechnology_en.html) > Port 1935 +#Port 1935 +Real Time Messaging Protocol (RTMP) was initially a proprietary protocol developed by Macromedia for streaming audio, video and data over the Internet, between a Flash player and a server. Macromedia is now owned by Adobe, which has released an incomplete version of the specification of the protocol for public use. Wikipedia + +**Datarhei Hint** ☺ ► Look at [RTSP](/restreamer/wiki/rtsp_en.html) and [Portforwarding](/restreamer/wiki/portforwarding_en.html) \ No newline at end of file diff --git a/docs/wiki/port554_en.md b/docs/wiki/port554_en.md new file mode 100644 index 0000000..dd66181 --- /dev/null +++ b/docs/wiki/port554_en.md @@ -0,0 +1,7 @@ +--- +title: port554_en +--- +######[Network](/restreamer/wiki/networktechnology_en.html) > Port 554 +#Port 554 +The Real Time Streaming Protocol (RTSP) is a network control protocol designed for use in entertainment and communications systems to control streaming media servers. The protocol is used for establishing and controlling media sessions between end points. Clients of media servers issue VCR-style commands, such as play and pause, to facilitate real-time control of playback of media files from the server. Wikipedia + diff --git a/docs/wiki/portforwarding_en.md b/docs/wiki/portforwarding_en.md new file mode 100644 index 0000000..968cb26 --- /dev/null +++ b/docs/wiki/portforwarding_en.md @@ -0,0 +1,8 @@ +--- +title: portforwarding_en +--- +######[General Instructions](/restreamer/wiki/general_instructions_en.html) > Portforwarding +#Portforwarding +In computer networking, port forwarding or port mapping is an application of network address translation (NAT) that redirects a communication request from one address and port number combination to another while the packets are traversing a network gateway, such as a router or firewall. This technique is most commonly used to make services on a host residing on a protected or masqueraded (internal) network available to hosts on the opposite side of the gateway (external network), by remapping the destination IP address and port number of the communication to an internal host. Wikipedia + +**Datarhei Hint ☺** ► You have to forward the TCP Port 8080 and TCP 1934 (Keyword in the manual of your router: Porforwarding) to use the direc streaming to your website with Datarhei. Only if the two ports are forwarded the connection between your videoplayer and Datarhei will be successful. \ No newline at end of file diff --git a/docs/wiki/ptz_en.md b/docs/wiki/ptz_en.md new file mode 100644 index 0000000..f779a2c --- /dev/null +++ b/docs/wiki/ptz_en.md @@ -0,0 +1,10 @@ +--- +title: ptz_en +--- +######[Camera](/restreamer/wiki/cameratechnology_en.html) > PTZ +#PTZ +PTZ short for Pan Tilt Zoom. + +A PTZ camera can usually be rotated 270-360 degrees (left/right) and up to 180 degrees inclined (up/down). The zoom level depends on the camera model. Often, the cameras support even a digital zoom which starts automaticly after the optical zoom ends. + +**Datarhei Hint ☺** ► Also note our wiki articles which ist relevant for some PTZ and "Dome Cameras" to [Time Block](/restreamer/wiki/timebLock_en.html). \ No newline at end of file diff --git a/docs/wiki/restreamerinstall_en.md b/docs/wiki/restreamerinstall_en.md new file mode 100644 index 0000000..d5d44ca --- /dev/null +++ b/docs/wiki/restreamerinstall_en.md @@ -0,0 +1,4 @@ +--- +title: restreamerinstall_en +--- +#Restreamer Installation \ No newline at end of file diff --git a/docs/wiki/rootserver_en.md b/docs/wiki/rootserver_en.md new file mode 100644 index 0000000..94c4b8a --- /dev/null +++ b/docs/wiki/rootserver_en.md @@ -0,0 +1,6 @@ +--- +title: rootserver_en +--- +######[Network](/restreamer/wiki/networktechnology_en.html) > Rootserver +#Rootserver +A root name server is a name server for the root zone of the Domain Name System of the Internet. It directly answers requests for records in the root zone and answers other requests by returning a list of the authoritative name servers for the appropriate top-level domain (TLD). The root name servers are a critical part of the Internet infrastructure because they are the first step in translating (resolving) human readable host names into IP addresses that are used in communication between Internet hosts. Wikipedia \ No newline at end of file diff --git a/docs/wiki/router_en.md b/docs/wiki/router_en.md new file mode 100644 index 0000000..c52979a --- /dev/null +++ b/docs/wiki/router_en.md @@ -0,0 +1,8 @@ +--- +title: router_en +--- +######[Network](/restreamer/wiki/networktechnology_en.html) > Router +#Router +A router is a networking device that forwards data packets between computer networks. Routers perform the "traffic directing" functions on the Internet. A data packet is typically forwarded from one router to another through the networks that constitute the internetwork until it reaches its destination node. Wikipedia + +**Datarhei Hint ☺** ► You have to forward TCP port 8080 and 1934 for the direct streaming on your website with Datarhei. Keyword for searching how portforwarding works in your router is: YourRouterName + Porforwarding). Only with these 2 ports forwarded the iFrame can communicate with your Datarhei. \ No newline at end of file diff --git a/docs/wiki/rtmp_en.md b/docs/wiki/rtmp_en.md new file mode 100644 index 0000000..afbb887 --- /dev/null +++ b/docs/wiki/rtmp_en.md @@ -0,0 +1,5 @@ +--- +title: rtmp_en +--- +#RTMP +Real Time Messaging Protocol (RTMP) was initially a proprietary protocol developed by Macromedia for streaming audio, video and data over the Internet, between a Flash player and a server. Macromedia is now owned by Adobe, which has released an incomplete version of the specification of the protocol for public use. Wikipedia \ No newline at end of file diff --git a/docs/wiki/rtp_en.md b/docs/wiki/rtp_en.md new file mode 100644 index 0000000..8ddc794 --- /dev/null +++ b/docs/wiki/rtp_en.md @@ -0,0 +1,5 @@ +--- +title: rtp_en +--- +#RTP +Real Time Messaging Protocol (RTMP) was initially a proprietary protocol developed by Macromedia for streaming audio, video and data over the Internet, between a Flash player and a server. Macromedia is now owned by Adobe, which has released an incomplete version of the specification of the protocol for public use. Wikipedia \ No newline at end of file diff --git a/docs/wiki/rtsp_en.md b/docs/wiki/rtsp_en.md new file mode 100644 index 0000000..bed897e --- /dev/null +++ b/docs/wiki/rtsp_en.md @@ -0,0 +1,7 @@ +--- +title: rtsp_en +--- +#RTSP +The Real Time Streaming Protocol (RTSP) is a network control protocol designed for use in entertainment and communications systems to control streaming media servers. The protocol is used for establishing and controlling media sessions between end points. Clients of media servers issue VCR-style commands, such as play and pause, to facilitate real-time control of playback of media files from the server. Wikipedia + +**Datarhei Hint** ☺ ► Check out our instructions for finding your [RTSP-URL](/restreamer/wiki/findrtspurl_en.html) and test with VLC. \ No newline at end of file diff --git a/docs/wiki/rtsp_en_camerabuyersguide.md b/docs/wiki/rtsp_en_camerabuyersguide.md new file mode 100644 index 0000000..dbfd610 --- /dev/null +++ b/docs/wiki/rtsp_en_camerabuyersguide.md @@ -0,0 +1,8 @@ +--- +title: rtsp_en +--- +######[Cameras Buyers Guide](/restreamer/wiki/camerabuyersguide_en) > RTSP +#RTSP +The Real Time Streaming Protocol (RTSP) is a network control protocol designed for use in entertainment and communications systems to control streaming media servers. The protocol is used for establishing and controlling media sessions between end points. Clients of media servers issue VCR-style commands, such as play and pause, to facilitate real-time control of playback of media files from the server. Wikipedia + +**Datarhei Hint** ☺ ► Check out our instructions for finding your [RTSP-URL](/restreamer/wiki/findrtspurl_en.html) and test with VLC. \ No newline at end of file diff --git a/docs/wiki/samsung_en.md b/docs/wiki/samsung_en.md new file mode 100644 index 0000000..49a0529 --- /dev/null +++ b/docs/wiki/samsung_en.md @@ -0,0 +1,5 @@ +--- +title: samsung_en +--- +######[Basic Know How](/restreamer/wiki/basic_know_how.html) > [Camera Manufacturer](/restreamer/wiki/cameramanufacturer_en.html) > Samsung +#Samsung \ No newline at end of file diff --git a/docs/wiki/sdsl_en.md b/docs/wiki/sdsl_en.md new file mode 100644 index 0000000..bc82183 --- /dev/null +++ b/docs/wiki/sdsl_en.md @@ -0,0 +1,6 @@ +--- +title: sdsl_en +--- +######[Network](/restreamer/wiki/networktechnology_en.html) > SDSL +#SDSL +Symmetric digital subscriber line (SDSL) refers to digital subscriber line (DSL) technologies, that is, technologies for transmission of digital data over the copper wires of the telephone network where the bandwidth in the downstream direction, from the network to the subscriber, is identical to the bandwidth in the upstream direction, from the subscriber to the network. This symmetric bandwidth can be considered to be the opposite of the asymmetric bandwidth offered by asymmetric digital subscriber line (ADSL) technologies, where the upstream bandwidth is lower than the downstream bandwidth. SDSL is generally marketed at business customers, while ADSL is marketed at private as well as business customers. Wikipedia \ No newline at end of file diff --git a/docs/wiki/showpublicip_en.md b/docs/wiki/showpublicip_en.md new file mode 100644 index 0000000..133e2d8 --- /dev/null +++ b/docs/wiki/showpublicip_en.md @@ -0,0 +1,8 @@ +--- +title: showpublicip_en +--- +######[General Instructions](/restreamer/wiki/general_instructions_en.html) > Show your public IP +#Show your public IP +Visit http://www.ipchicken.com to show your public internet IP. +
+
diff --git a/docs/wiki/smspowersocket_en.md b/docs/wiki/smspowersocket_en.md new file mode 100644 index 0000000..8334ef9 --- /dev/null +++ b/docs/wiki/smspowersocket_en.md @@ -0,0 +1,11 @@ +--- +title: smspowersocket_en +--- +######[Network](/restreamer/wiki/networktechnology_en.html) > SMS Power Socket +#SMS Power Socket +Power Socket with SIM card slot. Via SMS commands can be sent to trigger actions like power cycle or ON / OFF. If an SMS sent to the device, the device responds with an SMS, and confirms the action or gives an error. +Normally this type sockets have neither a network connection or a GUI. + +Manufacturers are e.g .: +* GSM-One +* ISocket diff --git a/docs/wiki/snapshot_en.md b/docs/wiki/snapshot_en.md new file mode 100644 index 0000000..5f5e599 --- /dev/null +++ b/docs/wiki/snapshot_en.md @@ -0,0 +1,11 @@ +--- +title: snapshot_en +--- +######[Camera](/restreamer/wiki/cameratechnology_en.html) > Snapshot +#Snapshot +A snapshot is called 1 single frame from a video. If you take 1 frame the result is a photo-like image. Mostly in jpg or png format. Many camera manufacturers support the Snapshot format over a particular function (keyword: [API](/restreamer/wiki/api_en.html) over CGI. +In Screenshottet snapshots ot of videos the generated image looks sometimes spongy / blurred. + +You should always be trying to use the API function of the camera manufacturer, as the quality of the snapshot is higher. + +**Datarhei Hint ☺** ► Datarhei/Restreamer offers automatic snapshot. How this works is explained here [How2 embedd your Snapshot](/restreamer/wiki/embeddsnapshot) . \ No newline at end of file diff --git a/docs/wiki/sony_en.md b/docs/wiki/sony_en.md new file mode 100644 index 0000000..9a5933f --- /dev/null +++ b/docs/wiki/sony_en.md @@ -0,0 +1,5 @@ +--- +title: sony_en +--- +######[Basic Know How](/restreamer/wiki/basic_know_how.html) > [Camera Manufacturer](/restreamer/wiki/cameramanufacturer_en.html) > Sony +#Sony \ No newline at end of file diff --git a/docs/wiki/staticip_en.md b/docs/wiki/staticip_en.md new file mode 100644 index 0000000..22d9c1d --- /dev/null +++ b/docs/wiki/staticip_en.md @@ -0,0 +1,6 @@ +--- +title: staticip_en +--- +######[Network](/restreamer/wiki/networktechnology_en.html) > Static IP +#Static IP +An Internet Protocol address (IP address) is a numerical label assigned to each device (e.g., computer, printer) participating in a computer network that uses the Internet Protocol for communication.[1] An IP address serves two principal functions: host or network interface identification and location addressing. Its role has been characterized as follows: "A name indicates what we seek. An address indicates where it is. A route indicates how to get there. Wikipedia \ No newline at end of file diff --git a/docs/wiki/streamingserver_en.md b/docs/wiki/streamingserver_en.md new file mode 100644 index 0000000..e0cff5c --- /dev/null +++ b/docs/wiki/streamingserver_en.md @@ -0,0 +1,11 @@ +--- +title: streamingserver_en +--- +######[Basic Know How](/restreamer/wiki/basic_know_how.html) > Streamingserver +#Streamingserver +A streaming server is needed to classic streaming to operate through networks. Wikipedia + +Comparison of streaming media systems on Wikipedia. + +**Datarhei Hint** ☺ ► You need no streaming server to stream with Datarhei/Restreamer! YouTube or Ustream are offering free streaming for quite a lot of spectators. If you can stream over the Datarhei/Restreamer iFrame to your own webspace you need per viewer between 300 kb/s and 1.5 Mbit/s upload speed, depending on the subject and quality of your video streams +Example: If you for example have a VDSL line with 10 Mbit/s upload at home, you can deliver between about 10 to 30 simultaneous viewers. \ No newline at end of file diff --git a/docs/wiki/streamingservice_en.md b/docs/wiki/streamingservice_en.md new file mode 100644 index 0000000..90ba64d --- /dev/null +++ b/docs/wiki/streamingservice_en.md @@ -0,0 +1,11 @@ +--- +title: streamingservice_en +--- +######[General Instructions](/restreamer/wiki/general_instructions_en.html) > Streaming Service +#Streaming Service +Video hosting services are websites or software which allow users to distribute their video clips. Other kinds of websites such as file hosting services, image hosting services and social network services might support video sharing as an enhancement to their primary mission, but in general they are not listed here. Many services have options for private sharing and other publication options. Video hosting services can be classified into several categories, among them: user generated video sharing websites, video sharing platform / white label providers and web based video editing. Websites that are solely search engines and do not host their video content (such as Singingfish) are not included. Some services may charge a fee, but most are available for free. Some websites offer commercialization features, such as partnership programs and the ability for users to offer pay-per-view for their videos. Wikipedia + +These three are tested with Datarhei/Restreamer and work well: +* [Ustream](/restreamer/wiki/ustream_en.html) +* [YouTube](/restreamer/wiki/youtube_en.html) +* [Livestream](/restreamer/wiki/livestreamcom_en.html) \ No newline at end of file diff --git a/docs/wiki/supportdatarhei_en.md b/docs/wiki/supportdatarhei_en.md new file mode 100644 index 0000000..635b8ae --- /dev/null +++ b/docs/wiki/supportdatarhei_en.md @@ -0,0 +1,14 @@ +--- +title: supportdatarhei_en +--- +#How to support Datarhei? +The easiest way to support us is certainly to tell everyone how cool you Datarhei is! Share it about your favourite socialmedia page: Facebook, Twitter, Tumblr, G+ or whatever your want. ☺ + +A financial method of supporting us is via Social-Payment-Service Flatter Flattr this +or classic donate with Paypal . + +If you want to do a donation but do not like to use Flattr or Paypal ask us for alternatives ways like direct banc transfer or letter post. + +**Dev-Support** If you are a software developer, you can easily upload modules in GitHub and support the Datarhei. Every developer is welcome to join the project. + +**Thank you - Feels good to be loved** \ No newline at end of file diff --git a/docs/wiki/template Kopie 8.md b/docs/wiki/template Kopie 8.md new file mode 100644 index 0000000..0944ed8 --- /dev/null +++ b/docs/wiki/template Kopie 8.md @@ -0,0 +1,3 @@ +--- +title: template +--- \ No newline at end of file diff --git a/docs/wiki/template.md b/docs/wiki/template.md new file mode 100644 index 0000000..0944ed8 --- /dev/null +++ b/docs/wiki/template.md @@ -0,0 +1,3 @@ +--- +title: template +--- \ No newline at end of file diff --git a/docs/wiki/timeblock_en.md b/docs/wiki/timeblock_en.md new file mode 100644 index 0000000..5af0c18 --- /dev/null +++ b/docs/wiki/timeblock_en.md @@ -0,0 +1,8 @@ +--- +title: timeblock_en +--- +######[Camera](/restreamer/wiki/cameratechnology_en.html) > Time Block +#Time Block +The manufacturers of PTZ cameras (eg AXIS Communications) work with "Time Block". This is a protective function of the hardware to protect the pan-tilt motor from continuous movements. The hardware is for a specific time (Time) completely inhibited (blocked). ** Only Speed Dome cameras have no time block lock ** If you are using classical [PTZ](/restreamer/wiki/ptz_en.html) cameras take a look at the length of the "Time Block" use imperative to examine how long the lock and when you start. + +**Datarhei Hint ☺** ► The "Time Block" in dome cameras can be up to 60 minutes, the camera does not respond in this time. AXIS Communications Dome cameras have a 20 minute time block. \ No newline at end of file diff --git a/docs/wiki/timelapse_en.md b/docs/wiki/timelapse_en.md new file mode 100644 index 0000000..946b674 --- /dev/null +++ b/docs/wiki/timelapse_en.md @@ -0,0 +1,18 @@ +--- +title: timelapse_en +--- +######[Camera](/restreamer/wiki/cameratechnology_en.html) > Timelapse +#Timelapse +Time-lapse photography is a technique whereby the frequency at which film frames are captured (the frame rate) is much lower than that used to view the sequence. When played at normal speed, time appears to be moving faster and thus lapsing. For example, an image of a scene may be captured once every second, then played back at 30 frames per second; the result is an apparent 30 times speed increase. Time-lapse photography can be considered the opposite of high speed photography or slow motion. +Processes that would normally appear subtle to the human eye, e.g. the motion of the sun and stars in the sky, become very pronounced. Time-lapse is the extreme version of the cinematography technique of undercranking, and can be confused with stop motion animation. Wikipedia + +**Datarhei Hint ☺** ► There are two basic methods to lapse with fixed cameras produce. + +1. Increase video speed. Speed up your playback of the 24 Hour Video to produce for example a 1 minute time-lapse. Advantage: Very clean movements in fast motion. Disadvantage: Very large amounts of data need to be transferred, recorded and processed. + +2. Snapshot-Lapse - There is, for example. 24 hours long every minute 1 snapshot/frame store - these images are a video assembled (eg with FFMPEG.). Advantage: Very compact datasets, works with moving PTZ cameras if the snapshot is created in a fixed location.Disadvantage: less base material which may cause, ugly jumps. + +Time Lapse Video on YouTube +Take a look at [Hyperlapse](/restreamer/wiki/hyperlapse_en.html) + +**Datarhei Hint ☺** ► If you want to build your own timelapse with Datarhei/Restreamer you could start saving the snapshot and play with Image Magick and FFMpeg \ No newline at end of file diff --git a/docs/wiki/transportprotocol_en.md b/docs/wiki/transportprotocol_en.md new file mode 100644 index 0000000..74c2aac --- /dev/null +++ b/docs/wiki/transportprotocol_en.md @@ -0,0 +1,19 @@ +--- +title: transportprotocol_en +--- +######[Basic Know How](/restreamer/wiki/basic_know_how.html) > Transportprotocol +#Transportprotocol +The Internet consists of a variety of different protocols, so that eg. Server can communicate with websites, browser together. For video, there are special transport connection protocols that are used. + +Here the most important protocols: +* [RTSP](/restreamer/wiki/rtsp_en.html) +* [RTMP](/restreamer/wiki/rtmp_en.html) +* [RTP](/restreamer/wiki/rtp_en.html) +* [HLS HTTP](/restreamer/wiki/hlshttp_en.html) +* [MPEG-DASH](/restreamer/wiki/mpegdash_en.html) + +**Datarhei Hint** ☺ ► For the operation of a network camera with Datarhei RTSP is necessary as a video source. RTSP supply in most network cameras. Note also our [Camera Buyers Guide](/restreamer/wiki/camerabuyersguide_en.html) + +**Datarhei Hint** ☺ ► HLS streaming is required for iOS devices and Safari browser. This is supported by the JW player delivered by Datarhei engine. + + \ No newline at end of file diff --git a/docs/wiki/upload_en.md b/docs/wiki/upload_en.md new file mode 100644 index 0000000..46da542 --- /dev/null +++ b/docs/wiki/upload_en.md @@ -0,0 +1,8 @@ +--- +title: upload_en +--- +######[Network](/restreamer/wiki/networktechnology_en.html) > Upload +#Upload +When "Upload" is referred in connection with Internet connections is nothing more than the speed at which you can send information to the Internet. The following applies: The higher the upload speed, the higher the amount of data that can be sent per second. + +**Datarhei Hint** ☺ ► Uploading is very important for live streaming with Datarhei. **Get yourself as much upload as possible to serve as many visitors as possible with your live stream!** \ No newline at end of file diff --git a/docs/wiki/usbcamera_en.md b/docs/wiki/usbcamera_en.md new file mode 100644 index 0000000..a8f99f0 --- /dev/null +++ b/docs/wiki/usbcamera_en.md @@ -0,0 +1,7 @@ +--- +title: usbcamera_en +--- +######[Network](/restreamer/wiki/networktechnology_en.html) > USB-Video-Device +#USB-Video-Device +The USB video device class (also USB video class or UVC) is a USB device class that describes devices capable of streaming video like webcams, digital camcorders, transcoders, analog video converters and still-image cameras. +The latest revision of the USB video class specification carries the version number 1.5 and was defined by the USB Implementers Forum in a set of documents describing both the basic protocol and the different payload formats. Wikipedia \ No newline at end of file diff --git a/docs/wiki/ustream_en.md b/docs/wiki/ustream_en.md new file mode 100644 index 0000000..c812d0f --- /dev/null +++ b/docs/wiki/ustream_en.md @@ -0,0 +1,7 @@ +--- +title: ustream_en +--- +#Ustream +Ustream is a company founded in 2007 that provides video streaming services to more than 80 million viewers and broadcasters. It is based in San Francisco and has more than 180 employees in their San Francisco, Los Angeles, and Budapest offices. Company partners include Panasonic, Samsung, Logitech, CBS News, PBS NewsHour, Viacom, and IMG Media. Wikipedia + +**Datarhei Hint** ☺ ► Ustream offers advertising-financed Free Live Streaming, which can be used easily and quickly with Datarhei/Restreamer. Note our short [Tutorial](/restreamer/wiki/livestreamingustream_en.html). \ No newline at end of file diff --git a/docs/wiki/vdsl_en.md b/docs/wiki/vdsl_en.md new file mode 100644 index 0000000..540b3cb --- /dev/null +++ b/docs/wiki/vdsl_en.md @@ -0,0 +1,8 @@ +--- +title: vdsl_en +--- +######[Network](/restreamer/wiki/networktechnology_en.html) > VDSL +#VDSL +Very-high-bit-rate digital subscriber line (VDSL or VHDSL)[1] is a digital subscriber line (DSL) technology providing data transmission faster than asymmetric digital subscriber line (ADSL) over a single flat untwisted or twisted pair of copper wires (up to 52 Mbit/s downstream and 16 Mbit/s upstream),[2] and on coaxial cable (up to 85 Mbit/s down- and upstream)[3] using the frequency band from 25 kHz to 12 MHz.[4] These rates mean that VDSL is capable of supporting applications such as high-definition television, as well as telephone services (voice over IP) and general Internet access, over a single connection. VDSL is deployed over existing wiring used for analog telephone service and lower-speed DSL connections. Wikipedia + +**Datarhei Hint ☺** ► **If you can get VDSL - Take it!** It is currently the most cost-effective method to produce a live stream. 10-50 Mbit/s Upload are payable fair price for anyone! \ No newline at end of file diff --git a/docs/wiki/video4linux_en.md b/docs/wiki/video4linux_en.md new file mode 100644 index 0000000..c5682e8 --- /dev/null +++ b/docs/wiki/video4linux_en.md @@ -0,0 +1,6 @@ +--- +title: video4linux_en +--- +######[Basic Know How](/restreamer/wiki/basic_know_how.html) > [Videosoftware](/restreamer/wiki/videosoftware_en.html) > Video4Linux +#Video4Linux +Video4Linux or V4L is a video capture and output device API and driver framework for the Linux kernel, supporting many USB webcams, TV tuners, and other devices. Video4Linux is closely integrated with the Linux kernel. Video4Linux was named after Video for Windows (which is sometimes abbreviated "V4W"), but is not technically related to it. Wikipedia \ No newline at end of file diff --git a/docs/wiki/videocompression_en.md b/docs/wiki/videocompression_en.md new file mode 100644 index 0000000..03a6791 --- /dev/null +++ b/docs/wiki/videocompression_en.md @@ -0,0 +1,41 @@ +--- +title: videocompression_en +--- +######[Camera](/restreamer/wiki/cameratechnology_en.html) > Videocompression +#Videocompression +Imagine a green meadow against a cloudless blue sky. On this meadow is a cow and moves. If the cow is moving quite simply transfer the image of the cow often. Meadow and sky do not change so often in the frames and so data can be saved. Very simple principle. + +This means that if a lot of moving objects or even large areas of water in the picture are often requires high bandwidth. Even at night, it can lead to increased bandwidth, but this usually is not further bad, as night due to lack of light is nothing to see and the least viewers are awake at night! + +**What can cause more bandwidth?** +Large water surfaces, sea, lakes, rivers +Trees with many leaves +Large crowds +Busy streets +Night pictures + +**Datarhei Hint** ☺ ► These are empirical values from 10 years live streaming, it can always happen anyway that a stream much more or less uplaod needed (usually more!). + +**Scenarios** +Rooftops / Still Life / No Movment - less bandwidth +Scenics - less bandwidth +Street - more bandwidth +Beach / sea - a lot of bandwidth +Night - a lot of bandwidth +River / Water - a lot of bandwidth + +**Rule of thumb for bandwidth in these scenarios (all upload speed): Static Camera 720p:** +Rooftops 720p → 100 Kbit/s to 1 Mbit/s +Scenics 720p → 0.5 Kbit/s - 1.2 Mbit/s +Street 720p → from 0.5 Kbit/s - 2 Mbit/s +Beach / Sea → from 2-3 Mbit/s +Night from 2-3 Mbit/s +River → from 1.5 - 2 Mbit/s +Event → 0.5 kbit/s -3 Mbit/s + +**At 450 p or 420p you have about 1/2 less data volume - expected 2-4 times more data volume at 1080p. ** + +**Datarhei Hint** ☺ ► Rule of thumb is to have at least 1 Mbit/s upload available for a static network camera with 720p Stream. 1080p playing in live streaming currently no major role since the audience side is often (even on mobile devices via mobile network) to cope with the high bandwidths. For PTZ cameras, we recommend you at least. 1-2 Mbit/s upload to have available. + +For the more interested of you information on +Wikipedia \ No newline at end of file diff --git a/docs/wiki/videoplayer_en.md b/docs/wiki/videoplayer_en.md new file mode 100644 index 0000000..fa0e61a --- /dev/null +++ b/docs/wiki/videoplayer_en.md @@ -0,0 +1,15 @@ +--- +title: videoplayer_en +--- +######[Basic Know How](/restreamer/wiki/basic_know_how.html) > Videoplayer +#Videoplayer +To play a video you will need a media player. Most people know VLC, QuickTime or Windows Media Player from their daily lives from their local computer or mobile device. To play a video on the Internet browser, we needed a web video player. Free players are also available on the Internet. Great players with professional backgrounds are FlowPlayer and the JW Player. + +Approaches of Firefox or Google Chrome with HTML5 video work without player directly in your browser via the HTML video tag. However, only with OGG (Firefox) or WebM (Google Chrome) and are not suitable for live streaming. + +Dive deeper on Wikipedia. +VLC Wikipedia +MPlayer Wikipedia + +The Datarhei/Restreamer GUI provides you the JW Player for your website. It can be used free for private purposes. + diff --git a/docs/wiki/videoresolution_en.md b/docs/wiki/videoresolution_en.md new file mode 100644 index 0000000..5c6eb90 --- /dev/null +++ b/docs/wiki/videoresolution_en.md @@ -0,0 +1,8 @@ +--- +title: videoresolution_en +--- +######[Camera](/restreamer/wiki/cameratechnology_en.html) > Videoresolution +#Videoresolution +The display resolution or display modes of a digital television, computer monitor or display device is the number of distinct pixels in each dimension that can be displayed. It can be an ambiguous term especially as the displayed resolution is controlled by different factors in cathode ray tube (CRT), flat-panel display which includes liquid-crystal displays, or projection displays using fixed picture-element (pixel) arrays. Wikipedia + +**Datarhei Hint ☺** ► The Video resolution refers to the aspect ratio of the video. eg. Full HD 1080p = 1920 × 1080 pixels; 720p = 1280x720 pixels; 450p = 800x450 pixels. You should definitely pay attention on it. Do not change the video ratio when embedding the Datarhei player von your website. **Always change percentage!** Otherwise the image is warped. \ No newline at end of file diff --git a/docs/wiki/videoresolution_en_generalinstructions.md b/docs/wiki/videoresolution_en_generalinstructions.md new file mode 100644 index 0000000..52e2d95 --- /dev/null +++ b/docs/wiki/videoresolution_en_generalinstructions.md @@ -0,0 +1,8 @@ +--- +title: videoresolution_en +--- +######[General Instructions](/restreamer/wiki/general_instructions_en.html) > Videoresolution +#Videoresolution +The display resolution or display modes of a digital television, computer monitor or display device is the number of distinct pixels in each dimension that can be displayed. It can be an ambiguous term especially as the displayed resolution is controlled by different factors in cathode ray tube (CRT), flat-panel display which includes liquid-crystal displays, or projection displays using fixed picture-element (pixel) arrays. Wikipedia + +**Datarhei Hint ☺** ► The Video resolution refers to the aspect ratio of the video. eg. Full HD 1080p = 1920 × 1080 pixels; 720p = 1280x720 pixels; 450p = 800x450 pixels. You should definitely pay attention on it. Do not change the video ratio when embedding the Datarhei player von your website. **Always change percentage!** Otherwise the image is warped. \ No newline at end of file diff --git a/docs/wiki/videosoftware_en.md b/docs/wiki/videosoftware_en.md new file mode 100644 index 0000000..4f1404f --- /dev/null +++ b/docs/wiki/videosoftware_en.md @@ -0,0 +1,31 @@ +--- +title: videosoftware_en +--- +######[Basic Know How](/restreamer/wiki/basic_know_how.html) > Videosoftware +#Videosoftware +To process video content or images some established programs on the Internet are freely available. Here most important. + + +#####Video and Picturemanipulation +* Swiss Army Knife for Video [FFmpeg](/restreamer/wiki/ffmpeg_en.html) +* Swiss Army Knife for Picture [Image Magick](/restreamer/wiki/imagemagick_en.html) +* Swiss Army Knife for Panorama [Hugin](/restreamer/wiki/hugin_en.html) +* Swiss Army Knife for Swiss Army Knifes [API](/restreamer/wiki/api_en.html) + +##### Security Surveillance CCTV +* [Zoneminder](/restreamer/wiki/zoneminder_en.html) +* [KMotion](/restreamer/wiki/kmotion_en.html) + +##### Video-Editing +* Video Editing with Openshot.org + +##### Driver and Misc +* [Motion](/restreamer/wiki/motion_en.html) +* [Video 4 Linux](/restreamer/wiki/video4linux_en.html) +* [Linux UVC](/restreamer/wiki/linuxuvc_en.html) +* Image processing with gimp.org +* List of free television software on Wikipedia +* OpenWRT (dev in progress) +* FHEM (dev in progress) + +**Datarhei Hint** ☺ ► All programs running in the background of Datarhei/Restreamer. As a typical user you do not have contact with these tools. If you want to start playing around you find very good tutorials, communitys and documentation to all of this tools. Software developers get informations very easy to start developing their own tools. \ No newline at end of file diff --git a/docs/wiki/videosurveillance_en.md b/docs/wiki/videosurveillance_en.md new file mode 100644 index 0000000..12a7626 --- /dev/null +++ b/docs/wiki/videosurveillance_en.md @@ -0,0 +1,8 @@ +--- +title: videosurveillance_en +--- +######[Basic Know How](/restreamer/wiki/basic_know_how.html) > Surveillance (CCTV) +#Surveillance (CCTV) +Closed-circuit television (CCTV), also known as video surveillance, is the use of video cameras to transmit a signal to a specific place, on a limited set of monitors. It differs from broadcast television in that the signal is not openly transmitted, though it may employ point to point (P2P), point to multipoint, or mesh wireless links. Though almost all video cameras fit this definition, the term is most often applied to those used for surveillance in areas that may need monitoring such as banks, casinos, airports, military installations, and convenience stores. Videotelephony is seldom called "CCTV" but the use of video in distance education, where it is an important tool, is often so called. Wikipedia + +The use of Zoneminder and/or Motion or the GUI KMotion should be possible with Datarhei/Restreamer as a surveillance streamer. Had no test so far. Take a look at: [Motion und KMotion](/restreamer/wiki/surveillancecctv.html) \ No newline at end of file diff --git a/docs/wiki/webcamgalore_en.md b/docs/wiki/webcamgalore_en.md new file mode 100644 index 0000000..b7ace42 --- /dev/null +++ b/docs/wiki/webcamgalore_en.md @@ -0,0 +1,4 @@ +--- +title: webcamgalore_en +--- +#Webcamgalore \ No newline at end of file diff --git a/docs/wiki/webcamportals_en.md b/docs/wiki/webcamportals_en.md new file mode 100644 index 0000000..88f940b --- /dev/null +++ b/docs/wiki/webcamportals_en.md @@ -0,0 +1,15 @@ +--- +title: webcamportals_en +--- +######[Basic Know How](/restreamer/wiki/basic_know_how.html) > > Webcam Portals +#Webcam Portals +Webcam portals are a nice way to provide a live stream a larger audience with higher user-ranges as your own website can do it. You have to get most register and log in your camera or write to the operator of the portal, and you will be helped in. The operator of the portals market for you the camera for free and finance your service about advertising. The well-kept, beautiful and high-traffic portals are very manageable. + +* [webcams.travel](/restreamer/wiki/webcamstravel_en.html) +* [lookr.com](/restreamer/wiki/lookr_en.html) +* [panoramablick.com](/restreamer/wiki/panoramablick_en.html) +* [globocam.de](/restreamer/wiki/globocam_en.html) +* [webcamgalore.com](/restreamer/wiki/webcamgalore_en.html) +* [earthcam.com](/restreamer/wiki/earthcam_en.html) +* [wetter.com](/restreamer/wiki/wettercom_en.html) +* [[wetteronline.de](/restreamer/wiki/wetteronlinede_en) \ No newline at end of file diff --git a/docs/wiki/webcamstravel_en.md b/docs/wiki/webcamstravel_en.md new file mode 100644 index 0000000..e2750fc --- /dev/null +++ b/docs/wiki/webcamstravel_en.md @@ -0,0 +1,4 @@ +--- +title: webcamstravel_en +--- +#Webcams.travel \ No newline at end of file diff --git a/docs/wiki/webhosting_en.md b/docs/wiki/webhosting_en.md new file mode 100644 index 0000000..4494a21 --- /dev/null +++ b/docs/wiki/webhosting_en.md @@ -0,0 +1,8 @@ +--- +title: webhosting_en +--- +######[Network](/restreamer/wiki/networktechnology_en.html) > Webhosting +#Webhosting +A web hosting service is a type of Internet hosting service that allows individuals and organizations to make their website accessible via the World Wide Web. Web hosts are companies that provide space on a server owned or leased for use by clients, as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for other servers located in their data center, called colocation, also known as Housing in Latin America or France. Wikipedia + +**Datarhei Hint** ☺ ► In order to provide your Data Rhei embedded code (iFrame) your audience you need your own webspace (or at least a web server) where you can put HTML files. \ No newline at end of file diff --git a/docs/wiki/wettercom_en.md b/docs/wiki/wettercom_en.md new file mode 100644 index 0000000..5269f35 --- /dev/null +++ b/docs/wiki/wettercom_en.md @@ -0,0 +1,4 @@ +--- +title: wettercom_en +--- +#wetter.com \ No newline at end of file diff --git a/docs/wiki/wetteronlinede_en.md b/docs/wiki/wetteronlinede_en.md new file mode 100644 index 0000000..9636cd8 --- /dev/null +++ b/docs/wiki/wetteronlinede_en.md @@ -0,0 +1,4 @@ +--- +title: wetteronlinede_en +--- +#Wetteronine.de \ No newline at end of file diff --git a/docs/wiki/youtube_en.md b/docs/wiki/youtube_en.md new file mode 100644 index 0000000..5ada40f --- /dev/null +++ b/docs/wiki/youtube_en.md @@ -0,0 +1,9 @@ +--- +title: youtube_en +--- +#YouTube.com +Everyone should know: https://www.youtube.com. If not (!): Wikipedia + +A good start into livestreaming with YouTube is this page: https://support.google.com/youtube/answer/2474026?hl=en + +**Datarhei Hint** ☺ ► YouTube has in most countries around the world also free live streaming, which can be used easily and free with Datarhei. Take a look at our short tutorial in this wiki. [Instruction for Youtube Livestreaming](/restreamer/wiki/ivestreamingyoutube_en.html). \ No newline at end of file diff --git a/docs/wiki/zoneminder_en.md b/docs/wiki/zoneminder_en.md new file mode 100644 index 0000000..31f924d --- /dev/null +++ b/docs/wiki/zoneminder_en.md @@ -0,0 +1,6 @@ +--- +title: zoneminder_en +--- +######[Basic Know How](/restreamer/wiki/basic_know_how.html) > [Videosoftware](/restreamer/wiki/videosoftware_en.html) > Zoneminder +#Zoneminder +ZoneMinder is a free, open source Closed-circuit television software application developed for Linux. It is released under the terms of the GNU General Public License (GPL). Wikipedia \ No newline at end of file diff --git a/gruntfile.js b/gruntfile.js new file mode 100644 index 0000000..86d29fb --- /dev/null +++ b/gruntfile.js @@ -0,0 +1,182 @@ +'use strict'; + +module.exports = function(grunt) { + // files for this project + var files = { + compiledFrontendJS: ['bin/webserver/public/scripts/**/*.js', 'bin/executors/**/gui/js/*.js'], + es6Src: ['**/*.js'], + stylesheets: ['static/webserver/public/css/*.css'] + }; + // find all node modules + var modules = []; + var pck = require('./package.json') + if (!!pck.dependencies) { + modules = Object.keys(pck.dependencies) + .filter(function (m) { + return m != 'nodewebkit' + }) + .map(function (m) { + return './node_modules/' + m + '/**/*' + }); + } + // Project Configuration + grunt.initConfig({ + watch: { + scripts: { + files: ['src/**/*.js'], + tasks: ['loadConfig','babel', 'minifyFrontendFiles'], + options: { + interrupt: true, + livereload: { + host: 'localhost', + port: 5000 + } + } + }, + statics: { + files: ['static/**/*.html'], + tasks: ['loadConfig','shell:copyStatics'], + options: { + interrupt: true, + livereload: { + host: 'localhost', + port: 5000 + } + } + } + }, + shell: { + start: { + command: 'npm start' + }, + removeOldBinFolder: { + command: 'rm -Rf bin/' + }, + createBinFolder: { + command: 'mkdir bin/' + }, + copyStatics: { + command: 'cp -R static/* bin' + }, + bower: { + command: 'bower install --allow-root' + }, + //temp workaround - https://github.com/clappr/clappr/issues/709 + clappr: { + command: 'git clone https://github.com/clappr/clappr.git bin/webserver/public/libs/clappr' + } + }, + babel: { + options: { + sourceMap: true, + presets: ['es2015'] + }, + all: { + files: [ + { + expand: true, + cwd: 'src/', + src:'<%= es6Src %>', + dest: 'bin/' + } + ] + } + }, + pkg: grunt.file.readJSON('package.json'), + jshint: { + all: { + src: [ + 'src/*.js', + 'src/classes/*.js', + 'src/webserver/*.js', + 'src/webserver/**/*.js', + 'src/webserver/**/**/*.js', + 'src/webserver/**/**/**/*.js' + ], + options: { + jshintrc: '.jshintrc' + } + } + }, + csslint: { + options: { + csslintrc: '.csslintrc' + }, + all: { + src: ['static/webserver/public/css/*.css'] + } + }, + uglify: { + production: { + options: { + mangle: true + }, + files: { + 'bin/webserver/public/dist/application.min.js': 'bin/webserver/public/dist/application.js' + } + } + }, + cssmin: { + combine: { + files: { + 'bin/webserver/public/css/restreamer.min.css': '<%= stylesheets %>' + } + } + }, + ngAnnotate: { + production: { + files: { + 'bin/webserver/public/dist/application.js': '<%= compiledFrontendJS %>' + } + } + }, + env: { + test: { + NODE_ENV: 'test' + }, + secure: { + NODE_ENV: 'secure' + } + } + }); + + // Load NPM tasks + require('load-grunt-tasks')(grunt); + grunt.task.registerTask('loadConfig', 'Task that loads the config into a grunt option.', function() { + grunt.config.set('es6Src', files.es6Src); + grunt.config.set('compiledFrontendJS', files.compiledFrontendJS); + grunt.config.set('stylesheets', files.stylesheets); + }); + grunt.loadNpmTasks('grunt-shell'); + grunt.loadNpmTasks('grunt-contrib-copy') + grunt.loadNpmTasks('grunt-contrib-jshint'); + grunt.loadNpmTasks('grunt-contrib-watch'); + + /* + Helper tasks to keep overview + */ + //css lint + grunt.registerTask('lint', ['csslint', 'jshint']); + //clear old bin folder and create new one + grunt.registerTask('clearOldBuild', ['shell:removeOldBinFolder', 'shell:createBinFolder']); + //install frontendlibraries (atm through bower) + grunt.registerTask('installFrontendLibraries', ['shell:bower', 'shell:clappr']); + //minify the frontend files + grunt.registerTask('minifyFrontendFiles', ['cssmin', 'ngAnnotate', 'uglify']); + + /* + Build Tasks + */ + grunt.registerTask('build', ['loadConfig','clearOldBuild', 'shell:copyStatics', 'babel', 'minifyFrontendFiles', 'installFrontendLibraries']); + grunt.registerTask('build-code', ['loadConfig', 'shell:copyStatics', 'babel', 'minifyFrontendFiles']); + + /* + Run Tasks + */ + //run current build in /bin + grunt.registerTask('run', ['shell:start']); + //rebuild and run + grunt.registerTask('run-clean', ['build', 'run']); + //update code and run + grunt.registerTask("run-update-code", ['loadConfig','babel','shell:copyStatics', 'minifyFrontendFiles', 'run']) +}; diff --git a/package.json b/package.json new file mode 100644 index 0000000..7a495fc --- /dev/null +++ b/package.json @@ -0,0 +1,61 @@ +{ + "name": "ReStreamer", + "version": "0.1.0-RC1", + "description": "simple re-streaming solution for network-cameras", + "author": "datarhei.org", + "license": "Apache-2.0", + "scripts": { + "start": "node ./bin/start" + }, + "dependencies": { + "app-root-path": "1.0.0", + "async": "~1.5.0", + "body-parser": "1.14.2", + "bytes": "^2.1.0", + "colors": "^1.1.2", + "compression": "~1.6.0", + "connect-flash": "^0.1.1", + "cookie-parser": "1.4.0", + "debug": "2.2.0", + "dockerode": "2.2.7", + "ejs": "2.3.4", + "exec": "^0.2.1", + "express": "4.13.3", + "express-session": "^1.12.1", + "fluent-ffmpeg": "git://github.com/christophjohannsdotter/node-fluent-ffmpeg#master", + "i18n": "0.5.0", + "jsonschema": "^1.0.2", + "moment-timezone": "^0.4.1", + "morgan": "1.6.1", + "node-json-db": "^0.5.1", + "passport": "^0.3.2", + "passport-local": "^1.0.0", + "q": "1.4.1", + "q-io": "~1.13.1", + "request": "2.67.0", + "sequent": "0.1.2", + "serve-favicon": "2.3.0", + "shortid": "2.2.4", + "socket.io": "1.3.7" + }, + "devDependencies": { + "babel-preset-es2015": "^6.1.2", + "chai": "^3.3.0", + "grunt": "^0.4.5", + "grunt-babel": "^6.0.0", + "grunt-concurrent": "~2.1.0", + "grunt-contrib-copy": "0.8", + "grunt-contrib-csslint": "^0.5.0", + "grunt-contrib-cssmin": "~0.14.0", + "grunt-contrib-jshint": "~0.11.3", + "grunt-contrib-uglify": "~0.11.0", + "grunt-contrib-watch": "^0.6.1", + "grunt-env": "~0.4.1", + "grunt-ng-annotate": "~1.0.1", + "grunt-nodemon": "~0.4.1", + "grunt-nw-builder": "^2.0.0", + "grunt-shell": "^1.1.2", + "jshint-stylish": "^2.0.0", + "load-grunt-tasks": "~3.3.0" + } +} diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..a98a03d --- /dev/null +++ b/run.sh @@ -0,0 +1,12 @@ +#!/bin/bash +cpu=$(uname -m | cut -c 1-3) +if [ "${MODE}" == "RASPICAM" ] && [ "$cpu" == "arm" ]; +then + echo "/opt/vc/lib" > /etc/ld.so.conf.d/00-vmcs.conf + ldconfig + npm start & + sleep 20 + /opt/vc/bin/raspivid -t 0 -w 1280 -h 720 -fps 25 -b 500000 -o - | ffmpeg -i - -c copy -f flv rtmp://127.0.0.1:1935/live/raspicam.stream +else + npm start +fi diff --git a/src/classes/EnvVar.js b/src/classes/EnvVar.js new file mode 100644 index 0000000..030d394 --- /dev/null +++ b/src/classes/EnvVar.js @@ -0,0 +1,20 @@ +/* + * @name ReStreamer + * @namespace https://github.com/datarhei/restreamer + * @copyright 2015 datarhei.org + * @license Apache-2.0 + */ + +'use strict'; +/** + * Class representing a environment variable with default values + */ +class EnvVar { + constructor(name, required, defaultValue, description) { + this.name = name; + this.required = required; + this.defaultValue = defaultValue; + this.description = description; + } +} +module.exports = EnvVar; diff --git a/src/classes/Logger.js b/src/classes/Logger.js new file mode 100644 index 0000000..df892d7 --- /dev/null +++ b/src/classes/Logger.js @@ -0,0 +1,159 @@ +/* + * @name ReStreamer + * @namespace https://github.com/datarhei/restreamer + * @copyright 2015 datarhei.org + * @license Apache-2.0 + */ + +'use strict'; + +/* +Requirements + */ +const moment = require("moment-timezone"); +require("colors"); + +/* +global vars + */ +const LEVEL_ERROR = 1; +const LEVEL_WARN = 2; +const LEVEL_INFO = 3; +const LEVEL_DEBUG = 4; + +//set default timezone +process.env.TIMEZONE = process.env.TIMEZONE ? process.env.TIMEZONE : "Europe/Berlin"; + +/** + * Class representing a logger + */ +class Logger { + + /** + * check if the logger is muted + * @returns {boolean} + */ + static isMuted() { + return !!process.env.LOGGER_MUTED; + } + + /** + * construct a logger object + * @param {string} context context of the log message (classname.methodname) + */ + constructor(context) { + this.context = context; + } + + /** + * print a message to stdout + * @param {string} message + * @param {string} context + * @param {string} type + * @param {string} color + */ + stdout(message, context, type, color) { + if (Logger.isMuted()) { + return; + } + if (context === false){ + context = ""; + }else{ + context = "(" + context + ")"; + } + var str = "[" + (moment().tz(process.env.TIMEZONE).format('DD-MM-YYYY HH:mm:ss.SSS')) + "] [" + type + "] " + message + " " + context; + if (process.env.LOGGER_LEVEL === '4') { + console.log(str[color]); + } else { + console.log(str); + } + } + + /** + * print an info message if LOG_LEVEL >= LEVEL_INFO + * @param {string} message + * @param {string} context + */ + info(message, context, alertGui) { + if (typeof context === 'undefined') { + context = this.context; + } + if (typeof alertGui === 'undefined') { + alertGui = false; + } + if (process.env.LOGGER_LEVEL >= LEVEL_INFO) { + return this.stdout(message, context, "INFO", "blue"); + } + if (alertGui){ + //todo: if alertGui is activated on frontend and websocketcontroller, insert emit here + } + } + + /** + * print a warning message if LOG_LEVEL >= LEVEL_WARN + * @param {string} message + * @param {string} context + */ + warn(message, context, alertGui) { + if (typeof context === 'undefined') { + context = this.context; + } + if (typeof alertGui === 'undefined') { + alertGui = false; + } + if (process.env.LOGGER_LEVEL >= LEVEL_WARN) { + return this.stdout(message, context, "WARN", "orange"); + } + if (alertGui){ + //todo: if alertGui is activated on frontend and websocketcontroller, insert emit here + } + } + + /** + * print a debug message if LOG_LEVEL >= LEVEL_DEBUG + * @param {string} message + * @param {string} context + */ + debug(message, context, alertGui) { + if (typeof context === 'undefined') { + context = this.context; + } + if (typeof alertGui === 'undefined') { + alertGui = false; + } + if (process.env.LOGGER_LEVEL >= LEVEL_DEBUG) { + return this.stdout(message, context, "DEBUG", "yellow"); + } + if (alertGui){ + //todo: if alertGui is activated on frontend and websocketcontroller, insert emit here + } + } + + /** + * print a debug message if LOG_LEVEL >= LEVEL_ERROR + * sends a string to + * @param {string} message + * @param {string} context + */ + error(message, context, alertGui) { + if (typeof context === 'undefined') { + context = this.context; + } + if (typeof alertGui === 'undefined') { + alertGui = false; + } + if (process.env.LOGGER_LEVEL >= LEVEL_ERROR) { + return this.stdout(message, context, "ERROR", "red"); + } + if (alertGui){ + //todo: if alertGui is activated on frontend and websocketcontroller, insert emit here + } + } +} + +Logger.LEVEL_ERROR = LEVEL_ERROR; +Logger.LEVEL_WARN = LEVEL_WARN; +Logger.LEVEL_INFO = LEVEL_INFO; +Logger.LEVEL_DEBUG = LEVEL_DEBUG; + +module.exports = Logger; diff --git a/src/classes/ReStreamer.js b/src/classes/ReStreamer.js new file mode 100644 index 0000000..0ef89d7 --- /dev/null +++ b/src/classes/ReStreamer.js @@ -0,0 +1,412 @@ +/* + * @name ReStreamer + * @namespace https://github.com/datarhei/restreamer + * @copyright 2015 datarhei.org + * @license Apache-2.0 + */ + +const config = require("../../conf/live.json"); +const Logger = require("./Logger"); +const logger = new Logger("ReStreamer"); +const WebsocketsController = require("./WebsocketController"); +const FfmpegCommand = require('fluent-ffmpeg'); +const Q = require("q"); + +/** + * class ReStreamer creates and manages streams through ffmpeg + */ +class ReStreamer{ + + /** + * generate output rtmp-path from config-file + * @returns {string} + */ + static generateOutputRTMPPath (){ + var nginx = config.nginx.streaming; + return "rtmp://" + nginx.ip + ":" + nginx.rtmp_port + nginx.rtmp_path + "live.stream"; + } + + /** + * generate output hls-path from config-file + * @returns {string} + */ + static generateOutputHLSPath (){ + var nginx = config.nginx.streaming; + return "rtmp://" + nginx.ip + ":" + nginx.rtmp_port + nginx.hls_path + "live.stream"; + } + + /** + * generate output snapshot-path from config-file + * @returns {string} + */ + static generateSnapshotPath (){ + const path = require("path"); + return path.join(__dirname, "..", "webserver", "public", "images", "live.jpg"); + } + + /** + * receive snapshot by using first frame of repeated video + */ + static fetchSnapshot(firstSnapshot){ + if (ReStreamer.data.states.repeatToLocalNginx.type === 'connected' || firstSnapshot){ + logger.debug("updating snapshot"); + var command = new FfmpegCommand(ReStreamer.generateOutputRTMPPath()); + command.output(ReStreamer.generateSnapshotPath()); + command.outputOption(config.ffmpeg.options.snapshot); + command.on('error', (error)=> { + logger.error("Error on fetching snapshot: " + error.toString()); + }); + command.on("end", () =>{ + logger.info("updated snapshot"); + Q.delay(process.env.SNAPSHOT_REFRESH_INTERVAL).then(function(){ + ReStreamer.fetchSnapshot(false); + }); + }); + command.exec(); + } + } + + /** + * stop stream + */ + static stopStream(processName){ + logger.info("stopStream " + processName); + ReStreamer.updateState(processName, "stopped"); + var processHasBeenSpawned = typeof ReStreamer.data.processes[processName].kill === 'function'; + if(processHasBeenSpawned){ + ReStreamer.data.processes[processName].kill(); + ReStreamer.data.processes[processName] = { + state: "not_connected" + }; + } + } + + /** + * restore the ffmpeg processes from jsondb (called on app start to restore ffmpeg processes + * after the applicatoin has been killed or stuff + */ + static restoreFFMpegProcesses(){ + var JsonDB = require("node-json-db"); + var db = new JsonDB(config.jsondb, true, false); + try { + ReStreamer.data.addresses = db.getData("/addresses"); + ReStreamer.data.states = db.getData("/states"); + ReStreamer.data.userActions = db.getData("/userActions"); + //check if the srcAddress has been repeated to Local Nginx + var repeatToLocalNginxIsConnected = ReStreamer.data.states.repeatToLocalNginx.type === 'connected'; + var repeatToLocalNginxIsConnecting = ReStreamer.data.states.repeatToLocalNginx.type === 'connecting'; + var repeatToOptionalOutputIsConnected = ReStreamer.data.states.repeatToOptionalOutput.type === 'connected'; + var repeatToOptionalOutputIsConnecting = ReStreamer.data.states.repeatToOptionalOutput.type === 'connecting'; + if (ReStreamer.data.addresses.srcAddress && (!!repeatToLocalNginxIsConnected || !!repeatToLocalNginxIsConnecting)) { + ReStreamer.startStream(ReStreamer.data.addresses.srcAddress, "repeatToLocalNginx"); + } + if (ReStreamer.data.addresses.optionalOutputAddress && (!!repeatToOptionalOutputIsConnected || !!repeatToOptionalOutputIsConnecting)) { + ReStreamer.startStream(ReStreamer.data.addresses.srcAddress, "repeatToOptionalOutput", ReStreamer.data.addresses.optionalOutputAddress); + } + } + catch(error){ + logger.error("error restoring ffmpeg process: " + error); + } + } + + /** + * write JSON file for persistency + */ + static writeToDB(){ + var JsonDB = require("node-json-db"); + var db = new JsonDB(config.jsondb, true, false); + db.push("/", ReStreamer.extractDataOfStreams()); + } + + /** + * send websocket event to GUI to update the state of the streams + */ + static updateStreamDataOnGui(){ + WebsocketsController.emitToNamespace("/", "updateStreamData", ReStreamer.extractDataOfStreams()); + } + + /** + * send websocket event to GUI to update the state of the streams + */ + static updateProgressOnGui(){ + WebsocketsController.emitToNamespace("/", "updateProgress", ReStreamer.data.progresses); + } + + /** + * add output to ffmpeg command + * @param {FfmpegCommand} ffmpegCommand + * @param {string} outputAddress + * @return {Promise} + */ + static addOutput(ffmpegCommand, outputAddress){ + ffmpegCommand.output(outputAddress); + return ReStreamer.appendOutputOptionFromConfig(ffmpegCommand); + } + + /** + * append the ffmpeg options of the config file to an output + * @param {FfmpegCommand} ffmpegCommand + * @return {Promise} + */ + static appendOutputOptionFromConfig(ffmpegCommand){ + var deferred = Q.defer(); + ffmpegCommand.ffprobe(function(err, data) { + if (err){ + return deferred.reject(err); + }else{ + var ffmpegOptions; + if(data.streams.length > 1) { + ffmpegOptions = config.ffmpeg.options.native_h264; + logger.debug("Selected ffmpeg.option: native_h264"); + }else{ + ffmpegOptions = config.ffmpeg.options.native_h264_soundless_aac; + logger.debug("Selected ffmpeg.option: native_h264_soundless_aac"); + } + for (let option of ffmpegOptions){ + ffmpegCommand.outputOption(option); + } + return deferred.resolve(); + } + }); + return deferred.promise; + } + + /** + * + * @param {string} processName + * @param {string} state + * @param {string} message + */ + static updateState(processName, state, message){ + logger.debug("Update state of '" + processName + "' from state '" + ReStreamer.data.states[processName].type + "' to state '" + state + "'"); + ReStreamer.data.states[processName] = { + type: state, + message: message + }; + ReStreamer.writeToDB(); + ReStreamer.updateStreamDataOnGui(); + } + + /** + * + * @param {string} processName + * @param {string} action useraction + */ + static setUserAction(processName, action){ + logger.debug("Set useraction of '" + processName + "' from '" + ReStreamer.data.userActions[processName] + "' to '" + action + "'"); + ReStreamer.data.userActions[processName] = action; + ReStreamer.writeToDB(); + ReStreamer.updateStreamDataOnGui(); + } + + /** + * repeat stream from src to local nginx server (hls and rtmp) + * @param {string} src + * @param {string} streamType repeatToOptionalOutput or repeatToLocalNginx + */ + static startStream(src, streamType, optionalOutput, retryCounter){ + logger.info("start stream " + streamType); + ReStreamer.data.retryCounter[streamType] = typeof retryCounter === 'undefined' ? 0 : retryCounter; + if (ReStreamer.data.userActions[streamType] === 'stop'){ + logger.debug("skipping 'startStream' since 'stopped' has been clicked"); + return; + } + + var command; + + //booleans for easier to read code-structure + var repeatToLocalNginx = streamType === 'repeatToLocalNginx'; + var repeatToOptionalOutput = streamType === 'repeatToOptionalOutput'; + + var addOutputsPromise; + ReStreamer.updateState(streamType, "connecting"); + //repeat to local nginx server + if (repeatToLocalNginx){ + command = new FfmpegCommand(src, { + outputLineLimit: 50 + }); + addOutputsPromise = ReStreamer.addOutput(command, ReStreamer.generateOutputRTMPPath()) + .then(function(){ + return ReStreamer.addOutput(command, ReStreamer.generateOutputHLSPath()); + }) + .catch(function(error){ + logger.error("error adding one or more outputs: " + error.toString); + }); + //repeat to optional output + }else if (repeatToOptionalOutput){ + command = new FfmpegCommand(ReStreamer.generateOutputRTMPPath(src, { + outputLineLimit: 50 + })); + ReStreamer.data.addresses.optionalOutputAddress = optionalOutput; + addOutputsPromise = ReStreamer.addOutput(command, optionalOutput); + } + + addOutputsPromise.then(function(){ + command + /* + STREAMING STARTED + */ + .on('start', function(commandLine){ + if (ReStreamer.data.userActions[streamType] === 'stop'){ + logger.debug("skipping on 'start' event of ffmpeg command since 'stopped' has been clicked"); + return; + }else{ + logger.debug("FFMPEG spawned: " + commandLine); + ReStreamer.data.processes[streamType] = command; + ReStreamer.data.addresses.srcAddress = src; + //fetch snapshot only, if repeated to local nginx + if (repeatToLocalNginx){ + ReStreamer.fetchSnapshot(true); + } + } + }) + + /* + ERROR HANDLER + */ + .on('error', (error)=>{ + if (error.toString().indexOf("SIGKILL") > -1) { + ReStreamer.updateState(streamType, "disconnected"); + logger.info("FFMPEG streaming stopped for " + streamType); + }else{ + ReStreamer.data.retryCounter[streamType]++; + if (ReStreamer.data.retryCounter[streamType] <= config.ffmpeg.monitor.retries) { + if (ReStreamer.data.userActions[streamType] === 'stop'){ + logger.debug("skipping retry since 'stopped' has been clicked"); + return; + }else{ + ReStreamer.updateState(streamType, "error", error.toString()); + logger.info("Retrying ffmpeg connection to " + src + " after " + config.ffmpeg.monitor.restart_wait + "ms"); + Q.delay(config.ffmpeg.monitor.restart_wait).then(function () { + logger.info("Retry ffmpeg connection to " + src + " retrycounter:" + ReStreamer.data.retryCounter[streamType]); + ReStreamer.startStream(src, streamType, optionalOutput, ReStreamer.data.retryCounter[streamType]); + }); + } + } + } + }) + + /* + STREAMING ENDED + */ + .on('end',()=>{ + ReStreamer.updateState(streamType, "disconnected"); + ReStreamer.data.retryCounter[streamType]++; + if (ReStreamer.data.retryCounter[streamType] <= config.ffmpeg.monitor.retries) { + if (ReStreamer.data.userActions[streamType] === 'stop'){ + logger.debug("skipping retry since 'stopped' has been clicked"); + return; + }else{ + logger.info("Retrying ffmpeg connection to " + src + " after " + config.ffmpeg.monitor.restart_wait + "ms"); + Q.delay(config.ffmpeg.monitor.restart_wait).then(function () { + logger.info("Retry ffmpeg connection to " + src + " retrycounter:" + ReStreamer.data.retryCounter[streamType]); + ReStreamer.startStream(src, streamType, optionalOutput, ReStreamer.data.retryCounter[streamType]); + }); + } + } + }); + + /* + PROGRESS + */ + var progressMethod = function (progress){ + if (ReStreamer.data.states[streamType].type === 'connecting'){ + ReStreamer.updateState(streamType, "connected"); + } + ReStreamer.data.progresses[streamType] = progress; + ReStreamer.updateProgressOnGui(); + command.removeAllListeners("progress"); + }; + command.on('progress', progressMethod); + setInterval(()=>{ + if(command.listeners("progress").length === 0) { + command.on('progress', progressMethod); + } + }, 1000); + command.exec(); + }).catch(function(error){ + logger.error("Error starting ffmpeg command: " + error.toString()); + }); + } + + /** + * binded on app-start to bind websocketevents of ReStreamer + */ + static bindWebsocketEvents(){ + WebsocketsController.addOnConnectionEventToNamespace("/", function(socket){ + socket.on("startStream", (options)=> { + ReStreamer.setUserAction(options.streamType, "start"); + ReStreamer.startStream(options.src, options.streamType, options.optionalOutput); + }); + socket.on("stopStream", (streamType)=>{ + ReStreamer.setUserAction(streamType, "stop"); + ReStreamer.stopStream(streamType); + }); + socket.on("checkForAppUpdates", ()=>{ + const app = require("../webserver/app"); + socket.emit("checkForAppUpdatesResult", app.get("updateAvailable")); + }); + socket.on("checkStates", ReStreamer.updateStreamDataOnGui); + }); + } + + /** + * creates an object of available streaming data like states and addresses to be able + * to write it to filesystem + * @returns {object} + */ + static extractDataOfStreams(){ + var sData = {}; + sData.progresses = ReStreamer.data.progresses; + sData.userActions = ReStreamer.data.userActions; + sData.addresses = ReStreamer.data.addresses; + sData.states = ReStreamer.data.states; + return sData; + } +} + +/* +define data structure of ReStreamer Data + */ +ReStreamer.data = { + retryCounter: { + repeatToLocalNginx: 0, + repeatToOptionalOutput: 0 + }, + states: { + repeatToLocalNginx: { + type: "disconnected", + message: "" + }, + repeatToOptionalOutput: { + type: "disconnected", + message: "" + } + }, + userActions: { + repeatToLocalNginx: "start", + repeatToOptionalOutput: "start" + }, + processes: { + //overwritten with ffmpeg process if stream has been started + repeatToLocalNginx: { + state: "not_connected" + }, + //overwritten with ffmpeg process if stream has been started + repeatToOptionalOutput: { + state: "not_connected" + } + }, + progresses: { + //overwritten with ffmpeg process if stream has been started + repeatToLocalNginx:{}, + //overwritten with ffmpeg process if stream has been started + repeatToOptionalOutput: {} + }, + addresses: { + srcAddress: "", + optionalOutputAddress: "" + } +}; + +module.exports = ReStreamer; diff --git a/src/classes/WebsocketController.js b/src/classes/WebsocketController.js new file mode 100644 index 0000000..3cf882c --- /dev/null +++ b/src/classes/WebsocketController.js @@ -0,0 +1,50 @@ +/* + * @name ReStreamer + * @namespace https://github.com/datarhei/restreamer + * @copyright 2015 datarhei.org + * @license Apache-2.0 + */ + +'use strict'; + +const async = require("async"); +const Logger = require("../classes/Logger"); +const logger = new Logger("WebsocketsController"); + +class WebsocketsController { + + static emitToNamespace(namespace, event, data) { + var app = require("../webserver/app"); + app.get("websocketsReady").promise.then(function (io) { + logger.debug("websocket got event " + event + " to namespace " + namespace + "","Websockets"); + io.of(namespace).emit(event, data); + }); + } + + static addOnConnectionEventToNamespace(namespace, callback) { + var app = require("../webserver/app"); + app.get("websocketsReady").promise.then(function (io) { + var nsp = io.of(namespace); + nsp.on("connection", function (socket) { + callback(socket); + }); + }); + } + + static bindDefaultEvents() { + /* + update Endpoint Class + */ + WebsocketsController.addOnConnectionEventToNamespace("/", function (socket) { + socket.on("testConnection", (options)=> { + var packageJson = require("../../package.json"); + socket.emit("connection", packageJson.version); + }); + var app = require("../webserver/app"); + socket.emit("publicIp", app.get("publicIp")); + }); + require("./ReStreamer").bindWebsocketEvents(); + } +} + +module.exports = WebsocketsController; diff --git a/src/start.js b/src/start.js new file mode 100644 index 0000000..520448a --- /dev/null +++ b/src/start.js @@ -0,0 +1,219 @@ +/* + * @name ReStreamer + * @namespace https://github.com/datarhei/restreamer + * @copyright 2015 datarhei.org + * @license Apache-2.0 + */ + +'use strict'; + +/* +requirements + */ +const Logger = require("./classes/Logger"); +const logger = new Logger("start"); +const EnvVar = require("./classes/EnvVar"); +const packageJson = require("../package.json"); +const app = require('./webserver/app'); +const config = require('../conf/live.json'); +const Q = require("q"); + +if(process.env.CREATE_HEAPDUMPS === 'true'){ + const heapdump = require('heapdump'); + setInterval(function(){ + heapdump.writeSnapshot('heapdump/' + Date.now() + '.heapsnapshot'); + }, 60000); +} + +if (typeof process.env.LOGGER_LEVEL === 'undefined'){ + process.env.LOGGER_LEVEL = "3"; +} + +/* +init simple_streamer with environments + */ +logger.info(" _ _ _ _ ", false); +logger.info(" __| | __ _| |_ __ _ _ __| |___ ___(_)", false); +logger.info(" / _ |/ _ | __/ _ | __| _ |/ _ | |", false); +logger.info("| (_| | (_| | || (_| | | | | | | __/| |", false); +logger.info("|_____|_____|_||_____|_| |_| |_|____||_|", false); +logger.info("", false); +logger.info("ReStreamer v" + packageJson.version, false); +logger.info("", false); +logger.info("ENVIRONMENTS", false); +logger.info("More informations in our Docs", false); +logger.info("", false); + +// define environment variables +var env_vars = []; +env_vars.push(new EnvVar("NODEJS_PORT", false, 3000, "Webserver port of application")); +env_vars.push(new EnvVar("LOGGER_LEVEL", true, "3", "Logger level to defined, what should be logged")); +env_vars.push(new EnvVar("TIMEZONE", true, "Europe/Berlin", "Set the timezone")); +env_vars.push(new EnvVar("SNAPSHOT_REFRESH_INTERVAL", false, 60000, "Interval to create a new Snapshot")); +env_vars.push(new EnvVar("CREATE_HEAPDUMPS", false, "false", "Create Heapdumps of application")); + +// manage all environments +var killProcess = false; +for (let e of env_vars){ + if(typeof process.env[e.name] !== 'undefined'){ + logger.info("ENV \"" + e.name + "=" + process.env[e.name] + "\", " + e.description); + }else if(e.required === true){ + logger.error("No value set for env " + e.name + ", but it is required"); + killProcess = true; + }else{ + process.env[e.name] = e.defaultValue; + logger.info("ENV \"" + e.name + "=" + process.env[e.name] + "\", set to default-value!, " + e.description); + } +} + +// kill process after a short delay to log the error message to console +if(killProcess === true){ + setTimeout(()=> { + process.exit(); + }, 500); +} +logger.info("", false); + +/* + checking jsondb + */ +const checkJsonDb = function(){ + logger.info("checking jsondb file..."); + var Validator = require('jsonschema').Validator; + var fs = require("fs"); + var path = require("path"); + + var schemadata; + var dbdata; + var deferred = Q.defer(); + + var readSchema = Q.nfcall(fs.readFile, path.join(__dirname, "../", "conf", "jsondb_v1_schema.json")); + var readDBFile = Q.nfcall(fs.readFile, path.join(__dirname, "../", "db", "v1.json")); + + readSchema + .then(function(s){ + schemadata = JSON.parse(s.toString("utf8")); + return readDBFile; + }) + .then(function(d){ + dbdata = JSON.parse(d.toString("utf8")); + var v = new Validator(); + var instance = dbdata; + var schema = schemadata; + var validateResult = v.validate(instance, schema); + if (validateResult.errors.length > 0){ + logger.debug("validation error of v1.db: " + JSON.stringify(validateResult.errors)); + throw new Error(JSON.stringify(validateResult.errors)); + }else{ + logger.debug("v1.db is valid"); + deferred.resolve(); + } + }).catch(function(error){ + logger.debug("error reading v1.db:" + error.toString()); + var defaultStructure = { + addresses: { + srcAddress: "", + optionalOutputAddress: "" + }, + states: { + repeatToLocalNginx: { + type: "stopped" + }, + repeatToOptionalOutput: { + type: "stopped" + } + }, + userActions:{ + repeatToLocalNginx: "stop", + repeatToOptionalOutput: "stop" + }, + progresses: { + repeatToLocalNginx: {}, + repeatToOptionalOutput: {} + } + }; + fs.writeFileSync(path.join(__dirname, "../", "db", "v1.json"), JSON.stringify(defaultStructure)); + deferred.resolve(); + }); + return deferred.promise; +}; + +/* + nginx rtmp server + */ +const startNginxRTMPServer = function startNginxRTMPServer(){ + logger.info("starting nginx server....", "start.nginx"); + var deferred = Q.defer(); + const command = config.nginx.exec; + const spawn = require('child_process').spawn; + spawn('sh', ['-c', command], { stdio: 'inherit' }); + deferred.resolve(); + return deferred.promise; +}; + +/* + webserver + */ +const startWebserver = function startWebserver(){ + logger.info("starting webserver..."); + var deferred = Q.defer(); + app.set('port', process.env.NODEJS_PORT); + var server = app.listen(app.get('port'), function () { + require("./classes/WebsocketController").bindDefaultEvents(); + app.set("io", require('socket.io')(server)); + app.set("server", server.address()); + app.get("websocketsReady").resolve(app.get("io")); //promise to determine if the webserver has been started to avoid ws binding before + deferred.resolve(server.address().port); + }); + return deferred.promise; +}; + +/* +public ip + */ +const getPublicIp = function(){ + logger.info("Getting public ip...", "start.publicip"); + var exec = require("child_process").exec; + exec("public-ip", (err, stdout, stderr)=>{ + if (err){ + console.log(err); + } + app.set("publicIp", stdout.split("\n")[0] ); + }); +}; + +/* +Restore ffmpeg processes after an applicatoin restart or stuff + */ +const restoreFFMPEGProcesses = function(){ + logger.info("Restoring ffmpeg processes...", "start.restore"); + var deferred = Q.defer(); + const ReStreamer = require("./classes/ReStreamer"); + ReStreamer.restoreFFMpegProcesses(); + deferred.resolve(); + return deferred.promise; +}; + +/* +Init + */ +startNginxRTMPServer() + .then(function(){ + return checkJsonDb(); + }) + .then(function(){ + return startWebserver(); + }) + .then(function(port){ + logger.info("Webserver running on port " + process.env.NODEJS_PORT, "start.webserver"); + }) + .then(function(){ + getPublicIp(); + return restoreFFMPEGProcesses(); + }) + .catch(function(error){ + logger.error("error starting webserver and nginx for applicatoin: " + error); + setTimeout(()=> { + process.exit(); + }, 500); + }); diff --git a/src/webserver/app.js b/src/webserver/app.js new file mode 100644 index 0000000..b8a20d6 --- /dev/null +++ b/src/webserver/app.js @@ -0,0 +1,122 @@ +/* + * @name ReStreamer + * @namespace https://github.com/datarhei/restreamer + * @copyright 2015 datarhei.org + * @license Apache-2.0 + */ + +'use strict'; + +/* + libraries + */ +//auth stuff +const passport = require('passport'); +const flash = require('connect-flash'); + +//express +const express = require('express'); +const session = require('express-session'); +const i18n = require('i18n'); +const favicon = require('serve-favicon'); +const cookieParser = require('cookie-parser'); +const bodyParser = require('body-parser'); +const compression = require("compression"); + +//other +const path = require('path'); +const Q = require("q"); +const request = require("request"); + +/* + modules + */ +const packageJson = require("../../package.json"); +const Logger = require("../classes/Logger"); +const logger = new Logger("Webserver"); +//middlewares +const expressLogger = require("./middlewares/expressLogger"); + +//create express app +const app = express(); + +app.use(session({ + secret: 'keyboard cat', + resave: false, + saveUninitialized: true})); // session secret + +//create promise for "websockets ready" +app.set("websocketsReady", Q.defer()); + +//add passport auth +app.use(passport.initialize()); +app.use(flash()); // use connect-flash for flash messages stored in session +app.use(passport.session()); // persistent login sessions +require("./config/passport")(passport); + +//configure i18n +i18n.configure({ + locales:['en','de'], + directory: __dirname + '/locales', + defaultLocale: 'en', + cookie: 'locale', + updateFiles: false +}); + +//configure express app +app.use(favicon(__dirname + '/public/images/favicon.ico')); +app.use(i18n.init); +app.use(bodyParser.json()); +app.set('views', __dirname + '/views'); +app.set('view engine', 'jade'); +app.use(bodyParser.urlencoded({ extended: true })); +app.use(cookieParser()); +app.use(compression()); +app.set('json spaces', 4); + +require("./controllers/index")(app, passport); +app.use('/', expressLogger); + +// catch 404 and forward to error handler +app.use(function(req, res, next) { + var err = new Error('Not Found ' + req.url); + err.status = 404; + next(err); +}); + +// no stacktraces leaked to user +app.use(function(err, req, res, next) { + res.status(err.status || 500); + res.send({ + message: err.message, + error: {} + }); +}); + +var checkForAppUpdates = function(){ + logger.debug("checking app for updates..."); + const url = 'http://datarhei.org/apps.json'; + request(url, function (error, response, body) { + if (!error && response.statusCode == 200) { + var updateCheck = JSON.parse(body); + var updateAvailable = false; + if (updateCheck.restreamer.version === packageJson.version){ + updateAvailable = false; + logger.debug("checking app for updates successful. update is not available (remote: " + updateCheck.restreamer.version + ", local: " + packageJson.version + ")"); + }else{ + updateAvailable = updateCheck.restreamer.version; + logger.debug("checking app for updates successful. update is available (remote: " + updateCheck.restreamer.version + ", local: " + packageJson.version + ")"); + } + logger.info("checking app for updates successful."); + app.set("updateAvailable", updateAvailable); + } else { + logger.info("Update check failed", false); + } + }); +}; + +//start interval to check for updates +checkForAppUpdates(); +setInterval(checkForAppUpdates, 24 * 60 * 60 * 1000); + +module.exports = app; diff --git a/src/webserver/config/passport.js b/src/webserver/config/passport.js new file mode 100644 index 0000000..ef8a78e --- /dev/null +++ b/src/webserver/config/passport.js @@ -0,0 +1,48 @@ +/* + * @name ReStreamer + * @namespace https://github.com/datarhei/restreamer + * @copyright 2015 datarhei.org + * @license Apache-2.0 + */ + +var LocalStrategy = require('passport-local').Strategy; +var auth = require("../../../conf/live.json").auth; + +if (process.env.RESTREAMER_USERNAME) { + var username = process.env.RESTREAMER_USERNAME; +}else{ + var username = auth.username; +} + +if (process.env.RESTREAMER_USERNAME) { + var password = process.env.RESTREAMER_PASSWORD; +}else{ + var password = auth.password; +} + +module.exports = (passport) => { + // used to serialize the user for the session + passport.serializeUser(function(user, done){ + done(null, user); + }); + + passport.deserializeUser(function(user, done){ + done(null, user); + }); + passport.use('local-login', new LocalStrategy({ + usernameField : 'user', + passwordField : 'pass', + passReqToCallback : true // allows us to pass back the entire request to the callback + }, + function(req, user, pass, done) { // callback with user and pass from our form + if (user === username && pass === password){ + //login success + /* + WEBSOCKET SECURITY HERE + */ + done(null, auth); + }else{ + done(null, false, req.flash("wrong password or wrong user")); + } + })); +}; diff --git a/src/webserver/controllers/index.js b/src/webserver/controllers/index.js new file mode 100644 index 0000000..af7761b --- /dev/null +++ b/src/webserver/controllers/index.js @@ -0,0 +1,71 @@ +/* + * @name ReStreamer + * @namespace https://github.com/datarhei/restreamer + * @copyright 2015 datarhei.org + * @license Apache-2.0 + */ + +const express = require("express"); +const path = require("path"); +const ReStreamer = require("../../classes/ReStreamer"); +module.exports = (app, passport) => { + + //static paths + app.use("/css", express.static(path.join(__dirname, '../', 'public', 'css'))); + app.use("/libs", express.static(path.join(__dirname, '../', 'public', 'libs'))); + app.use("/dist", express.static(path.join(__dirname, '../', 'public', 'dist'))); + app.use("/help", express.static( path.join(__dirname, '../', 'public', 'help'))); + app.use("/images", express.static( path.join(__dirname, '../', 'public', 'images'))); + app.use("/locales", express.static(path.join(__dirname, '../', 'public', 'locales'))); + app.use("/crossdomain.xml",express.static( path.join(__dirname, '../', 'public', 'crossdomain.xml'))); + app.use("/player.html", express.static(path.join(__dirname, '../', 'public', 'player.html'))); + app.get("/main.html", (req, res)=>{ + if (req.isAuthenticated()){ + res.sendFile(path.join(__dirname, '../', 'public', 'main.html')); + } else { + res.sendFile(path.join(__dirname, '../', 'public', 'login.html')); + } + }); + app.get("/", (req, res)=>{ + res.sendFile(path.join(__dirname, '../', 'public', 'index.html')); + }); + /* Handle Login POST */ + app.post('/login', + passport.authenticate('local-login', { + successRedirect: '/', + failureRedirect: '/', + failureFlash : true + }) + ); + app.get("/logout", (req, res)=>{ + req.logout(); + res.redirect("/"); + }); + //small get.api + app.get("/v1/states", (req, res)=>{ + var states = ReStreamer.data.states; + res.json({ + repeat_to_local_nginx: states.repeatToLocalNginx, + repeat_to_optional_output: states.repeatToOptionalOutput + }); + }); + app.get("/v1/progresses", (req, res)=>{ + var progresses = ReStreamer.data.progresses; + res.json({ + repeat_to_local_nginx: { + frames: progresses.repeatToLocalNginx.frames, + current_fps: progresses.repeatToLocalNginx.currentFps, + current_kbps: progresses.repeatToLocalNginx.currentKbps, + target_size: progresses.repeatToLocalNginx.targetSize, + timemark: progresses.repeatToLocalNginx.timemark + }, + repeat_to_optional_output: { + frames: progresses.repeatToOptionalOutput.frames, + current_fps: progresses.repeatToOptionalOutput.currentFps, + current_kbps: progresses.repeatToOptionalOutput.currentKbps, + target_size: progresses.repeatToOptionalOutput.targetSize, + timemark: progresses.repeatToOptionalOutput.timemark + } + }); + }); +}; diff --git a/src/webserver/middlewares/expressLogger.js b/src/webserver/middlewares/expressLogger.js new file mode 100644 index 0000000..dc1e6fa --- /dev/null +++ b/src/webserver/middlewares/expressLogger.js @@ -0,0 +1,32 @@ +/* + * @name ReStreamer + * @namespace https://github.com/datarhei/restreamer + * @copyright 2015 datarhei.org + * @license Apache-2.0 + */ + +'use strict'; + +const bytes = require('bytes'); +const Logger = require("../../classes/Logger"); +const logger = new Logger("webserver"); + +module.exports = (req, res, next)=>{ + req._startTime = new Date(); + var log = () =>{ + var code = res.statusCode; + var len = parseInt(res.getHeader('Content-Length'), 10); + if (isNaN(len)) { + len = ''; + }else { + len = ' - ' + bytes(len); + } + var duration = ('new Date' - 'req._startTime'); + var url = (req.originalUrl || req.url); + var method = req.method; + logger.debug(method + " \"" + url + "\" " + code + " " + duration + " " + req.ip + " " + len, "Webserver"); + }; + res.on("finish", log); + res.on("close", log); + next(); +}; diff --git a/src/webserver/public/scripts/apps/datarhei.js b/src/webserver/public/scripts/apps/datarhei.js new file mode 100644 index 0000000..381db95 --- /dev/null +++ b/src/webserver/public/scripts/apps/datarhei.js @@ -0,0 +1,51 @@ +/* + * @name ReStreamer + * @namespace https://github.com/datarhei/restreamer + * @copyright 2015 datarhei.org + * @license Apache-2.0 + */ + +'use strict'; + +var datarheiApp = angular.module('datarheiApp', ['ui.router','ui.bootstrap', 'pascalprecht.translate']); + +datarheiApp.config(function ($translateProvider) { + // deutsche Sprache + $translateProvider.useStaticFilesLoader({ + prefix: 'locales/lang-', + suffix: '.json' + }); + + $translateProvider.useSanitizeValueStrategy('escape'); + $translateProvider.preferredLanguage("en_US"); +}); + +datarheiApp.config(function($stateProvider, $urlRouterProvider){ + // For any unmatched url, redirect to / + $urlRouterProvider.otherwise("/"); + + $stateProvider + .state('main',{ + templateUrl: 'main.html', + url:'/', + controller: 'mainCtrl'} + ) + .state('helpSource',{ + templateUrl: 'help/source.html', + url:'/help/source'} + ) + .state('helpOptionalOutput',{ + templateUrl: 'help/optionalOutput.html', + url:'/help/optionalOutput'} + ); +}); + +datarheiApp.filter('inArray', function($filter){ + return function(list, arrayFilter, element){ + if(arrayFilter){ + return $filter("filter")(list, function(listItem){ + return arrayFilter.indexOf(listItem[element]) != -1; + }); + } + }; +}); diff --git a/src/webserver/public/scripts/controllers/languageCtrl.js b/src/webserver/public/scripts/controllers/languageCtrl.js new file mode 100644 index 0000000..d9708b0 --- /dev/null +++ b/src/webserver/public/scripts/controllers/languageCtrl.js @@ -0,0 +1,21 @@ +/* + * @name ReStreamer + * @namespace https://github.com/datarhei/restreamer + * @copyright 2015 datarhei.org + * @license Apache-2.0 + */ + +datarheiApp.controller('languageCtrl',['$scope','$translate', function($scope, $translate) { + $scope.currentLocale = $translate.preferredLanguage(); + $scope.switchLanguage = function(locale){ + $scope.currentLocale = locale; + $translate.use(locale).then(function(){ + window.Logger.log("INFO", "Switched language to " + locale); + }, function(error){ + window.Logger.error("INFO", "Switching language to " + locale + " failed: " + error); + }); + }; + $scope.langIs = function(locale){ + return locale === $scope.currentLocale; + }; +}]); diff --git a/src/webserver/public/scripts/controllers/mainCtrl.js b/src/webserver/public/scripts/controllers/mainCtrl.js new file mode 100644 index 0000000..307639a --- /dev/null +++ b/src/webserver/public/scripts/controllers/mainCtrl.js @@ -0,0 +1,139 @@ +/* + * @name ReStreamer + * @namespace https://github.com/datarhei/restreamer + * @copyright 2015 datarhei.org + * @license Apache-2.0 + */ + +/** + Angularjs Controller mainController + + controlls the restreamer workflow + */ + +datarheiApp.controller('mainCtrl',['ws', '$scope', '$location', '$rootScope', '$translate', function(ws, $scope, $location, $rootScope, $translate) { + //binding just once + var setup = false; + $translate.use("en_US"); + + $scope.reStreamerData = { + states: { + repeatToLocalNginx: { + type: "" + }, + repeatToOptionalOutput: { + type: "" + } + }, + userActions: { + repeatToLocalNginx: "", + repeatToOptionalOutput: "" + }, + addresses: { + optionalOutputAddress: "", + srcAddress: "" + } + }; + + $rootScope.windowLocationPort = $location.port(); + + $scope.optionalOutput = ""; + + $scope.showStopButton = function(streamType){ + return $scope.reStreamerData.userActions[streamType] === "start"; + }; + + $scope.showStartButton = function(streamType){ + return $scope.reStreamerData.userActions[streamType] === "stop"; + }; + + $scope.nginxRepeatStreamConnecting = function(){ + return $scope.reStreamerData.states.repeatToLocalNginx.type === "connecting"; + }; + + $scope.nginxRepeatStreamConnected = function(){ + return $scope.reStreamerData.states.repeatToLocalNginx.type === "connected"; + }; + + $scope.nginxRepeatStreamError = function(){ + return $scope.reStreamerData.states.repeatToLocalNginx.type === "error"; + }; + + $scope.optionalOutputConnecting = function(){ + return $scope.reStreamerData.states.repeatToOptionalOutput.type === "connecting"; + }; + + $scope.optionalOutputConnected = function(){ + return $scope.reStreamerData.states.repeatToOptionalOutput.type === "connected"; + }; + + $scope.optionalOutputError = function(){ + return $scope.reStreamerData.states.repeatToOptionalOutput.type === "error"; + }; + + /* + Configure Websockets + */ + + //connect to namespace / + ws = ws("/"); + + ws.emit('testConnection'); + + //check states of hls and rtmp stream + ws.emit('checkStates'); + + ws.emit('checkForAppUpdates'); + + //prohibit double binding of events + if (!setup) { + /** + * test websockets connection (should print below message to browser console if it works) + */ + ws.on("connection", function (version) { + $rootScope.version = version; + window.Logger.log("INFO", "Datarhei " + version + " websockets connected"); + var player = new Clappr.Player({ + source: "http://" + window.location.hostname + ":" + window.location.port + "/hls/live.stream.m3u8", + parentId: "#player", + baseUrl: '/libs/clappr/dist/', + poster: "images/live.jpg", + mediacontrol: {seekbar: "#3daa48", buttons: "#3daa48"}, + height: "100%", + width: "100%" + }); + }); + + ws.on("updateProgress", function(progresses){ + $scope.reStreamerData.progresses = progresses; + }); + ws.on("publicIp", function(publicIp){ + $rootScope.publicIp = publicIp; + }); + ws.on("updateStreamData", function(reStreamerData) { + $scope.reStreamerData = reStreamerData; + if ($scope.showStopButton('repeatToOptionalOutput')) { + $scope.activateOptionalOutput = true; //checkbox; + } + }); + ws.on("checkForAppUpdatesResult", function(result){ + $rootScope.checkForAppUpdatesResult = result; + }); + } + + $scope.startStream = function(streamType){ + var optionalOutput = false; + if($scope.activateOptionalOutput === true){ + optionalOutput = $scope.reStreamerData.addresses.optionalOutputAddress; + } + ws.emit("startStream", { + src: $scope.reStreamerData.addresses.srcAddress, + streamType: streamType, + optionalOutput: optionalOutput + }); + }; + + $scope.stopStream = function(streamType){ + ws.emit("stopStream", streamType); + }; +}]); diff --git a/src/webserver/public/scripts/directives/directives.js b/src/webserver/public/scripts/directives/directives.js new file mode 100644 index 0000000..ee7a4b3 --- /dev/null +++ b/src/webserver/public/scripts/directives/directives.js @@ -0,0 +1,36 @@ +/* + * @name ReStreamer + * @namespace https://github.com/datarhei/restreamer + * @copyright 2015 datarhei.org + * @license Apache-2.0 + */ + +/* jslint browser: true */ + +'use strict'; + +window.datarheiApp +.directive('ngModalNewinput', function() { + return { + templateUrl: 'ngDirectives/modals/newinput.html' + }; +}); +const RTMP_REGEXP = /^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$/; +window.datarheiApp + .directive('rtmpaddress', function($q, $timeout) { + return { + require: 'ngModel', + link: function(scope, elm, attrs, ctrl) { + ctrl.$validators.integer = function(modelValue, viewValue) { + if (ctrl.$isEmpty(modelValue)) { + // consider empty models to be valid + return true; + } + if (RTMP_REGEXP.test(viewValue)) { + return true; + } + return false; + }; + } + }; +}); diff --git a/src/webserver/public/scripts/factories/alertService.js b/src/webserver/public/scripts/factories/alertService.js new file mode 100644 index 0000000..cc4668d --- /dev/null +++ b/src/webserver/public/scripts/factories/alertService.js @@ -0,0 +1,41 @@ +/* + * @name ReStreamer + * @namespace https://github.com/datarhei/restreamer + * @copyright 2015 datarhei.org + * @license Apache-2.0 + */ + +datarheiApp.factory('alertService', function($rootScope) { + var alertService = {}; + $rootScope.alerts = []; + alertService.add = function(alertObject) { + var alert, found, _i, _len, _ref; + found = false; + for (var i = 0; i < $rootScope.alerts.length; i++) { + alert = $rootScope.alerts[i]; + if (alert.message === alertObject.message) + { + found = true; + alert.time = alertObject.time; + } + } + if (!found) { + alertObject.close = function() { + return alertService.closeAlert(this); + }; + $rootScope.alerts.push(alertObject); + window.setTimeout(function() { + alertService.closeAlertIdx($rootScope.alerts.indexOf(alertObject)); + return $rootScope.$apply(); + }, 10000); + console.log($rootScope.alerts); + } + }; + alertService.closeAlert = function(alert) { + return this.closeAlertIdx($rootScope.alerts.indexOf(alert)); + }; + alertService.closeAlertIdx = function(index) { + return $rootScope.alerts.splice(index, 1); + }; + return alertService; +}); diff --git a/src/webserver/public/scripts/factories/websockets.js b/src/webserver/public/scripts/factories/websockets.js new file mode 100644 index 0000000..cbb3aa0 --- /dev/null +++ b/src/webserver/public/scripts/factories/websockets.js @@ -0,0 +1,48 @@ +/* + * @name ReStreamer + * @namespace https://github.com/datarhei/restreamer + * @copyright 2015 datarhei.org + * @license Apache-2.0 + */ + +/* jslint browser: true */ + +'use strict'; + +datarheiApp.factory('ws', [ '$rootScope', 'alertService', function ($rootScope, alertService) { + var ws = function(namespace){ + var wsHandler = {}; + + window.Logger.log ("WEBSOCKETS_NAMESPACE", "connect to namespace " + namespace); + var socket; + if (namespace === "/"){ + socket = io.connect(); + }else{ + socket = io.connect(namespace); + } + wsHandler.emit = function (event, data, callback) { + window.Logger.log("WEBSOCKETS_OUT", "emit event '" + event + "'"); + socket.emit(event, data); + return wsHandler; + }; + wsHandler.on = function (event, callback) { + socket.on(event, function () { + window.Logger.log("WEBSOCKETS_IN", "got event '" + event + "'"); + var args = arguments; + $rootScope.$apply(function () { + callback.apply(null, args); + }); + }); + return wsHandler; + }; + wsHandler.off = function (event, callback) { + socket.removeListener(event, callback); + }; + wsHandler + .on("alert", function(alert) { + return alertService.add(alert); + }); + return wsHandler; + }; + return ws; +}]); diff --git a/src/webserver/public/scripts/index.js b/src/webserver/public/scripts/index.js new file mode 100644 index 0000000..5a5f42a --- /dev/null +++ b/src/webserver/public/scripts/index.js @@ -0,0 +1,21 @@ +/* + * @name ReStreamer + * @namespace https://github.com/datarhei/restreamer + * @copyright 2015 datarhei.org + * @license Apache-2.0 + */ + +window.Logger = { + + level: { + INFO: 'color: #0000FF; font-weight: bold', + DEBUG: 'color: #AABBCC; font-weight: bold', + ERROR: 'color: #FF0011d; font-weight: bold', + WEBSOCKETS_IN: 'color: #00BFFF; font-weight: bold', + WEBSOCKETS_OUT: 'color: #00BF00; font-weight: bold', + WEBSOCKETS_NAMESPACE: 'color: #00BF00; font-weight: bold' + }, + log: function(level, message){ + console.log("%c " +"[" + level + "] " + message, this.level[level]); + } +}; diff --git a/static/webserver/public/crossdomain.xml b/static/webserver/public/crossdomain.xml new file mode 100644 index 0000000..d7a0851 --- /dev/null +++ b/static/webserver/public/crossdomain.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/static/webserver/public/css/restreamer.css b/static/webserver/public/css/restreamer.css new file mode 100755 index 0000000..c733887 --- /dev/null +++ b/static/webserver/public/css/restreamer.css @@ -0,0 +1,220 @@ +html, body { + height:100%; + margin:0; + padding:0 +} + +body { + color: #fff; +} + +.container-fluid { + height:100%; + display:table; + width: 100%; + padding: 0; + background: url(../images/bg.png) no-repeat center center fixed; + -webkit-background-size: cover; + -moz-background-size: cover; + -o-background-size: cover; + background-size: cover; + background-color: #3d3d39; +} + +.container-body { + float: none; + margin: 0 auto; + max-width: 500px; + border-color: #2c2c28; + border-width: 1px; + border-style: solid; + border-radius: 10px; + padding: 50px; +} + +.row-fluid { + height: 100%; + display:table-cell; + vertical-align: middle; +} + +hr { + border-bottom: 1px solid #454543; + border-top: 1px solid #2b2b2a; +} + +.footer { + padding-bottom: 25px; +} + +h1, h2, h3, h4, h5, h6 { + color: #3daa48; + font-weight: 300; +} + +h1 { + text-shadow: 0px 1px #000; + font-weight: 100; + margin-bottom: 30px; + font-size: 46px; +} + +a { + color: #fff; + text-decoration: none; +} + +a:visted { + color: #fff; + text-decoration: none; +} + +a:hover, a:active, a:focus { + color: #3daa48; + text-decoration: none; +} + + +.locales { + color: #60605e; + text-decoration: none; +} + +.locales.active { + color: #fff; + text-decoration: none; +} + +.locales:hover, .locales:focus { + color: #3daa48; + text-decoration: none; +} + +/* buttons */ + +.btn { + margin-top: -5px; +} + +.btn-success { + background-color: #3d8142; + border-color: #3d8142; +} + +.btn-danger { + background-color: #ac5647; + border-color: #ac5647; +} + +.btn-default.disabled, .btn-default.disabled.active, .btn-default.disabled.focus, .btn-default.disabled:active, .btn-default.disabled:focus, .btn-default.disabled:hover, .btn-default[disabled], .btn-default[disabled].active, .btn-default[disabled].focus, .btn-default[disabled]:active, .btn-default[disabled]:focus, .btn-default[disabled]:hover, fieldset[disabled] .btn-default, fieldset[disabled] .btn-default.active, fieldset[disabled] .btn-default.focus, fieldset[disabled] .btn-default:active, fieldset[disabled] .btn-default:focus, fieldset[disabled] .btn-default:hover { + background-color: #434341; + border-color: #434341; +} + +.btn.disabled, .btn[disabled], fieldset[disabled] .btn { + cursor: not-allowed; + filter: alpha(opacity=1.0); + -webkit-box-shadow: none; + box-shadow: none; + opacity: 1.0; + color: #373734; +} + +.form-control[disabled]{ + color: #60605e; + font-weight:bold; + background-color: #373734; + border: 2px solid #434341; +} + +.input { + color: #fff; + background-color: #373734; + border: 2px solid #434341; +} + +.input:hover, .input:active, .input:active:hover, .input:active:focus, .input:link, .input:focus { + border-color: #3daa48; +} + +.progress-bar-success { + background-color: #3d8142; + color: #fff; +} + +.progress-bar-info { + background-color: #4d4d4b; + color: #fff; +} + +.progress-bar-danger { + background-color: #ac5647; + color: #fff; +} +.container .jumbotron, .container-fluid .jumbotron, .jumbotron { + padding-top: 18px; + padding-bottom: 18px; + margin-top: -4px; + margin-bottom: 18px; + text-align: center; + padding-right: 20px; + padding-left: 20px; +} + +.player-link { + margin-bottom: -20px; +} + +label { + display: inline-block; + max-width: 100%; + margin-bottom: 5px; + font-weight: 200; + font-size: 18px; + color: #fff; +} + +.checkbox label, .radio label { + font-size: 14px; +} + +.modal-content { + background-color: #373734; +} +.modal-header { + border-bottom: 0px solid #e5e5e5; +} + +.modal-footer { + border-top: 0px solid #e5e5e5; + text-align: left; +} + +.close { + float: right; + font-size: 25px; + font-weight: 300; + line-height: 1; + color: #fff; + text-shadow: 0 1px 0 #000; + filter: alpha(opacity=20); + opacity: 1.0; +} + +pre { + display: block; + padding: 9.5px; + margin: 0 0 10px; + font-size: 12px; + line-height: 1.42857143; + color: #fff; + word-break: break-all; + word-wrap: break-word; + background-color: #3d3d39; + border: 1px solid #2c2c28; + border-radius: 4px; +} + +.jwplayer:focus, .jwplayer:active { + outline: 0; +} diff --git a/static/webserver/public/help/optionalOutput.html b/static/webserver/public/help/optionalOutput.html new file mode 100644 index 0000000..6ab52cc --- /dev/null +++ b/static/webserver/public/help/optionalOutput.html @@ -0,0 +1,3 @@ +
+ optional output help +
diff --git a/static/webserver/public/help/source.html b/static/webserver/public/help/source.html new file mode 100644 index 0000000..d2a282c --- /dev/null +++ b/static/webserver/public/help/source.html @@ -0,0 +1,3 @@ +
+ source help +
diff --git a/static/webserver/public/images/bg.png b/static/webserver/public/images/bg.png new file mode 100644 index 0000000..d3dff9a Binary files /dev/null and b/static/webserver/public/images/bg.png differ diff --git a/static/webserver/public/images/favicon.ico b/static/webserver/public/images/favicon.ico new file mode 100644 index 0000000..48ccd42 Binary files /dev/null and b/static/webserver/public/images/favicon.ico differ diff --git a/static/webserver/public/images/live.jpg b/static/webserver/public/images/live.jpg new file mode 100644 index 0000000..f7ae47b Binary files /dev/null and b/static/webserver/public/images/live.jpg differ diff --git a/static/webserver/public/images/restreamer.psd b/static/webserver/public/images/restreamer.psd new file mode 100644 index 0000000..a884766 Binary files /dev/null and b/static/webserver/public/images/restreamer.psd differ diff --git a/static/webserver/public/index.html b/static/webserver/public/index.html new file mode 100644 index 0000000..2d581d5 --- /dev/null +++ b/static/webserver/public/index.html @@ -0,0 +1,83 @@ + + + + + + + + + + ReStreamer + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+

+ EN + / + DE +

+
+

ReStreamer

+
+
+ +
+
+
+ + + + + + diff --git a/static/webserver/public/locales/lang-de_DE.json b/static/webserver/public/locales/lang-de_DE.json new file mode 100755 index 0000000..4d02ff3 --- /dev/null +++ b/static/webserver/public/locales/lang-de_DE.json @@ -0,0 +1,22 @@ +{ + "help_titel": "Hilfe", + "issue_tracker": "Fehler melden", + "project_page": "Hilfe", + "update_btn": "Update verfügbar", + "login_username": "Benutzername", + "login_password": "Passwort", + "login_btn": "Anmelden", + "button_start": "Start", + "button_stop": "Stop", + "input_titel": "RTMP/RTSP Video Quelle", + "input_example": "z.B. rtsp://192.168.57.100/media.amp", + "player_link_titel": "Player öffnen", + "process_success": "Das Streaming wurde erfolgreich aufgebaut.", + "process_failed": "Der Stream konnte nicht aufgebaut werden. Bitte prüfen Sie Ihren Video-Quelle.", + "process_init": "Der Streaming-Prozess wird erstellt. Bitte warten...", + "output_optional": "Zusätzlicher RTMP-Streaming-Server", + "output_optional_example": "z.b. rtmp://live.youtube.com/channelId", + "player_modal_help_titel": "Der iFrame-Code und ein Preview-Image zur Einbettung in der Webseite:", + "player_modal_help_content": "Zusätzlich muss der Port 8080 von dem Router auf die IP-Adresse des Rechners weitergeleitet werden", + "not_valid_rtmp": "Keine valide RTMP-Adresse" +} diff --git a/static/webserver/public/locales/lang-en_US.json b/static/webserver/public/locales/lang-en_US.json new file mode 100644 index 0000000..3a999c8 --- /dev/null +++ b/static/webserver/public/locales/lang-en_US.json @@ -0,0 +1,21 @@ +{ + "help_titel": "Help", + "issue_tracker": "Issue alert", + "project_page": "Help", + "update_btn": "Update available", + "login_username": "Username", + "login_password": "Password", + "login_btn": "Login", + "button_start": "Start", + "button_stop": "Stop", + "input_titel": "RTMP/RTSP Video Source", + "input_example": "e.g. rtsp://192.168.57.100/media.amp", + "player_link_titel": "Open player", + "process_success": "The streaming is successfully initiated.", + "process_failed": "The stream isn't running. Please check you video device", + "process_init": "The streaming-process is initiating. Please wait...", + "output_optional": "External RTMP-Streaming-Server", + "output_optional_example": "e.g. rtmp://live.youtube.com/channelId", + "player_modal_help_titel": "iFrame code an preview of image to embed in website:", + "player_modal_help_content": "In addition port 8080 have to be forwarded from the router to ip adress of the computer" +} diff --git a/static/webserver/public/login.html b/static/webserver/public/login.html new file mode 100644 index 0000000..24eaac6 --- /dev/null +++ b/static/webserver/public/login.html @@ -0,0 +1,11 @@ +
+
+ +
+
+ +
+
+ +
+
diff --git a/static/webserver/public/main.html b/static/webserver/public/main.html new file mode 100644 index 0000000..7d15316 --- /dev/null +++ b/static/webserver/public/main.html @@ -0,0 +1,55 @@ + +
+ + +
+
{{'process_init' | translate}}
+
+ {{'process_success' | translate}} +
+ {{reStreamerData.progresses.repeatToLocalNginx.currentFps}}fps + / + {{reStreamerData.progresses.repeatToLocalNginx.currentKbps}}Kb/s +
+
+
{{'process_failed' | translate}}
+
+ +
+ + +
+
+
+ +

Optional:

+
+ +
+
+
+ +
+
+
{{'process_init' | translate}}
+
+ {{'process_success' | translate}} +
+ {{reStreamerData.progresses.repeatToOptionalOutput.currentFps}}fps + / + {{reStreamerData.progresses.repeatToOptionalOutput.currentKbps}}Kb/s +
+
+
{{'process_failed' | translate}}
+
+
{{'button_stop' | translate}}
+
+
{{'button_start' | translate}}
+
+
diff --git a/static/webserver/public/player.html b/static/webserver/public/player.html new file mode 100644 index 0000000..e1331b9 --- /dev/null +++ b/static/webserver/public/player.html @@ -0,0 +1,37 @@ + + + + + + + + + ReStreamer + + + + + + +
+
+
+
+
+
+ +
+
+
+ +