> For the complete documentation index, see [llms.txt](https://docs.dbnetsoft.com/dbnetsoft/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dbnetsoft.com/dbnetsoft/screenspro/controls/videoelementffmpeg.md).

# VideoElementFfmpeg

This control uses FFMPEG as render component and can therefore render many codecs found in virtually any video.

In the designer it is added as **Advanced Video**. The control used to be called `VideoElement2`; that name no longer exists, so a layout still using it has to be changed to `VideoElementFfmpeg`.

## Setup

For this to work, you need to do the following steps once:

1. Download version 4.x of FFMPEG shared libraries from [Github](https://github.com/BtbN/FFmpeg-Builds/releases?q=\&expanded=true).\
   [Direct Download Link](https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2024-03-11-12-57/ffmpeg-n5.1.4-6-g9bf90b1260-win64-lgpl-shared-5.1.zip)
2. Extract only the `bin` folder to a location on your disk, e.g. c:\ffmpeg
3. In ScreensPro Server enter the path in File - Settings - RenderManager - FfmpegPath:

<figure><img src="https://2559612140-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrJ4OFsK3ODNU79IRd1WF%2Fuploads%2FpDRMzHrGCMNYlqMGMsoi%2Fimage.png?alt=media&amp;token=c360d127-56a9-4440-aa1e-157c740779d3" alt="" width="375"><figcaption></figcaption></figure>

When the path is not set or does not exist, an error is written to the log as soon as the element is created.

## Properties

| Name               | Type    | Description                                                                        |
| ------------------ | ------- | ---------------------------------------------------------------------------------- |
| `Filename`         | String  | Either a full path to a video or a filename relative to the current XAML layout.   |
| `Source`           | String  | A full path or an `http` address of a video. `Filename` is used when both are set. |
| `Path`             | String  | The path to the video in case `Filename` is a relative path.                       |
| `Extension`        | String  | The extension used when `Filename` does not contain one.                           |
| `LoopVideo`        | Boolean | Starts the video again once it has ended. Default `false`.                         |
| `AbsoluteFilename` | String  | Read-only. The full path or address the properties above resolve to.               |

`LoopVideo` is read once while the element is being created, so it is set in the layout rather than changed while the layout is running.

## Playback

The video is opened and starts playing when the layout goes into preview, and the player is released when the layout is taken off air. Every time the video ends, the element raises its finished event, which a sequence can react to. Failures and every change of the playback state are written to the log.
