videostreaming
Dies ist eine alte Version des Dokuments!
Inhaltsverzeichnis
Videostreaming
- obs-studio (selber compilieren)
- erfolgreich unter Debian Jessie erstellt.
- Macht auf den ersten Block einen vernünftigen Eindruck
Allg. Hinweis: Es gibt ffmpeg und libav. Letzteres ist in Debian Jessie enthalten, wird aber in der folgenden Version wieder durch ffmpeg ersetzt. Des weiteren scheint libav ggf. Probleme zu bereiten. Deshalb auf Rechnern, die für Streaming verwendet werden sollen auf jeden Fall ffmpeg verwenden.
Server
- nginx mit rtmp
- Ampache?
- Red5
- crtmpserver (Debian Paket, noch keine weiteren Informationen)
- ffserver (vom ffmpeg Projekt)
NGINX
Anleitungen
git clone https://github.com/arut/nginx-rtmp-module.git cd nginx-rtmp-module git checkout v1.1.10 cd .. wget http://nginx.org/download/nginx-1.11.9.tar.gz tar xzf nginx-1.11.9.tar.gz cd nginx-1.11.9 ./configure --with-http_ssl_module --with-http_stub_status_module --add-module=../nginx-rtmp-module make -j2 make install nginx -h nginx -v mkdir /var/log/nginx chown www-data.adm /var/log/nginx chmod 770 /var/log/nginx
Konfiguration RTMP simple
- nginx.conf
TBD
Konfiguration HTTP Live Streaming (HLS)
Achtung: Noch nicht fertiggestellt!
Vorarbeiten
cd /var/www mkdir HLS mkdir HLS/live mkdir HLS/mobile mkdir video_recordings chmod -R 775 video_recordings
- nginx.conf
user www-data; worker_processes 4; pid /run/nginx.pid; events { worker_connections 1024; } http { ## # Basic Settings ## include mime.types; default_type application/octet-stream; ## # SSL Settings ## ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE ssl_prefer_server_ciphers on; ## # Logging Settings ## access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; ## # Virtual Host Configs ## server { listen 80; server_name xxx; # creates the http-location for our full-resolution (desktop) HLS stream # http://my-ip/live/my-stream-key/index.m3u8 location /live { types { application/vnd.apple.mpegurl m3u8; } alias /HLS/live; add_header Cache-Control no-cache; } } } # RTMP Server rtmp { server { listen 1935; allow play all; application live { allow play all; live on; record all; record_path /video_recordings; record_unique on; hls on; hls_nested on; hls_path /HLS/live; hls_fragment 10s; } application vod { play /video_recordings; } } }
Client: OBS-Studio
Build Environment
apt-get install build-essential pkg-config cmake git checkinstall
Benötigte Pakete
apt-get install libx11-dev libgl1-mesa-dev libpulse-dev libxcomposite-dev \ libxinerama-dev libv4l-dev libudev-dev libfreetype6-dev \ libfontconfig-dev qtbase5-dev libqt5x11extras5-dev libx264-dev \ libxcb-xinerama0-dev libxcb-shm0-dev libjack-jackd2-dev libcurl4-openssl-dev
FFMpeg erstellen
apt-get install zlib1g-dev yasm git clone git://source.ffmpeg.org/ffmpeg.git git checkout <version> cd ffmpeg ./configure --enable-shared make -j4 checkinstall --pkgname=FFmpeg --fstrans=no --backup=no \ --pkgversion="$(date +%Y%m%d)-git" --deldoc=yes ldconfig
OBS-Studio erstellen
cd /usr/local/src git clone https://github.com/jp9000/obs-studio.git cd obs-studio mkdir build && cd build cmake -DUNIX_STRUCTURE=1 -DCMAKE_INSTALL_PREFIX=/usr .. make -j4 checkinstall --pkgname=obs-studio --fstrans=no --backup=no \ --pkgversion="$(date +%Y%m%d)-git" --deldoc=yes
Blackmagic DeckLink Mini Recorder
$ lspci 05:00.0 Multimedia video controller: Blackmagic Design DeckLink Mini Recorder Subsystem: Blackmagic Design DeckLink Mini Recorder Flags: bus master, fast devsel, latency 0, IRQ 7 Memory at fdc00000 (32-bit, non-prefetchable) [size=1M] Capabilities: [40] Power Management version 3 Capabilities: [48] MSI: Enable- Count=1/1 Maskable- 64bit+ Capabilities: [58] Express Endpoint, MSI 00
- Download:
Blackmagic_Desktop_Video_Linux_10.8.5.tar.gz
- Auspacken
- Installieren
dpkg -i desktopvideo_10.8.5a4_amd64.deb
Web Portal
Nach einigen Versuchen ist es mir gelungen, mit Video.js einen Stream im Browser darzustellen. Für RTMP wird allerdings von zencdn nachgeladen, da flashbasierend. Das ist natürlich keine schöne Situation, allerdings in Sinne der grundsätzlichen Funktionsfähigkeit erst einmal akzeptabel.
videostreaming.1494510649.txt.gz · Zuletzt geändert: 11.05.2017 13:50 von thooge