So I would like build this workflow:
I used name “Server” PC and “Encoder” PC for my hosts.
STEP 1: Download (link) and install the RTMPMiniServer. RUN IT.
STEP 2: press START
Note: if you got error message “Port 1935 not available” then change port in Settings
STEP 3: open Preview window
STEP 4: Open any RTMP-encoder. I use OBS on macOS: go to Settings —> Stream: select Custom service and type server and stream key.
STEP 5: press Start Streaming and your encoder starts send RTMP feed to RTMPMiniServer. So let’s go to “Server” PC for check result.
On “Server” PC I got this result:
RTMPMiniServer converts incoming RTMP feed to NDI.
So just open any NDI software (vMix, OBS, Wirecast etc) and select NDI source called “MiniServer A- Line 1”.
For example I use “NDI Studio Monitor” from NewTek tools:
Every Line has params:
Stream Key – type any value (latin chars and digitals). Use it for encoders vMix, OBS etc.
Input FPS – this field is tip for server. You can use “auto” value. Also you can explicit setup this field if you known this info.
Ignore Audio – use it if you don’t need audio from this source. It allows remove video-audio synchronisation process and save CPU and time.
Start Delay (ms) – use it for setup start delay. Recommended for use for unstable network – you can add start buffer for more smoothly output. For example if you setup 5 seconds then server starts NDI output only when will has video frames for 5 seconds.
This value should be less or equals to Max.Delay value.
Max.Delay (ms) – use it for limit delay. All input frames go to special buffer and if buffer is full then frame will be dropped. For good network you can setup to 200ms for get real-time output.
Be aware: delay feature uses buffer in RAM. For example FullHD/25fps will takes ~100Mb in memory for each 1second of delay. So delay for 10 sec requires 1Gb RAM.
Record – use it for dump input feed. By default record saved to user-video folder. For change destination folder see settings.
Notes: you can change this fields on fly (without Stop server). The server will applies new values for next connection to this line.
When encoder (vMix, OBS etc) connects to the server then Line shows “green”-icon and info about processing (this values updates every 3 seconds) :
decoded fps – shows info about decoded fps. For good network it should be same as input fps. For unstable network this value will be jumped.
in buffer – shows how many frames wait output in buffer. It depends on “Max.Delay” value.
bitrate – shows info about input bitrate.
Buttons:
Disconnect – use it for stop stream. After disconnect the server will ready accept new connection for this line.
Reset buffer – use if for drop all frames from buffer. It allows got real-time.
NDI OFF – use if for pause NDI processing.
Decoder : this field allows change h264-decoder for handle input video stream.
Software decoder– good choice for bitrate under 10Mbs. It allows correct decode all h264 profiles.
Hardware decoder allows decrease CPU usage but more sensitive to h264 profiles. Use HW decoder for hight speed bitrate for get real profit. Be aware: some HW decoders allow only 1 or 2 decode process in same time (it depends on hardware).
HW: video tools – good choice for macOS user.
HW: dxva2 – Windows way for use HW (uses D3D9 video functionality)
HW: d3d11va – other Windows way for use HW (uses D3D11 video functionality)
Max.threads: how many threads can be allocated for decoding one feed. For example 2 means only two threads will be allocated for decoding input feed. Zero means automatically detected.
Force BirdDog Compatible: check this if you plan use hardware BirdDog NDI decoder.
Explanation: NDI allows use different color space (RGB, I420, NV12, UYVU) . But BirdDog NDI decoder accept only one – UYVU. So this option force on converting to UYVU color space.
Notes: you can change this fields on fly (without Stop server). The server will applies new values for new connections.
Listen Port – TCP port. Default is 1935. Need restart server after change.
Lines – how many lines will the app shows.
By default the app uses “auto” for “Input FPS”. This means the app tries auto detect fps for incoming streaming. If the app do this incorrect then result will be wrong.
Please check “input fps” info during process. It should be same as original FPS.
SOLUTION: if you see incorrect detection (for example 30 instead 25 ) then please setup “Input FPS” manually to correct value.
For example: encoder sent 20Mbs stream but Studio has 10Mbs connection only.
You can see real incoming bandwidth in “bitrate” value during processing.
If “bitrate” value less than it should be (for example 316 Kbs for 5Mbs of original stream) then it means your connection not enough for incoming stream.
SOLUTION: change bitrate setup on encoder-side or call to ISP
Sometimes connection speed can be jumped. Please check “decoded fps”. For good streaming “decoded fps” should be about “input fps”.
For example: if “input fps” is 30fps then “decoded fps” can be jump between 28-32.
If you see “decoded fps” jumps very hard then it means connection is unstable.
SOLUTION: increase Start Delay.
“Start Delay” fills out special buffer before star NDI output. This buffer allows smooth out jumping incoming feed.
Note about “Max Delay”: you can setup it as “Start delay” + 1000.
So for this image full stream address for Line #1 is:
rtmp://amst.rtmpminiserver.com:10025/live/streamkey1ABC
NOTES: ProxyAddon is easy way, but usage of dedicated IP is still preferred way for big studio and heavy traffic.
What is cons and pros of usage proxy addon?
Cons – you don’t need dedicated IP and port-forwarding setup. It’s perfect for using for mobile studios.
Pros – this workflow has 3 participants: Publisher–> Proxy-server –> Studio
instead 2 participants for direct connection (Publisher–>Studio)
Where are located proxy servers ?
Now we are providing few public proxy nodes in Europe.
Can I deploy my proxy server?
Yes, you can deploy proxy node on your server and it’s very easy.
For example you can rent VPS from DigitalOcean or Scaleway or AWS and deploy proxy node. Many cloud providers allow hour-rate so you can turn on server only for event. See this guide.
Our Studio in USA has dedicated IP and we happy with RTMPMiniServer. What is advantage of proxy addon we can get?
You can get advantage if your publisher in other country. Proxy node allows solve the “first mile” issue. More detailed explanation see here.
If you have not public IP or have not ability for port-forwarding then please use other way – ProxyAddon
for accept direct connections from INTERNET (for example from stadium or other country) please check this points:
please read this post about checking.
Example A: you install RTMPMiniServer on PC with local ip 192.168.1.5 and setup Listen port as 1935.
So you need setup port forwarding for router: inbound connection to 1935 port send to 192.168.1.5:1935.
Example B: you install RTMPMiniServer on PC with local ip 192.168.1.5 and setup Listen port as 7777.
So you need setup port forwarding for router: inbound connection to 1935 port send to 192.168.1.5:7777.
Many routers called this feature as “Port Forwarding” or “Virtual Servers”.
Examples:
Step 1
Run RTMPMiniServer and press Start
Step 2
Go to this site https://www.yougetsignal.com/tools/open-ports/
and type your address and port.
In my case it’s mg926.rtmpminiserver.com and 1935
And press Check.
If you have closed port or RTMPMiniServer stopped then you got fail:
docker pull garaninapps/rms_proxy
docker run -p=8080:8080 -p=8082:8082 -p=10000-10100:10000-10100 --env ALLOW_PORT_STICK=ON --restart=always -d garaninapps/rms_proxy
Notes:
About “sticked” port
Since version 1.7.2 you can fix used port. For example you can use 10055 always. Just type your custom server as IP:10055
We add “Buffer” to smooth out the situation. Buffer is place where frames will be ordering before go to NDI output.
Start delay – how many frames should be waited before start NDI output.
If you setup it to 1000ms then it means 25 frames for 25fps or 30 frames for 30fps.
Max. delay – how many frames allows be in buffer. You can setup to 2000ms. So it means buffer can accommodate 50 frames for 25 fps stream.
If 51 frames will be arrive at moment (because network may be “jump”) then frame number 51 will be dropped.
Common recommendation: for unstable network use Start Buffer at least 1000ms and use Max.Buffer as “Start + 2000ms” (at least).
Go to top menu –> Tools –> Remote Control. It opens “Remote Control” window.
Remote Control starts lite web-server and you can use browser for monitoring RTMPMiniServer.
Listen IP: tells the server to listen for incoming connections on this IP address. If value is 0.0.0.0, the server will listen on all network interfaces.
For example: If value is 127.0.0.1 then the server allows connection from localhost only.
Web Port: port for listening.
Secret Key: it’s like password. Use any alpha-numeric value.
Remote Control server provides simple web API. So you can read info.
NOTES: example of usage see at INSTALLED_FOLDER/WEB/code.js
Common params:
any requests should includes params “tick” and “sign”.
tick: any integer value. Should be growth: next request value greater previous value. You can use timestamp for this.
sign: md5 hash from string “tick:secret_key“
NOTES: if secret key is empty then you can omit tick and sign params, but be aware – it’s not good practice.
GET /api/v1/read
returns info about lines as JSON:
[ line_info, line_info….]
where line_info is
{
line – int , line number
state – string , NOTACTIVE|DISABLE|WAIT|CONNECTED
decode_fps – int,
in_buffer – int,
bitrate – int,
decoder_type – string, HW|SW,
source_fps – int,
start_buffer – int,
max_buffer – int,
frame_width – int,
frame_height – int,
ignore_audio – bool,
record – bool
}
POST /api/v1/_LINE_NUM_/disconnect
example: /api/v1/1/disconnect
call disconnect for line with _LINE_NUM_.
Trial version has few limitations: