Skip to content

DVR replication

Flussonic Media Server offers the automatic replication of an archive of a video stream between servers. Replication implies that a DVR (Digital Video Recorder) archive is stored on two or more Flussonic servers.
After establishing a connection between a source and a target server, the target server automatically uses the missing video from the source.

Not to interrupt a live broadcast or reduce its quality, the target server can limit the total speed of replication. Replication of a large archive can take up server bandwidth for a long time or overload the disk subsystem, leading to a denial of service.

Replication is used in the following cases:

  • To copy an archive to other servers with automatic recovery after failures for reliability.
  • To broadcast with a time shift in another time zone with reliable automatic delivery of a missing video.

You can replicate all streams or a certain stream from the source server.

Replicate all streams

To replicate all streams from the source server to the target server, specify the source directive with the replicate option in its DVR settings in the target server configuration:

cluster_key abcd;
source source-server:8081 {
  dvr /storage 20d replicate;

Replicate one stream

To replicate a certain stream from the source server to the target server, follow these steps:

  1. Create a new stream on the target server and in the input specify the required stream from the source via M4F or M4S input m4f://.
  2. Specify the required archive depth. The target server will replicate the archive from the source server according to this value.
  3. In the target server, add the replicate option to the DVR settings of the stream.

Source server stream configuration:

stream fake {
  input fake://;
  dvr /storage 7d;

Target server stream configuration:

stream repl_example1 {
  input m4f://source-server:8081/fake;
  dvr /storage 7d replicate;

In the example, the source server connects to the stream source, and the target server replicates the archive from the source server.


Don't use the dvr_offline option, which turns off the recording, instead of dvr because the replicate option enables recording automatically.


Replication works with the Flussonic protocol—M4F. Use M4F when transmitting video between Flussonic servers. You can read more about the benefits of the M4F protocol here.

Replication port

By default, replication is enabled on the port specified when configuring the M4F source. To prevent channel from overloading and your service from failing, you can specify a separate port for replication. To do that, follow these steps:

  1. In the target server, specify the port number in the replication_port parameter next to the replicate option in the stream settings:

stream repl_example2 {
  input m4f://streamer:8081/fake;
  dvr /storage 7d replicate replication_port=8002;

  1. Specify the same port number in the source server settings, using the http option http REPLICATION_PORT_NUM.

See also: