Flussonic Media Server documentation


Transcoding is necessary if you want to:

  • create a multi-bitrate stream
  • to change parameters of video — the codec and the bitrate of the stream, the size of the image
  • to overlay a logo.

Flussonic Media Server has a built-in transcoder.


The following protocols are supported: RTMP, RTSP, MPEG-TS (over HTTP and UDP).

The HLS protocol is partially supported - some sources may fail to be transcoded. Please test manually for each individual HLS source whether this source is working after transcoding.


Transcoding is an extremely resource-intensive CPU-based process and it includes the following steps:

  1. Decoding of the source stream.
  2. Processing and encoding of the raw stream according to the specified parameters.

Depending on the configuration, the number of channels per server may vary between 5 and 20.

Installing the transcoder Anchor Anchor x2

Install the flussonic-ffmpeg package from the same repository as the flussonic package.

apt-get -y install flussonic-ffmpeg

Configuring transcoding of a stream Anchor Anchor x2

The transcoder parameters are set as a text string in the configuration file /etc/flussonic/flussonic.conf or in the administrative web interface.

Important! To activate the transcoder it is important to follow the sequence of options. First, you specify all video parameters, then global options, and then audio options. In the examples below, we show the correct order of options.

In the config file /etc/flussonic/flussonic.conf

Transcoder options

The transcoder for the incoming stream in the /etc/flussonic/flussonic.conf configuration file is included as follows:

stream ort {
  url  udp://;
  transcoder vb=2048k size=1280x720 preset=fast ab=128k;

Do not forget to apply new configuration via command: /etc/init.d/flussonic reload

In the administrator interface

To enable the transcoder via the Flussonic Media Server administrative interface:

  • In the «Media» menu, select the channel you want to set up transcoding.
  • Go to the «Process» tab.
  • In the «Option for transcoding» line enter the options in the format like this vb=2048k size=1280x720 preset=fast ab=128k
  • Click «Save».


Examples of stream transcoding parameters Anchor Anchor x2

The following examples are illustrated with pictures where groups of settings are colored in different colors:

  • blue – required parameters of video encoding
  • yellow – required parameters of audio encoding
  • white – optional parameters.

Example of settings one stream:

Transcoder parameters

vb=2048k preset=fast ab=128k

Examples of configuring multi-bitrate stream parameters:

Transcoder new


vb=2048k preset=fast vb=700k size=720x576 preset=fast vb=300k size=320x240 preset=fast ab=128k

Transcoder price


vb=copy vb=1600k size=1280x720 preset=fast vb=400k size=640x480 preset=fast ab=copy

Options Anchor Anchor x2

Video options:


vb (video bitrate) — specifies the video bitrate track. It is specified as a numerical value (1000k, 1500k, 2000k, etc). The value must always end with k. Each vb option creates a new video track in the output stream.


vb=2048k ab=128k

The option vb=copy saves the parameters of the original stream, that is, it is simply copied to the outgoing stream.


preset — same as encoder preset in ffmpeg. Affects the quality and download speed. Specified separately for each video stream. The default value is medium.


vb=2048k preset=fast ab=128k

Read more about presets below.


size — video size. Specified separately for each video stream.


vb=2048k size=1280x720 ab=128k


logo — allows you to overlay a logo. The transcoder adds the logo before the video was resized with the size option.


vb=2048k size=1280x720 logo=/path/to/file.png@10:10 ab=128k;

Learn more about the logo overlay settings below.


alogo — allows you to overlay a logo. The transcoder adds the logo after the video was resized with the size option. This prevents the logo picture from stretching that might occur when the logo option is used. You will need to prepare a separate file with a logo for each size of resulting video.


vb=2048k size=1280x720 alogo=/path/to/file.png@10:10 ab=128k;

Learn more about the logo overlay settings below.


vcodec — allows you to set the video codec. the default value is H.264. Flussonic Media Server allows you to encode in H.265 (hevc) or mp2v. Specify this setting separately for each video stream.

The mp2v codec is not supported with hardware transcoding.


vb=2014k vcodec=mp2v ab=128k


fps — frame rate. Specified separately for each video stream.


vb=2048k fps=25 ab=128k


deinterlace — activateS deinterlacing. Deinterlacing is necessary for comfortable viewing of TV on PC / mobile devices. It is specified once and acts immediately on all video streams.


vb=2000k deinterlace=1 ab=128k


refs — the number of reference frames. Specified separately for each video stream.


vb=2000k refs=6 ab=128k


bframes — disables B-frames. This may be necessary, for example, when broadcasting to RTSP. Specified separately for each video stream.


vb=2000k bframes=0 ab=128k


hw — enable hardware transcoding. Specified separately for each video stream.


vb=2048k hw=nvenc ab=128k


crop — crop video. Available only with hardware transcoding: hw=nvenc. Specified separately for each video stream.

Usage: crop = x: y: width: height:

  • x:y — is the coordinates of the upper-left corner of the output video within the input video.
  • width — output video width.
  • height — height of the output video.


vb=2048k hw=nvenc crop=0:0:100:100 ab=128k


aspect — modifies video aspect ratio. Specify this setting separately for each video stream.

Important! Aspect ratio modification is not compatible with the hw=qsv option.


vb=2048k hw=nvenc aspect=12:5 ab=128k


force_original_aspect_ratio=true — keeps an original video aspect rate by adding black pads. This option is useful when you want to keep output resolution while switching between sources with different parameters.


vb=2048k size=1280x720 force_original_aspect_ratio=true


g=150 — sets the number of frames in a GOP. The encoder will create all GOPs of an exactly identical size — as specified in this option.


vb=2048k fps=25 size=1280x720 g=150

If you use encoding on CPU, you can use the disable_cgop option in addition to this option. It allows the transcoder to vary the GOP size slightly.


disable_cgop=1 — allows an open GOP, meaning that the transcoder will divide an output stream into GOPs with slightly different number of frames, but close to the number specified in g. This option applies only to encoding on CPU (by contrast to hardware transcoders) and it might help to reduce traffic a little bit.


vb=2048k fps=25 size=1280x720 g=150 disable_cgop=1

Any ffmpeg options for video

For example -profile:v high -level 4.1 in Flussonic config would look as follows: profile=high level=4.1.

Audio options:


ab — sets audio bitrate. Specify it only once, even if there are several audio tracks. The value must always end with k.


vb=2048k ab=128k


acodec — sets an audio codec. Accepts the following values: ac3, mp2a. By default all audio tracks are encoded with AAC.


vb=2014k vcodec=mp2v ab=128k acodec=mp2a


ar — sample rate.


vb=2014k ab=128k ar=44100


ac — the number of audio channels.


vb=2014k ab=128k ac=1

Hardware transcoding Anchor Anchor x2

You can significantly increase the number of transcoded streams on the server by using a hardware transcoder.

Flussonic Media Server supports Nvidia NVENC and Intel Quick Sync Video.

Read more about hardware transcoder here.

Adding a logo Anchor Anchor x2

Flussonic Media Server can add a logo to your video:



vb=2048k preset=fast logo=/path/to/file.png@10:10 ab=128k

10:10 are the coordinates of the top left corner of the screen.

To place the logo in another part of the screen a slightly more complex formula should be written.

To place the logo in the center:

vb=2048k preset=fast logo=/path/to/file.png@(main_w-overlay_w-10)/2:(main_h-overlay_h-10)/2 ab=128k

To place the logo in the bottom left corner:

vb=2048k preset=fast logo=/path/to/file.png@10:(main_h-overlay_h-10) ab=128k

To place logo in the top right corner:

vb=2048k preset=fast logo=/path/to/file.png@(main_w-overlay_w-10):10 ab=128k

To place the logo in the bottom right corner:

vb=2048k preset=fast logo=/path/to/file.png@(main_w-overlay_w-10):(main_h-overlay_h-10) ab=128k

Important! Flussonic Media Server supports adding a logo only with the CPU and NVENC encoders.

Preset option Anchor Anchor x2

Preset is a collection of options that will provide a certain encoding speed to compression ratio. A slower preset will provide better compression (compression is quality per file size).

This means that, for example, if you target a certain file size or constant bitrate, you will achieve better quality with a slower preset. Similarly, for constant quality encoding, you will simply save bitrate by choosing a slower preset.

Use the slowest preset that you have patience for. There are following values: ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow, placebo. The default value is medium.

placebo is not very helpfull, ignore it.