- Version: 0.7
- Authors:
- Git: https://github.com/terabit-software/dynamic-stream-server
- Wiki: https://github.com/terabit-software/dynamic-stream-server/wiki
- License: BSD
- Contact: [email protected]
This software is being developed at the Laboratório de Computação Paralela e Sistemas Móveis (Compasso) - Federal University of Rio de Janeiro (COPPE/UFRJ).
Dynamic Stream Server (DSS) is a tool to manage video streams on a server using RTMP to unify them. After your streams are published on the RTMP server, they can be served over HTTP with Apple HLS or MPEG-DASH besides RTMP.
DSS uses Nginx and the Nginx RTMP module to provide reliable video streams over HTTP and RTMP and FFmpeg to provide transcoding capabilities. For metadata storage (like geotagging), MongoDB is needed.
DSS also provides a sytem to publish mobile streams using MPEG-TS over HTTP (generated currently only on Android devices).
Usage:
-
Compile or install FFmpeg latest version or from git master. Latest versions have much better RTMP support. Versions older than 1.0 may not work well (or not work at all). Libav is not supported.
Requirements:
- librtmp
Optional (for best results):
- libx264
- libfdk_aac
-
Nginx with Nginx-rtmp-module:
Download both projects and follow the instructions on README page of the latter.
- Nginx 1.0 or newer (or whichever the other recommends).
- Nginx-rtmp-module 0.9 or newer (older versions had a bug that did not tell when users stopped viewing the RTMP stream).
-
A MongoDB service must be running for some parts of the program to work.
-
This program will not work on Python versions older than 2.6. Do not try to use.
For best results, use Python 3.2 or newer. The multithreading support makes the program run much faster.
Both CPython and PyPy are supported. Other Python interpreters are untested, but may work.
-
This file will install several python modules.
If you do not want the modules installed globally, or you do not have root permissions, create a virtualenv first.
Run this command (as root if installing globally):
$ python setup.py develop
Replace
python
if you want another interpreter, e.g.:python3
,python3.3
,pypy
-
Copy the content of
www
directory to the directory where you want to serve your files. You may also setnginx
to serve directly from this place to avoid the need to copy those files later when the project is upgraded. See below. -
Replace the Nginx configuration file
nginx.conf
installed with your system or add the missing data from thenginx.conf
provided with this project. Change the paths as needed. -
Start
nginx
and verify that it is running. -
If you pretend to change configurations from
dss/global.conf
(and you probably should), create a file namedlocal.conf
in the same place and set only the variables you want to change. E.g, to set the base directory to save files, add this to the file:[general] base_dir = /some/path/dynamic-stream-server
To understand all options, read the Configuration wiki page.
-
Add your stream providers (optional): If you want to pull streams from various sources, you'll need to add "Providers". Read the guide for Provider Configuration.
-
With Nginx running, start the server. If you want to listen on TCP ports < 1024, run it as root.
$ python server.py
Replace
python
if you want another interpreter, e.g.:python3
,python3.3
,pypy
-
Windows Support:
The project should also work on Windows and the Nginx-rtmp-module is known to compile as of version 1.0.1.
You may have to replace
exec_play
andexec_play_done
toon_play
andon_play_done
respectively onnginx.conf
and remove the call tocurl
.You should change all the paths on
local.conf
andnginx.conf
to be compliant with Windows.