Started from Alex Balk's (abalk200_comcast) diffstub project. Special thanks to Alex Giladi (Comcast) for contributing concepts and solutions to the project. Code contributions from Erik Ponder (eponde494_comcast) and Jovan Rosario (jriver829_comcast)
This is a standalone NGINX C++ module for generateting an RF5261 (https://datatracker.ietf.org/doc/html/rfc5261) compliant MPED-DASH patch from 2 MPD files. This uses the PugiXML library to generate patch files. This software is in a development phase where features are being added and tested, and it may not be stable or feature-complete.
https://github.com/MPEGGroup/DASHSchema/blob/5th-Ed-AMD1/DASH-MPD.xsd
- C++ 11
- NGINX 1.18.0 ~ (Only tested with Ubuntu 20.04)
- DASH.JS (Nightly Build) - (HTTP only) http://reference.dashif.org/dash.js/nightly/samples/dash-if-reference-player/index.html
- Shell Environment to execute scripts (LOCAL)
ship_to_server.sh
- Runs locally, Ships source code to external serverrun_on_server.sh
- Run on server. Compiles module and starts nginx
-
In VSCode
- Run Build task (ctl/cmd + shift + B) -> "C/C++: Build Test File"
- Run Tests with the "Run DIFFSTUB Tests" run configuration
-
Command Line:
-
Compile tests with:
g++ -std=c++11 -g test_ngx_diffstub_internal.cpp diffstub_xml_node.cpp ngx_diffstub_internal.cpp -o test_ngx_diffstub_internal
-
Run Tests:
./test_ngx_diffstub_internal
-
-
ORIGIN:
- Download and extract NGINX 1.18.0 source code to home directory ~
cd ~ wget http://nginx.org/download/nginx-1.18.0.tar.gz tar -zxvf nginx-1.18.0.tar.gz
-
LOCAL:
- Export the following ENV vars
export $ORIGIN_HOST=<YOUR_ORIGIN_HOST_IP> export $ORIGIN_SSH_PORT=<ORIGIN_SSH_HOST_PORT> export $ORIGIN_USER=<ORIGIN_USER> # e.g. ubuntu
OR Edit
ship_to_server.sh
with your origin servers user, ip, and port.- Execute
ship_to_server.sh
:
./ship_to_server.sh
-
ORIGIN:
- Copy the
nginx_diffstub.conf
to/etc/nginx/nginx/conf
, or add the required lines to existing conf. You can usenginx_diffstub.conf
for reference
sudo cp nginx_diffstub.conf /etc/nginx/nginx.conf
-
***IF NGINX Source is installed in a different location than home (~), Edit
run_on_server.sh
. -
Execute
run_on_server.sh
. This will compile the diffstub module and start nginx
./run_on_server
- To Stop:
sudo service nginx stop
- Copy the
-
DASH.JS
- Open Nightly Build: http://reference.dashif.org/dash.js/nightly/samples/dash-if-reference-player/index.html
- Enter Origin IP and MPD location and 'load'
- Only Supports HTTP streams (no DRM)
- Hardcoded TTL/Patch Headers
- Issue with Adding nested elements (i.e. adding a new element that contains grandchildren, currently WIP but incomplete)
- Issue with multiple directives (add/rem/rep) on a single element (Not Implemented)
- Does not provide legitimate error responses.
NOTE: Failing test cases have been disabled for now