Skip to content

Transcoder

Transcoding is essential if you want to:

  • create a multi-bitrate stream
  • change parameters of video — the codec and the bitrate of the stream, the frame size
  • overlay a logo on a video stream

Transcoding implies two steps:

  1. Decoding—a process of decompressing compressed data into a raw format.
  2. Encoding—a process of compressing raw uncompressed data to be sent over the Internet. During encoding, various video parameters, such as resolution, bitrate, and type of compression, are determined.

Both encoder and decoder rely on codec — an algorithm of video and audio compression. A video codec affects file size and image quality. H.264 and AAC are the most commonly used video and audio codecs for live streaming.

Note

Remember that different protocols support different containers and codecs.

Transcoding is a process of decoding the stream, performing modifications to the video or audio parameters of the content, and then re-encoding the stream to be transmitted over the Internet.

Transcoding is commonly referred to as an umbrella term for one or a combination of the following media tasks:

  • Transcoding: a process of changing a video or audio codec, or a type of compression, such as taking MPEG2 video and converting it to H.264 video.
  • Transsizing: a process of resizing a video frame and modifying resolution, such as bringing down 3840×2160 (4K) resolution to 1920×1080p.
  • Transrating: a process of lowering bitrates, without modifying codec or resolution, such as taking a 4K video at 45 Mbps and converting it to 4K at 15 Mbps.

The example below shows how the multi-bitrate stream is created when transcoding a 4K video at 45 Mbps:

Diagram 1. Example of transcoding

Transcoding diagram

Flussonic Media Server has a built-in transcoder. It supports transcoding by using a GPU or CPU.

The transcoder module works with every input source supported by the Flussonic Media Server. The HLS protocol is partially supported — some sources might fail to be transcoded. It is recommended to test each HLS source manually to find out whether it works after transcoding.

For hardware-accelerated transcoding, Flussonic can use Intel and Nvidia solutions. When transcoding with Nvidia NVENC, streams with a 10-bit color depth are supported.

The transcoder seamlessly switches to another source without dropping frames. It is done by keeping the resolution of the original video in the resulting stream. The transcoder converts source video resolutions to be the same and match the value of the size parameter. If the size parameter is not specified, the output video stream resolution matches the resolution of the first video source received at the transcoder input.

Table of contents:

Note

Transcoding is an extremely computationally-intensive process, and it includes the following steps:

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

Depending on the configuration, a single server can process from 5 to 20 channels.

Installing the transcoder

If you use an NVENC-capable Nvidia GPU to perform transcoding, you do not need to install any extra packages to enable transcoding.

If you use the CPU to perform transcoding, you will need the flussonic-transcoder package installed. At default system settings, it is installed along with Flussonic Media Server as a recommended package. If you have disabled installation of recommended packages, install the transcoder package manually:

apt-get -y install flussonic-transcoder

This package can be found in the same repository as the flussonic package.

Configuring transcoder

Transcoder has plenty of options that can be divided into the following main groups:

  1. Global options (applied to all video tracks)
  2. Video encoding options (individual for each video track)
  3. Audio encoding options (applied to all audio tracks)

All the options are described in details in the Transcoder configuration options section.

You can configure transcoder options by one of three ways:

  1. Flussonic web-interface (recommended)
  2. Configuration file
  3. Flussonic API (see API reference)

Configuring transcoder via the web interface

Flussonic web-interface supports setting up the transcoding for both streams and templates.

To set up the transcoder via the Flussonic web interface:

In Media > Streams or Media > Templates > click the stream or template you want to transcode. Then go to the Transcoder tab and click Enable transcoder.

Use the arrows on the right side of the page to expand or collapse groups of settings.

Flussonic transcoder

Audio encoding options

transcoding options

  • Copy from input — select this to get the same audio characteristics as in the input stream.
  • Bitrate — sets the audio bitrate.
  • Codec (aac|opus|mp2a|pcma|ac3) — audio codec (the AAC codec is used by default).
  • Sample rate (bypass|0|8000|16000|32000|44100|48000)
  • Channels — sets the number of audio channels in an output stream.
  • Volume — Output audio volume. It can be a value in dB (with "+" or "-") to be added to the input volume or a coefficient for multiplying the input volume. Learn more at the chapter How to change the volume level.
  • Split channels — select this option if you want to split each audio track with multiple channels into several mono tracks.

Global options

These options apply to all output video tracks.

transcoding options

Device — specifies the transcoding device. For Flussonic Media Server, enables hardware acceleration and specifies the model and ID of the NVENC graphics card. Hardware transcoding allows for more streams to be transcoded on a single server. For Flussonic Coder, specifies the GPU used for transcoding the stream.

To automatically distribute many streams between GPUs, edit the configuration file and add the option deviceid=auto to transcoder for each stream.

Deinterlace — activates deinterlacing mode. Read the detailed description of deinterlace mode here. This field lists the methods available for the selected transcoder type (CPU, Nvidia NVENC, or others).

For Nvidia, this option represents two options in the configuration file (deinterlace and deinterlace_rate) that are used together. There are the following relations between the selected value in the Deinterlace box and the values of the options in the configuration file:

Deinterlace in UI Options in file Nvidia's deinterlace method
off deinterlace=false, deinterlace_rate=frame weave
on deinterlace=true, deinterlace_rate=frame adaptive
on double rate deinterlace=true, deinterlace_rate=field adaptive
adaptive deinterlace=adaptive, deinterlace_rate=frame adaptive
adaptive double rate deinterlace=adaptive, deinterlace_rate=field adaptive

Crop after decoding — with the majority of transcoder types, you can crop the video. Cropping allows you to get only part of the image area in the output stream. There are 4 figures with the following meaning: Crop-X and Crop-Y — the coordinates of the upper left corner of the output video image, as compared to the input image (that is, (0,0) is the upper left corner of the input video image), Crop-Width — the width of the output image, and Crop-Height — the height of the output image.

GOP size — sets the number of frames in a group of pictures (GOP). Learn more here.

Improve the transcoder performance by running it as part of Flussonic (use with caution). By default, the transcoder runs in a separate process from Flussonic: this is a more reliable choice. If you select the option Improve the transcoder performance by running it as part of Flussonic (or specify external=false in the configuration file), the transcoder will run in the same process as Flussonic Media Server. This mode speeds up encoding, especially when encoding audio or when using an Nvidia device. However, a transcoder error may cause Flussonic to crash.

Warning

When transcoding a number of streams on Nvidia NVENC, make sure that the option Improve the transcoder performance by running it as part of Flussonic has the same value for all the streams.

Video encoding options

There are three ways to add a video track settings to the transcoder:

  • Click the button Add video track and (optionally) select a bitrate and height.
  • To get the same output video characteristics as in the input stream, turn on Copy from input.
  • Click Duplicate to add another track with the characteristics of the track that you have specified and want to duplicate.

Besides, you can copy entire transcoder settings to other streams.

transcoding options

After you have added a video track, you'll be able to edit its settings. To expand a track's transcoding settings, click the arrow.

All options are on a single screen:

transcoding options

  • Width — the picture width in pixels on the display where it will be played by a player.
  • Height — the picture height in pixels on the display where it will be played by a player.
  • SAR (X:Y) — the proportion of the video display width. Learn more here.
  • Resize — the strategy of resizing the video to the specified Height (and Width).
  • Background — the color of the area in the player that is not occupied by the video after resizing. It is used only with the 'fit' strategy.
  • Bitrate — specifies the bitrate of the video track.
  • Codec (H.264|H.265|MP2V|AV1) — sets the video codec. The default value is H.264.
  • Profile (baseline|main|high) — A specific codec-dependent profile of the output video. The profile allows to assume if the track can be played on a particular device.
  • Interlace — used to get an interlaced stream from a progressive one. Learn more about the interlace option in here
  • Preset — affects video quality and download speed. Read more about this option here.
  • B-frames — the values 0|1|2|3|4 correspond to these sequences of frames: IP|IBP|IBBP|IBBBP|IBBBBP.
  • Open GOP — 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 GOP size. This option applies only to encoding on CPU and it might help to reduce traffic a little bit.
  • Refs — (reference frames) used in inter-frame compression to refer to frames that follow. For better quality, use more reference frames.
  • Level — used for compatibility with old devices.
  • Logo

To burn a logo into your video stream, specify the path to the file containing the logo and then choose where the logo will appear on the video. To use a single logo file for all output tracks, specify it in Logo, and the transcoder will resize it according to the size of each output video track.

Learn more about logo here.

  • Extended — if the option you would like to add is missing on the screen, add it manually in Extended:

We recommend you to refer to the API reference for the full list of parameters with the relevant descriptions.

Saving or discarding your settings

To save the new values, click Save.

To delete all specified settings and turn off the transcoder for this stream, click Disable transcoder.

Copying the settings to other streams

To copy the settings to other streams:

  1. Go to the Transcoder tab of a stream where you have already configured the transcoder settings
  2. Click the button Copy settings
  3. Go to the Transcoder tab of the stream where you want to apply the same settings and click Enable and paste settings. If the stream already had transcoder configured, the button will be Paste settings.

Configuring transcoder via the configuration file

Transcoding options can be specified in stream settings in the Flussonic configuration file /etc/flussonic/flussonic.conf.

To enable and configure transcoder via the configuration file, use the transcoder directive with a number of transcoder options.

When setting transcoder options, specify them in the following order:

  1. Global options
  2. Video track options (required and optional) for each track
  3. Audio track options (required and optional)

See the example of configuring transcoder for the incoming stream example:

stream example {
  input fake://fake;
  transcoder vb=2048k size=1280x720 preset=slow ab=128k;
}

Here is an example of setting transcoding options to create a multibitrate stream:

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

Transcoder options for anamorphic video

The Flussonic transcoder supports anamorphic video streams by taking the pixel sizes ratio into account. This was possible by giving the size parameter a new interpretation and by adding the new parameter sar.

Learn the detailed description of the options size and sar in the list of transcoder options on this page.

Apart from size, the parameters aspect, force_original_aspect_ratio, and crop were changed:

  • aspect has been replaced with sar. Almost all transcoder types in Flussonic will interpret it as SAR (not DAR), the only exception is Nvidia NVENC.
  • force_original_aspect_ratio is no longer necessary, and, if it is required, it is added automatically.
  • The NVENC-only crop was added to almost all transcoder types in Flussonic (please don’t confuse it with the resizing strategy 'crop').

The transcoder settings that you configured in earlier versions will stay the same and processed as previously. The transcoder processes the parameters in a new way only if you specify new parameters — SAR or the resize strategy (or both) — while no deprecated parameters (force_original_aspect_ratio) were specified.

Hardware transcoding

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

Flussonic Media Server supports the Nvidia NVENC and Intel Quick Sync transcoding technologies.

One video stream can be transcoded using only one type of transcoder.

Read more about hardware transcoding in Hardware Transcoding with Nvidia NVENC and Intel Quick Sync Video.

Transcoder configuration options

The API schema for all transcoding options can be found in API Reference.

Global options:

hw

hw — enables hardware transcoding. This option should be specified separately for each video stream.

deinterlace

deinterlace — activates deinterlacing, i.e., converting an interlaced video to a progressive video.

The interlaced video demonstrates even and odd scan lines as two individual fields. At first, the even lines pass on the screen and then the odd lines pass. Two of such even and odd scan line fields make one video frame. Interlaced videos are great for broadcasting as video images can be processed onto the screen with very little bandwidth. The drawback of interlaced video is that in fast motion, it may be blurred as only half of the image is captured at a time, movement along the frame causes motion artifacts.

Progressive video content shows the even and odd scan lines, that is the entire video frame on the screen at the same time.

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

The UI box Deinterlace corresponds to this option.

deinterlace_rate

deinterlace_rate — when encoding with Nvidia NVENC, you can remove duplicate frames that were produced after deinterlacing, preventing increased bitrate.

  • deinterlace_rate=frame — from field sequence 1a 1b 2a 2b 3a 3b we get frame sequence 1a1b 2a2b 3a3b. The FPS stays the same,
  • deinterlace_rate=field — fields 1a 1b 2a 2b 3a 3b transform into 1a1b 1b2a 2a2b 2b3a frames. The FPS increases two times after transcoding.

In case of using the Nvidia both options (deinterlace and deinterlace_rate) are added in the configuration file when you select some value in the Deinterlace box in the UI. There are the following relations between the selected value in the Deinterlace box and the values in the configuration file:

Deinterlace in UI Options in file Nvidia's deinterlace method
off deinterlace=false, deinterlace_rate=frame weave
on deinterlace=true, deinterlace_rate=frame adaptive
on double rate deinterlace=true, deinterlace_rate=field adaptive
adaptive deinterlace=adaptive, deinterlace_rate=frame adaptive
adaptive double rate deinterlace=adaptive, deinterlace_rate=field adaptive

crop

crop — crops the size of video.

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

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

gop

gop=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.

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.

fps

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

Video options:

vb

vb (video bitrate) — specifies the video bitrate of the 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.

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

Warning

When creating a multi-bitrate stream, we recommend that you don't use vb=copy and the numerical value vb=NUMk together. Otherwise, your viewers can experience issues while playing the video stream, such as glitching or stuttering.

preset

preset — the encoder preset, i.e., a set of values that determine a certain encoding speed, which influences a 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.

The list of supported presets:

  • veryfast
  • medium
  • slow

The default preset is medium.

size

size — the size of output video on the display where it will be shown. The size option now includes width and height (in pixels), the resize strategy (crop, fit, scale), and background color. Thus, you can set the size in one of the ways: size=WxH:fit:#aaFFEE, size=WxH:crop, or size=WxH:scale.

The parameter size now means the size of a playback window on the screen rather than size in pixels. Previously, size was interpreted as pixel size, and the size of the playback window depended on a stream’s SAR or on the value of the aspect parameter.

logo — allows you to overlay a logo. The transcoder adds the logo before the video is resized as specified in the size option. This means that the logo can be visibly stretched if the size was changed significantly.

Learn more about adding a logo

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

vcodec

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), MP2V (MPEG -2 Video File), or AV1. Specify this setting separately for each video stream.

It is not possible to use the MP2V when hardware transcoding.

AV1 is supported for NVENC only.

refs

refs — the number of reference frames. This option should be specified separately for each video stream.

bframes

bframes — specifies the number of B-frames. When set to 0, this option disables b-frames. This may be necessary, for example, when broadcasting to RTSP. Specified separately for each video stream.

sar

sar — modifies video aspect ratio. Used for creating non-anamorphic video from anamorphic video. Has replaced the deprecated aspect but does not copy the old behavior.

SAR in Flussonic's terminology is the ratio of the width of the display representation to the width of the pixel representation of video. The width of the display representation is the number of pixels on the matrix of the display, this is what Flussonic passes to the player for playback. And the width of the pixel (internal) representation is the number of pixels in the original YUV.

In the UI sar appears in advanced video options.

For the transcoder on CPU and Flussonic Coder aspect is now processed as SAR — meaning the proportions of video display. For the transcoder on Nvidia NVENC aspect is interpreted as DAR (the ratio of player window horizontal and vertical sizes) and processed as in earlier versions of Flussonic.

Warning

Aspect ratio modification is not supported when transcoding with Intel QuickSync (the hw=qsv option).

Flussonic calculates the output video resolution based on sar. A video with the internal pixel width of 720 and sar 16:11 will have the display width of 1048. A picture of this width, in display pixels, will appear when the stream is played back in players.

force_original_aspect_ratio (deprecated)

force_original_aspect_ratio=true — keeps the original aspect ratio by adding black bars (letterboxing and pillarboxing.) This option is useful when you want to keep output resolution while switching between sources with different parameters.

disable_cgop

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 gop. This option applies only to encoding on CPU (it is not available on hardware transcoders) and it might help reduce traffic a little bit.

interlace

interlace — is used for making an interlaced stream from a progressive one.

The option takes values: interlace=tff|bff|tff_separated|bff_separated|mbaff|true

When the option is not specified in the config, the output stream is progressive. If you enable this option without specifying the encoding method (that is, if you specify as follows — interlace=true), then for producing interlaced video Flussonic will use the default method (the default method depends on the transcoder type). You can also specify another supported method.

  • tff — interlaced, top field first, interleaved field store. This method is used with hw=qsv, nvenc.
  • bff — interlaced, bottom field first, interleaved field store. This method is used with hw=qsv, nvenc.
  • tff_separated — interlaced, top field first, separated fields. This method is used with hw=qsv.
  • bff_separated — interlaced, top field first, separated fields. This method is used with hw=qsv.
  • mbaff — interlaced libx264 MBAFF method. This method is used only with hw=cpu.
  • true — enables encoding into interlaced video by using the default method for the encoder specified (mbaff is the default method for hw=cpu, tff is the default method for hw=qsv, hw=nvenc).

rc_method

rc_method is used for creating output video with constant bitrate suitable for broadcasting to television networks.

The option takes values:

  • rc_method=cbr — the encoder will produce a DVB-C compliant stream.
  • rc_method=vbr — do not encode a stream to be DVB-C compliant.

As for now, using this option consumes resources (one CPU core for one MPTS stream with CBR).

Audio options:

ab

ab — sets the audio bitrate. This option should be specified only once, even if there are several audio tracks. The value must always end with k.

acodec

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

ar

ar — sample rate.

ac

ac — the number of audio channels.

avol

avol — output audio volume. It can be a value in dB (with "+" or "-") to be added to the input volume or a coefficient for multiplying the input volume. Learn more at the chapter How to change the volume level.

split_channels

split_channels — if this option is set to true, each audio track with multiple channels will be split into several mono tracks.

Burning text, time, and subtitles

Settings

You can specify the burning settings in one or both of the following ways:

  • As a global setting. This corresponds to transcoder.global.burn parameter in the API schema (placed before all vb in the config file). The text, time, or subtitles burned this way will be added to all tracks resulting from the transcoder.
  • As a setting of a particular video track. This correspond to transcoder.video.burn API parameter (placed after corresponding vb parameter in the config file). The text, time, or subtitles burned this way will be added for that one track only. Track setting overrides the global setting.

General syntax for the burn option:

burn=<filter>@<text:pos:x:y>@font:<ttf:size:color:alpha>@box:<border:color:alpha>

Here:

  • filter — time|sub|text
  • text — subtitles track (for example t1) for sub, text (for text), %T or %F or their combination (for time).
  • text:pos:x:y — pos — position letter (see below), x:y — offset to the right or left (x) and up or down (y) to the center of the screen. The offset cannot be negative.
  • font: — ttf — font file TTF, color — font color, alpha — opacity (use values from 0.1 to 1.0, 0.0 — completely transparent, 1.0 — completely opaque).
  • box: — border — the padding from the border of the box to the text in it, color — box color, alpha — opacity (use values from 0.1 to 1.0, 0.0 — completely transparent, 1.0 — completely opaque).

Short version of the burn option:

  • burn=time displays the time in the default format
  • burn=sub displays WebVTT subtitles from track t1
  • burn=text displays an empty string (later you can set the text using the API)

Rules:

  • The first group of parameters (<filter>) is required, other groups are optional (text, font, box).
  • The first parameter in each group is required (text, font, box).
  • The order of the parameters must be observed.
  • Missing parameters will be replaced with default values: size — 16, color — black for box, white for font, border — 6, alpha — 0.8, ttf — FiraCode-Regular.ttf
  • You can use several burn options of a different type (for example, burn=text and burn=time), but not the same type twice for the same track.

Below is a detailed description with examples.

burn=time

burn=time — burns the clock time. You can optionally specify time offset relative to the time of the Flussonic server, offset=0 by default.

You can customize the display of time by setting the font (font) and position on the screen (box) — see Text display settings.

Configuration examples:

  • burn=time@offset+3 — shows the time in the default format YYYY-MM-DD HH:MM:SS and in the timezone +3 hours relative to the Flussonic server time.
  • burn=time@%Toffset-3:tr@box — shows the time in the format HH:MM:SS in the timezone -3 hours (relative to the Flussonic server time) in a dark box in the upper right corner (tr = top right).
  • burn="time@%F -- %Toffset-2:c@font:FiraCode-Regular.ttf:26:green:0.8@box:yellow:12:0.6" — shows the time in the format YYYY-MM-DD -- HH:MM:SS and in the timezone -2 hours in the center of the screen, in FiraCode-Regular type and in a yellow box.

burn=sub

burn=sub — burns subtitles (dvb_teletext, dvb_subtitles or closed captions).

It is required first to extract subtitles and convert them to text in order to pass them to the transcoder for burning. For example, if the stream contains closed captions, use the option cc.extract.

You can customize the display of subtitles by setting the font (font) and position on the screen (box) — see Text display settings.

Option example:

burn="sub@t1:cb:10:10@font:Arial-Regular.ttf:30:white:1.0"

Here:

  • sub — indicates that Flussonic will take subtitles (dvb_teletext, dvb_subtitles or closed captions) from the input stream and burn them into the output stream.
  • t1 — the number of a track containing WebVTT subtitles.
  • cb (central bottom) — the location of subtitles.
  • 10:10 — horizontal and vertical shift to the center relative to the specified location.
  • font:FONT_NAME.ttf — the font. See the notes about font below the example.
  • 30 — the font size.
  • white — the font color.
  • 1.0 defines the text transparency (use values from 0.1 to 1.0, 0.0 — completely transparent, 1.0 — completely opaque).

Example for a stream that contains closed captions:

stream example {
  input udp://239.0.0.1:1234 cc.extract;
  transcoder vb=3000k burn="sub@t1:cb:0:80@font:default:35:white:1.0" vcodec=h264 open_gop=false preset=veryfast size=1920x1080:scale:#000000 vb=1800k burn="sub@t1:cb:0:80@font:default:25:white:1.0" vcodec=h264 open_gop=false preset=veryfast size=-1x720:scale:#000000 ab=128k;
}

In this example, we extract closed captions by using the option cc.extract. You may need to use other options instead of this one.

Note

Depending on what kind of subtitles your input stream contains, use the corresponding options to extract them to text format.

burn=text

burn=text — burns the specified line of text.

You can customize the display of the text line by setting the font (font) and position on the screen (box) — see Text display settings.

Option example for burning a text to a specific track:

transcoder vb=3500k burn=text@Hello:tr@box:green ab=64k;

Font

  • Flussonic supports .ttf font files.
  • Flussonic looks for the specified font file in the subdirectory font of the /etc/flussonic/ directory. This means you can place the font file like /etc/flussonic/font/SomeFont.ttf
  • If the font file specified is missing in /etc/flussonic/font/, the default FiraCode-Regular.ttf font will be used, which is included in Flussonic.
  • You can specify the full path to a font file. Make sure you put the font file in the directory you specified. For example, let's specify the path to one of the system fonts:
font:/usr/share/fonts/truetype/freefont/FONT_NAME.ttf:50:white:1.0"
  • You can explicitly specify the default font: font:default:30:white:1.0. Flussonic will use FiraCode-Regular.ttf. However, if you copy any font file named default into the fonts directory /etc/flussonic/font/, Flussonic will use that file.

Examples:

font:default:50 — the default font with size 50

font:default:24@box — the default font with size 24 in a box with default dimensions

font:default:26:blue — the default font with size 24 and color blue

font:default:26:blue:0.9 — the default font with size 24 and color blue and 0.9 opacity (use values from 0.1 to 1.0, 0.0 — completely transparent, 1.0 — completely opaque).

Location

Additionally, you can specify the location on the screen where the data will be displayed.

  • tl — top left
  • tr — top right
  • bl — bottom left
  • br — bottom rigth
  • c — center
  • ct — center top
  • cb — center bottom

Together with these location abbreviations, you can specify the horizontal and vertical offsets from the specified location:

  • cb:10:200 — the text will be centered at the bottom of the frame with offsets x=10 (right) and y=200 (up)
  • Offsets are 10 by default. Offsets can be positive integers or 0.

Example:

burn=time@%F:cb:0:200@font:default@box — time in the format YYYY-MM-DD centered at the bottom of the frame and with an offset of 200 upwards.

Note

For processing and displaying fonts, Flussonic uses the libfreetype library, which is included in the set of libraries provided in the flussonic-transcoder-base package. To render text in the CPU and Nvenc transcoders, the ffmpeg drawtext filter is used.