Skip to content

Mixer

Flussonic Media Server can create a new stream that uses other streams as its video and audio sources. This chapter demonstrates how to add a mixer stream that takes video from a surveillance camera and audio from an internet radio broadcast.

Adding a mixer stream

Create a new stream and specify the mixer:// schema and two streams as its source. The first stream will provide video, the second one — audio:

stream mix {
    input mixer://stream1,stream2;
}

Here:

  • stream1 is the name of the live stream that will provide the video track.
  • stream2 is the name of the live stream that will provide the audio track.

Warning

The mixer works only with streams that have already been added to Flussonic Media Server. The only data sources you can use in the mixer:// directive are streams, and not VOD files or data source URLs.

Usage example

Imagine you have a video stream from a surveillance camera which has been installed on a tall pole. The audio isn't useful, because the only thing you can hear is the wind.

You might wish to disable the sound coming from the source:

stream camera {
  input fake://fake;
}
stream silent {
  input rtsp://localhost/camera tracks=1;
}

Alternatively, you can create a new stream with video from the camera and audio from another source using the mixer.

stream origin {
  input fake://fake;
}
stream cam1 {
  input rtsp://localhost/origin tracks=1;
}
stream radio {
  input shout://localhost/origin/shoutcast;
}
stream cam1radio {
  input mixer://cam1,radio;
}

Flussonic stream mixing

You have created a cam1radio stream, which replaces the audio coming from the camera with an internet radio stream. Viewers will be able to listen to the radio while watching the video stream, which may be useful during emergency situations.

You can also archive the original video and audio using the DVR feature:

stream cam1 {
  input rtsp://cam1.local/h264;
  dvr /storage 7d;
}