April 6, 2015

RTMP playback support in Nimble Streamer

From the time of its wide adoption, RTMP played an important role in media streaming. Along with Flash player, it opened online video capabilities for huge audience of developers and consumers. This protocol is still the best option when it comes to real-time streaming as it has the least latency among other technologies. It is also used as a fallback for HLS, HDS, SmoothStreaming or DASH when it comes to platforms which do not support these protocols. Thus people keep using this protocol and we need to provide best user experience in streaming.

Nimble Streamer team has added RTMP streaming support for playback and pull for scenarios when Nimble has RTMP stream as an input. Both published and pulled RTMP sources are supported.






Follow the steps described below to get RTMP output.


1. Install Nimble Streamer


Use this installation instruction to get Nimble on your server or desktop.

To take RTMP streams for transmuxing, you need to specify available sources. After that Nimble will pick them up and start producing streams for immediate use.

Go to Nimble Streamer -> Live Streams Settings menu. Here you have 2 possible scenarios:

  • get published RTMP streams;
  • pull RTMP streams.

2. RTMP setup


You may combine both scenarios and process both types of incoming streams to get outgoing streams.

Published streams setup


Go to Global tab. These are global server settings. These are as follows.
  • Default chunk duration used for outgoing streams.
  • Default chunks count for the playlist or manifest - this is used for HLS and DASH.
  • Protocols which will be produced - you can generate all 6 supported types or just one of them, it does not affect the performance much.
  • Push login and password for published streams - they will be used by default for published streams but can be overridden by individual apps settings.
Global RTMP setting for Nimble server instance.

You may also define individual applications' settings. Go to Applications tab to add new apps. Each app has the same set of fields as Global server settings.

Individual applications' settings.
New application settings.

You may apply new application settings to several Nimble servers instances. Just click on the checkboxes with their names in the dialog - the setting will be applied to each server within a few seconds.

To make Nimble Streamer capable of getting published RTMP streams, it needs to listen to a specific interface - address and port. Go to Interfaces tab and click on Add RTMP interface.

Interfaces list.


You'll see a dialog for specifying an address and a port to listen to. You may leave IP address blank, in this case Nimble will listen to all IP addresses available.

You may also apply new settings to multiple servers to convenience of administration.

Adding new interface to process RTMP publishing.

If you have only published streams, then you can move to "RTMP Flash playback setup" section.

Pulled streams setup


If your streaming content is available via public URL RTMP streams, you may pull them into Nimble instances for further transmuxing. To make proper settings, go to Live pull settings tab. 

Pulled RTMP streams list.


There you click on Add RTMP URL button to see new dialog for adding new stream to transmux. There you enter:
  • URL - the address of RTMP stream.
  • Fallback URLs - if you have multiple sources of the same stream, you may specify them to make robust streaming, so if main stream goes down, secondary streams could be used.
  • Application and stream are the the names which will be used for DASH stream URL.
As already mentioned in other settings, you may apply this setting to multiple servers - just click on the checkboxes with their names. Also you can use advanced RTMP pull settings to specify incoming RTMP streams. Please read the Processing RTMP and RTSP pull streams per request article for details.

New pulled RTMP stream settings.


Once it's saved, you'll see it in settings list.

New stream in the list.


The output streams will be served via protocols which are set up in server global or application settings.
E.g. if you've set up "live" app individual settings in "Applications" tab and set it to produce RTMP and HLS, then pulled streams will be processed to produce RTMP and HLS.

Now the RTMP outgoing streams will be produced as soon as the incoming stream arrives. Those streams might be played as well as pulled by other media servers (e.g. Nimble, Wowza, Red5 etc).

Configure RTMP Flash playback latency


By default, Nimble Streamer doesn't produce RTMP stream having the minimum possible latency in order to provide smooth playback in case of unstable network conditions for streaming server. If the server has stable incoming live stream, then rtmp_buffer_initial_offset parameter can be used to control playback latency.

To do that, open Nimble configuration file and set
rtmp_buffer_initial_offset = 0
then re-start Nimble Streamer instance. This will make Nimble Streamer to serve most recent frame for playback and therefore provide the lowest possible latency. You can try different non-negative integer values to determine which one suits best for your case.

Using outgoing streams


Having incoming streams defined and processed, you may now use the results of Nimble Streamer work for streaming your content via the protocol which you selected in global or application settings.

Click on Outgoing stream area on a chart or Outgoing link on top of the setup area. You will see all streams that are currently processed and ready for usage. Each stream has
  • status, 
  • names of servers which have this stream running, 
  • stream name for playback URL,
  • video and audio parameters and options,
  • link for getting playback URL - it's a question mark icon.

Available outgoing streams list.
To use the outgoing stream for playback, click on question mark icon to see Sample URL for player dialog. Here you see selectors for playback links for protocols which you defined for this server in global settings. You will also be able to watch it in one of pre-defined players and get respective player code. Players list depends on the protocol selected.



Providing RTMP streams allows settings up various scenarios from playback to live media delivery between origins and edges. The delivery case is a good addition to RTMP re-publishing feature set which uses stream publishing rather then stream pulling.

If you need to change content parameters, like change the bitrate for creating ABR playback, use our Live Transcoder for Nimble Streamer to transform. It has high performance and low resource usage.



RTMP playback is also working fine with hotlink protection, geo-restriction and other features from our Paywall framework. You may also consider using RTMP streaming API to control it remotely.


Related documentation


Live Streaming features in NimbleLive Transcoder for Nimble StreamerRTMP feature setRTMP re-publishingRTMP streaming control APIWMSPanel paywallRTSP interleaved playback supportBuild streaming infrastructure with Nimble Streamer

No comments:

Post a Comment