Flussonic Media Server documentation

Mixer

Flussonic Media Server can create a new stream which uses other streams as its video and audio sources. In this article, we will explore how to add a mixer stream that takes video from a surveillance camera and audio from an internet radio broadcast.

Adding a mixer stream Anchor Anchor x2

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

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

where:

  • 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 only works with streams that have already been added to Flussonic Media Server. Only streams can be used as data sources in the mixer:// directive, not VOD files or data source URLs.

Example use Anchor Anchor x2

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.

stream cam1 {
  url rtsp://cam1.local/h264;
}

You may wish to disable the sound coming from this source:

stream cam1 {
  url rtsp://cam1.local/h264 tracks=1;
}

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

stream cam1 {
  url rtsp://cam1.local/h264;
}
stream radio {
  url shout://example.com/fm;
}
stream cam1radio {
  url mixer://cam1,radio;
}

Here, we have made 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 may also wish to archive the original video and audio using the DVR feature:

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