![]() |
MainConcept MPEG-H Encoder Plug-in for FFmpeg 3.2.0
|
The following briefly describes how to use the MainConcept MPEG-H Encoder plug-in for FFmpeg.
The command line format should follow the structure below, depending on which operating system you are using.
ffmpeg <ffmpeg-params> \ -c:a omx_enc_mpegh \ -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_mpegh.audio \ -omx_param "<mc-general-params>" \ <ffmpeg-output-parameters> \
Below is a basic command-line example:
ffmpeg -i Audio_input_MPF_16ch.wav -c:a omx_enc_mpegh -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_mpegh.audio -omx_param "usecase=streaming:profile=baseline:profile_level=level_4:bitrate_settings_mode=automatic_high_bitrate:rap_interval=2048" 524943577_ffmpeg_output.mpegh -y
/opt/mainconcept/ffmpeg-omx/bin/
. Ensure this folder is in your search path for the following examples.ffmpeg <ffmpeg-params> \ -c:a omx_enc_mpegh \ -omx_core libomxil_core.so -omx_name OMX.MainConcept.enc_mpegh.audio \ -omx_param "<mc-general-params>" \ <ffmpeg-output-parameters> \
Below is a basic command-line example:
ffmpeg -i Audio_input_MPF_16ch.wav -c:a omx_enc_mpegh -omx_core libomxil_core.so -omx_name OMX.MainConcept.enc_mpegh.audio -omx_param "usecase=streaming:profile=baseline:profile_level=level_4:bitrate_settings_mode=automatic_high_bitrate:rap_interval=2048" 524943577_ffmpeg_output.mpegh -y
The following FFmpeg options are mapped from the command-line to the MainConcept MPEG-H Encoder:
FFmpeg option | Usage example |
---|---|
bit_rate | -b:a 192k |
All settings below are optional parameters for omx_param (mc-general-params):
Function | Description |
---|---|
usecase | Preset configuration and output format for the MPEG-H Audio encoding use-case. |
input_metadata_type | Production Meta Data (PMD) type to be used for MPEG-H Audio encoding. |
pmd_preset | Selection of PMD presets that can be specified when choosing pmd_preset for input_metadata_type . |
pmd_loudness_levels | Loudness level in LKFS according to ITU-R BS.1770-3 for selected PMD preset. |
pmd_content_languages | Language code(s) defined in ISO 639-2. |
profile | MPEG-H encoding profile. |
bitrate_settings_mode | Bitrate setting mode for the main MPEG-H Audio Stream (MHAS). |
profile_level | MPEG-H 3D Audio level as defined in ISO/IEC 23008-3. |
rap_interval | Controls the RAP (Random Access Point) distance in milliseconds. A value of 0 disables RAPs. RAPs are required for streaming purposes and seeking. |
fallback_mode_behavior | Channel layout to be used in Fallback mode. |
fallback_mode_bitrate | Total bitrate (in kbps) of the Fallback mode bitstream. |
fallback_mode_loudness_level | Loudness level in LKFS of the Fallback mode bitstream according to ITU-R BS.1770-3. |
-omx_core omxil_core.dll
, you need to specify -omx_core libomxil_core.so
on Linux.ffmpeg -i Audio_input_MPF_16ch.wav -c:v omx_enc_mpegh -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_mpegh.audio ffmpeg_output.mpegh
ffmpeg -i Audio_input_MPF_16ch.wav -c:a omx_enc_mpegh -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_mpegh.audio -omx_param "profile=baseline" ffmpeg_output.mpegh
ffmpeg -i Audio_input_MPF_16ch.wav -c:a omx_enc_mpegh -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_mpegh.audio -omx_param "profile=lc" ffmpeg_output.mpegh
ffmpeg -i Audio_input_MPF_16ch.wav -c:a omx_enc_mpegh -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_mpegh.audio -omx_param "rap_interval=2048" ffmpeg_output.mpegh
ffmpeg -i Audio_input_MPF_16ch.wav -c:a omx_enc_mpegh -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_mpegh.audio -omx_param "usecase=streaming" ffmpeg_output.mpegh
ffmpeg -i Audio_input_MPF_16ch.wav -c:a omx_enc_mpegh -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_mpegh.audio -omx_param "bitrate_settings_mode=maximum_total_bitrate" ffmpeg_output.mpegh
ffmpeg -i Audio_input_MPF_16ch.wav -c:a omx_enc_mpegh -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_mpegh.audio -omx_param "bitrate_settings_mode=bitrate_per_signal" ffmpeg_output.mpegh
ffmpeg -i Audio_input_MPF_16ch.wav -c:a omx_enc_mpegh -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_mpegh.audio -omx_param "bitrate_settings_mode=automatic_medium_bitrate" ffmpeg_output.mpegh
ffmpeg -i Audio_input_MPF_16ch.wav -c:a omx_enc_mpegh -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_mpegh.audio -omx_param "bitrate_settings_mode=automatic_high_bitrate" ffmpeg_output.mpegh
ffmpeg -i Audio_input_MPF_16ch.wav -c:a omx_enc_mpegh -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_mpegh.audio -omx_param "profile_level=level_1" ffmpeg_output.mpegh
ffmpeg -i Audio_input_MPF_16ch.wav -c:a omx_enc_mpegh -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_mpegh.audio -omx_param "profile_level=level_2" ffmpeg_output.mpegh
ffmpeg -i Audio_input_MPF_16ch.wav -c:a omx_enc_mpegh -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_mpegh.audio -omx_param "profile_level=level_3" ffmpeg_output.mpegh
ffmpeg -i Audio_input_MPF_16ch.wav -c:a omx_enc_mpegh -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_mpegh.audio -omx_param "profile_level=level_4" ffmpeg_output.mpegh
ffmpeg -i Audio_input_MPF_16ch.wav -c:a omx_enc_mpegh -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_mpegh.audio -omx_param "usecase=streaming:profile=lc:profile_level=level_4:bitrate_settings_mode=automatic_high_bitrate:rap_interval=2048" ffmpeg_output.mpegh
ffmpeg -i Audio_input_MPF_16ch.wav -c:a omx_enc_mpegh -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_mpegh.audio -omx_param "usecase=streaming:profile=baseline:profile_level=level_3:bitrate_settings_mode=automatic_high_bitrate:rap_interval=2048" ffmpeg_output.mpegh
ffmpeg -i Audio_input_MPF_16ch.wav -vn -c:a omx_enc_mpegh -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_mpegh.audio -y -omx_param "input_metadata_type=ct" ffmpeg_output.mpegh
ffmpeg -i Audio_input_MPF_16ch.wav -vn -c:a omx_enc_mpegh -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_mpegh.audio -y -omx_param "input_metadata_type=pmd_preset" ffmpeg_output.mpegh
ffmpeg -i Audio_input_MPF_16ch.wav -vn -c:a omx_enc_mpegh -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_mpegh.audio -y -omx_param "input_metadata_type=pmd_preset:pmd_preset=cicp_2:pmd_loudness_levels=-5.0:pmd_content_languages=eng" ffmpeg_output.mpegh
ffmpeg -i Audio_input_MPF_16ch.wav -vn -c:a omx_enc_mpegh -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_mpegh.audio -y -omx_param "input_metadata_type=pmd_preset:pmd_preset=cicp_2:pmd_loudness_levels=-5.0,-2.0:pmd_content_languages=eng,deu" ffmpeg_output.mpegh
ffmpeg -i Audio_input_MPF_16ch.wav -vn -c:a omx_enc_mpegh -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_mpegh.audio -y -omx_param "fallback_mode_behavior=cicp_6:fallback_mode_bitrate=128000:fallback_mode_loudness_level=-5.0" ffmpeg_output.mpegh
ffmpeg -i Audio_input_MPF_16ch.wav -vn -c:a omx_enc_mpegh -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_mpegh.audio -y -b:a 196000 -omx_param "bitrate_settings_mode=maximum_total_bitrate" ffmpeg_output.mpegh
ffmpeg -i Audio_input_MPF_16ch.wav -vn -c:a omx_enc_mpegh -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_mpegh.audio -y -b:a 64000 -omx_param "bitrate_settings_mode=bitrate_per_signal" ffmpeg_output.mpegh
ffmpeg -i Audio_input_MPF_16ch.wav -vn -c:a omx_enc_mpegh -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_mpegh.audio -y -omx_param "bitrate_settings_mode=automatic_medium_bitrate" ffmpeg_output.mpegh
The MainConcept MPEG-H Encoder plug-in for FFmpeg comes with the following encoder settings and parameters that can be specified on the command-line using -omx_param
.
usecase
streaming:
Preset for all MP4-based workflows, such as MMT/ROUTE or MPEG-DASH/HLS streaming.streaming
, the rap_interval
parameter is set to 1024 by default.input_metadata_type
ct:
Use the PMD from the Control Track for encoding. The Control Track - created by an MPEG-H authoring tool - is an audio signal that comes with the modulated PMD. It is the last signal fed into the encoder, e.g. when you have an input stream or broadcast environment with a maximum of 16 audio channels or signals, the Control Track would always be present in the last, i.e. 16th signal. The Control Track is always strictly tied to its accompanying audio content, i.e. the information is specific to this specific audio footage.pmd_preset:
Use a PMD preset for encoding. If no Control Track is available or delivered on the ingest side for encoding, a fixed PMD preset can be applied. You can select a preset using the pmd_preset
parameter.pmd_preset
pmd_preset
for input_metadata_type
.cicp_1:
Basic preset for CICP loudspeaker layout index 1 according to ISO/IEC 23091-3 (mono); Num streams: 1; Num required loudness levels: 1 (Program loudness in LKFS according to ITU-R BS.1770-3); Optional: 1 content language.cicp_2:
Basic preset for CICP loudspeaker layout index 2 according to ISO/IEC 23091-3 (stereo); Num. streams: 1; Num required loudness levels: 1 (Program loudness in LKFS according to ITU-R BS.1770-3); Optional: 1 content language.cicp_6:
Basic preset for CICP loudspeaker layout index 6 according to ISO/IEC 23091-3 (5.1); Num streams: 1; Num required loudness levels: 1 (Program loudness in LKFS according to ITU-R BS.1770-3); Optional: 1 content language.cicp_12:
Basic preset for CICP loudspeaker layout index 12 according to ISO/IEC 23091-3 (7.1); Num. streams: 1; Num required loudness levels: 1 (Program loudness in LKFS according to ITU-R BS.1770-3) Optional: 1 content language.cicp_13:
Basic preset for CICP loudspeaker layout index 13 according to ISO/IEC 23091-3 (22.2); Num streams: 1; Num required loudness levels: 1 (Program loudness in LKFS according to ITU-R BS.1770-3); Optional: 1 content language.cicp_15:
Basic preset for CICP loudspeaker layout index 15 according to ISO/IEC 23091-3 (10.2); Num streams: 1; Num required loudness levels: 1 (Program loudness in LKFS according to ITU-R BS.1770-3); Optional: 1 content language.cicp_16:
Basic preset for CICP loudspeaker layout index 16 according to ISO/IEC 23091-3 (5.1p4); Num streams: 1; Num required loudness levels: 1 (Program loudness in LKFS according to ITU-R BS.1770-3); Optional: 1 content language.cicp_19:
Basic preset for CICP loudspeaker layout index 19 according to ISO/IEC 23091-3 (7.1p4); Num streams: 1; Num required loudness levels: 1 (Program loudness in LKFS according to ITU-R BS.1770-3); Optional: 1 content language.pmd_loudness_levels
pmd_content_languages
profile
baseline:
Bitstream is compliant with MPEG-H 3D Audio Baseline profile. This is the preferred profile in use today.lc:
Bitstream is compliant with MPEG-H 3D Audio Low Complexity profile with channels and objects only. Backward compliant with Baseline profile (e.g. flagged "LC@L3", "BL@L3").bitrate_settings_mode
maximum_total_bitrate:
This option allows you to set a user-defined total bitrate that should be used for encoding. The actual bitrate value needs to be specified separately via the b:a
parameter.bitrate_per_signal:
This option allows you to set a user-defined bitrate per mono signal, e.g. setting a bitrate per signal of 48000 bps will lead to a total bitrate of 96000 bps for stereo and a total bitrate of 288000 bps for 5.1 content. The actual bitrate value needs to be specified separately via the b:a
parameter.automatic_medium_bitrate:
Using this parameter, the actual, optimum bitrate will be chosen and set to the medium value automatically by the encoder. See Typical Loudspeaker Layout Bitrates for more information.automatic_high_bitrate:
Using this parameter, the actual, optimum bitrate will be chosen and automatically set to the maximum value by the encoder.profile_level
level_1
level_2
level_3
(default)level_4
rap_interval
fallback_mode_behavior
cicp_1:
Sets the fallback mode channel layout to 1.0 (Mono)cicp_2:
Sets the fallback mode channel layout to 2.0 (Stereo)cicp_6:
Sets the fallback mode channel layout to 5.1fallback_mode_bitrate
fallback_mode_loudness_level
This appendix contains information on the following:
The following is an overview of the MPEG-H current minimum/maximum total bitrates and the automatic bitrates for the most significant loudspeaker layouts.
Loudspeaker layout | Minimum bitrate (bps) | autoMedium bitrate (bps) | autoHigh bitrate (bps) | Maximum bitrate (bps) |
---|---|---|---|---|
Mono | 32000 | 48000 | 64000 | 128000 |
Stereo | 48000 | 64000 | 96000 | 256000 |
5.1 | 96000 | 160000 | 224000 | 768000 |
7.1 | 128000 | 224000 | 288000 | 1024000 |
5.1 + 4H | 160000 | 256000 | 320000 | 1280000 |
7.1 + 4H | 192000 | 288000 | 384000 | 1536000 |
22.2 | 372000 | 512000 | 768000 | 3072000 |
FFmpeg does not yet support MPEG-H 3D Audio multiplexing (e.g. into MP4), so it must be carried out in a separate post-processing step.
Currently, multiplexing to MP4 file format is supported by the MP4Box packager that comes with the GPAC open source multimedia framework. You can download and install it from the GPAC website (https://gpac.wp.imt.fr/downloads/). Once installed, you can run MP4Box from the command-line to multiplex your video and audio Elementary Streams to MP4 as follows:
mp4box -add ffmpeg_16ch_output.mpegh+Germany_vs_Brazil_2014_hdr.vvc "Semi_Final_2014_hdr.mp4"