General
This page will guide you through the best practice to ensure optimal quality when encoding video to playback on our servers.
Supported codecs
Our media servers can decode the following video codecs :
- MPEG-2
- H.264 : See our guide to encode in H.264
- HAP : See our guide to encode in HAP
- Apple ProRes
- NotchLC : See our guide to encode in NotchLC
H264 requires more CPU resources from the server to decode but produces smaller video files.
Apple ProRes is another reasonably good option for a direct workflow, presents very good video quality and is less intensive to decode than H.264. It also supports 10-bit color depth and an alpha channel.
NotchLC is supported from Modulo Kinetic v5 and up, also decompresses using graphic hardware and supports 10-bit.
Scan mode
If your servers are connected to displays refreshing at 60Hz, you should encode ideally in 60p or at least in 30p.
If your servers are connected to displays refreshing at 50Hz, you should encode ideally in 50p or at least in 25p.
Compression
Note: The following paragraph applies to MPEG-2 and H.264 codecs only.
For optimal playback quality and resource management, video files should be encoded using a Constant Bit Rate (CBR) instead of a Variable Bit Rate (VBR).
The target bit rate should be set by considering how many video files will be played simultaneously, which codec is being used (optimal bit rates per codec are listed below), and which target quality is required.
The ideal bitrate also depends on your file resolution and scene complexity: the higher the resolution, the more necessary it is to increase the bitrate to maintain a certain level of quality.
Take into consideration that during a crossfade, both files will be loaded and decoded simultaneously. (For example, a server playing 4 videos that fade into 4 other videos simultaneously on its outputs is actually decoding 8 videos during the transition.)
If your show plays few videos that are high in resolution, a high bitrate can be used.
On the other hand, if your show plays many HD files simultaneously, it is preferable to use a lower bitrate.
Audio
For audio playback, your tracks must be a separate media and both media (video and audio) should be present in your timeline.
Refer to the Audio recommendations page for more information on which Audio codecs are supported.
Codec specific recommendations.
MPEG-2
Containers : mpg, mpeg, m2v, mp2, etc.
Files should be compressed with a constant bitrate preferably between 10 and 40 Mb/s.
H.264
Containers : .mp4 or .mov only
Files should be compressed with a constant bitrate preferably between 5 and 40 Mb/s.
The maximum resolution is 4096 × 2304 pixels. If your media is larger, you will need to split it in several media.
We recommend using a High Profile and Level 5.1 (or 5.2).
H.264 are generally considered to have the same quality as MPEG-2 files at half the bit rate.
For reference, Blu-ray H264 media are usually encoded with a maximum bitrate of 15 Mb/s.
HAP
Container : .mov
HAP comes in different variations:
- HAP : Standard HAP. Reasonable image quality
- HAP Alpha : Reasonable image quality with an Alpha Channel
- HAP Q : Higher quality at a higher bit rate but also higher encode times and larger files.
- HAP Alpha Q : Higher quality with alpha channel.
- HAP R : Files comparable to HAP Q but with even higher quality. Very long encode times.
Bitrates are determined by selecting an encoder speed/quality level. Refer to the section below to guide you through encoding media in HAP.
HAP media are larger in file size but require less resource to decode than H.264 media.
Apple ProRes
Container : .mov
Modulo Kinetic natively supports the Apple ProRes 4:2:2 codec
NotchLC
Container : .mov
Modulo Kinetic supports the NotchLC codec from version 5 and up.
Encoding in H.264
In After Effects CC 2023
To export your media via After Effects CC, select the composition you would like to export and proceed through the following steps:
1. From the Top Menu select File > Export > Add to Adobe Media Encoder Queue
This should open Adobe Media Encoder if it is not already open.
In Adobe Media Encoder CC 2023
2. Select your media in the queue list and open the Export Settings.
Under the Export Settings tab set the following properties:
3. Select the H264 codec (Be careful not to use the Quicktime format with the H264 codec).
Under the Video Settings tab set the following properties:
4. Set the Profile
to High and the Level
to 5.1 or 5.2.
5. Set the Framerate
to 60 or 50 according to your displays refresh rate (see above) and the Field Order
to progressive.
6. Set the Bitrate
to CBR and set a value for the Target bitrate
Encoding in HAP
To encode your media in HAP we recommend you use the Jokyo Adobe Media Encoder Plug-in (also exists as a stand-alone Jokyo HAP Encoder).
If you are essentially encoding media created in Adobe After Effects, Joyko recommends that you use the Jokyo Adobe After Effects Plug-in as exporting your media to Adobe Media Encoder results in longer encoding times.
Alternatively, you can also look into the After Codecs plug-in.
In Adobe Media Encoder CC 2023
In the Export Settings window, proceed through the following steps:
1. Under the Export Settings tab, set the Format
to Jokyo Hap Encoder
2. In the Video Settings tab, set the Width
and Height
to your desired resolution and select the Framerate
according to your displays.
Keep the Pixel Ratio
at 1.0 unless you have a specific reason to encode otherwise.
3. Set the Codec
to the type of HAP that you would like to use.
4. Set the Speed/Quality
to the setting that you wish to use.
There are three options, and they have no incidence on playback and decoding, they only differ in encode times vs overall output quality:
- Fast: Fastest encode time, lowest quality. Use this setting for your draft exports.
- Normal: Average encode time and average quality.
- Slow: Longest encode time, best quality. Use this setting for your final exports.
Concerning Snappy Compression
Activating Snappy compression adds a second lossless stage of compression by using the fast and non-destructive Snappy algorithm.
Each frame is divided into chunks to be compressed and these chunks will be sent to the CPU for decompression during playback before the full frame is pushed to the graphics hardware.
If the total number of chunks being decoded at any given time exceeds the number of threads your CPU can handle this will result in queuing in the CPU’s pipeline and too much queuing will eventually slow down overall decoding.
Using snappy compression will give better results in file-size reduction on computer-generated images (such as animations) than on film video files captured using cameras.
Activating snappy compression is entirely up to your personal appreciation and is not mandatory when using HAP codecs. If you choose to use Snappy Compression, prefer a lower number of chunks for media destined to playback on our media servers.
Encoding in NotchLC
To encode your media in NotchLC you must first download their plugin for Adobe Creative Cloud.
In Adobe Media Encoder CC 2023
In the Export Settings window, proceed through the following steps:
1. Under the Export Settings tab, set the Format
to NotchLC (DirectX)
2. In the Video Settings tab, set the Width
and Height
to your desired resolution and select the Framerate
according to your displays.
The Quality
option gives you different options to optimize encode times vs quality. We recommend you use the Best quality setting for your final renders.
You can also tick the Include Alpha Channel
option if your media contains an Alpha Channel to use in your project.
Conserving an alpha layer with MPEG-2 and H.264 codecs
It is possible to maintain an alpha channel with codecs that do not natively support an alpha channel by duplicating your composition and using the second composition to code only the alpha-related information. Then in Modulo Kinetic the inverse operation is applied and the second composition is used as an alpha mask on the first composition.
Follow the procedure below to do this in Adobe After Effects CC.
In After Effects CC
1. After exporting your composition, re-import it back into After Effects and apply the following effects : Effect > Channel > Channel Combiner
2. Set the Source From
to Alpha
3. Set the Target To
to Lightness
4. Add this second (alpha) composition to the Adobe Media Encoder Render Queue and export it with the same parameters as the first (rgb) composition.
In Modulo Kinetic
Follow the next steps to configure Alpha transparency in Modulo Kinetic :
1. Import the files in RGB and Alpha mode.
2. Place a background media under all other layers in the timeline.
3. Place the second (alpha) composition in the middle in the timeline. Set the Mask
to Grey.
4. Place the first (rgb) composition on top in the timeline.
Need more help with this?
Don’t hesitate to contact us here.