Video assets with large or uncompressed video data can be transcoded as small files for the web and other devices.
Introduction
FFmpeg transcoder includes a multi-threading support and support of more than a hundred video codecs.
It is licensed under LGPL (Lesser GPL). Problems arise when using additional codices such as X.264, which brings better results, but is under GPL and therefore cannot be used together with Censhare.
For moderate use cases, FFmpeg is sufficient as the only encoding solution. Depending on size and other characteristics the of video data you must think early enough about scalability and possibly operate FFmpeg on separate machines using one or more Censhare Service Clients. With its default settings, FFMpeg can easily consume over 7 percent of the CPU even on a quad-core i50 CPU.
Additional licensing costs might apply for commercial use depending on the application, for example: MPEG LA.
Steps
The following configuration will use FFmpeg for any kind of tasks, including video preview, still images, etc.
Alternatively, compile it yourself from the latest source code. Link to the Git repository can be found through the third-party provider website.
Clone Git repo censhare-Product to some place, e.g, your local machine.
Either in the Web or Java Client, find the “Import assets” server action
Import the available FFmpeg presets from the Server installation folder censhare-Server/install/assets/optional/preset-ffmpeg
In the Admin Client, go to Configuration → Services → Video: FFmpeg → General setup
Enable the service
In the Special setup section, specify if you want to use the Service Client to outsource the load to another “physical” server
In the Admin Client, go to Configuration → Modules → Video: FFmpeg → Video conversion (automatic)
Under General setup, select Enabled.
Under Trigger events-> Asset events, select at leastCreate asset, Rebuild video preview, Rebuild preview, Save and Close.
Optionally, select any other events that should trigger the transcoding.
Under Asset filters → Search, add the following condition to the filter:
(Currversion = "0") and (Deletion state = "Not deleted") and (State = "Available") and (Type = "video")
Under Special setup, select the presets and output file types.
Confirm your edits with OK. A custom configuration is created under "Configuration/Module/FFmpeg" below the default configuration.
To activate your edits, click Update server configuration on the toolbar of the censhare Admin Client.
Default FFmpeg presets and possible changes to them
Censhare comes with a few default presets. Those have proven to work well with the Censhare Web. Default presets can (but better should not) be modified and/or used as templates for your custom presets. The first line in each XML file can be used in a CLI tool (e.g., Terminal) for local testing of the new presets.
Please refer to the third-party documentation for the exact meaning of the parameters in the XML configuration.
If you want to adjust the number of simultaneous threads used by FFmpeg, you can add this line to the preset XML:
If you want to use another transcoder in parallel (e.g., for still images), this can be achieved by using a stricter asset filter (e.g., by adding a domain to it) and/or by combining this filter with only specific events. You will need to create separate configurations for each use case.
The same can be done if you want to use one transcoder for different use cases as you can only apply one filter per configuration.