This was all done on a Debian Linux server.
Install speedtest-cli by:
sudo easy_install speedtest-cli
That gives you a one-line command to run up/down tests via speedtest.net. To hit a specific server, check the main list at https://www.speedtest.net/speedtest-servers.php and provide the ID to test against:
speedtest-cli --server 123
You'll need to compile NGINX yourself. If this server will be doing nothing else, it's better to uninstall the repo version and just use the setup for streaming.
sudo apt-get install build-essential libpcre3 libpcre3-dev libssl-dev
wget http://nginx.org/download/nginx-1.13.1.tar.gz
wget https://github.com/arut/nginx-rtmp-module/archive/master.zip
tar -zxvf nginx-1.13.1.tar.gz
unzip master.zip
cd nginx-1.13.1
./configure --with-http_ssl_module --add-module=../nginx-rtmp-module-master
make
sudo make install
That will build a version of nginx with rtmp support enabled. To use it, edit the local nginx config file:
sudo nano /usr/local/nginx/conf/nginx.conf
Remove the http block (if you're doing this single-purpose) and setup a RTMP block:
rtmp {
server {
listen 1935;
chunk_size 4096;
allow publish 127.0.0.1;
deny publish all;
application live {
live on;
record off;
push rtmp://[...];
}
}
}
The push directive will be the full URL to the ingest server, including your stream key.
Save that, then invoke your custom-built nginx:
sudo /usr/local/nginx/sbin/nginx
To stop the server, run:
sudo /usr/local/nginx/sbin/nginx -s stop
The URL to stream to will be:
rtmp://[ip address]/live
The stream key can be "test", or anything else.
If you want to monitor traffic in a very simple way:
sudo apt-get install bwm-ng
bwm-ng
It neatly shows Rx/Tx on all interfaces.