MainConcept HEVC/H.265 Decoder Plug-in for FFmpeg 3.1.0
HEVC/H.265 Decoder plug-in usage

The following briefly describes how to use the MainConcept HEVC/H.265 Decoder plug-in for FFmpeg.

The command line format should follow the structure below, depending on which operating system you are using.

On Windows

ffmpeg <ffmpeg-params>\
-c omx_dec_hevc\
-omx_core omxil_core.dll -omx_name OMX.MainConcept.dec_hevc.video\
-omx_param_dec "<mc-codec-params>\
<ffmpeg-output-parameters>

The following is a sample command line:

ffmpeg -c omx_dec_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.dec_hevc.video -omx_param_dec "preview_mode=lv2" -i source.h265 output.yuv -y

On Linux

Note
The command line examples below are Windows specific. To run examples on Linux, you must slightly modify them. Instead of -omx_core omxil_core.dll, you need to specify -omx_core libomxil_core.so on Linux.

ffmpeg <ffmpeg-params>\
-c omx_dec_hevc\
-omx_core libomxil_core.so -omx_name OMX.MainConcept.dec_hevc.video\
-omx_param_dec "<mc-codec-params>\
<ffmpeg-output-parameters>

The following is a sample command line:

ffmpeg -c omx_dec_hevc -omx_core libomxil_core.so -omx_name OMX.MainConcept.dec_hevc.video -omx_param_dec "preview_mode=lv2" -i source.h265 output.yuv -y 

omx_param_dec parameters (mc-codec-params)

All settings below are optional parameters for omx_param_dec parameters (mc-codec-params)

Function Description
omx_param_dec Specifies parameters from the HEVC/H.265 decoder on the command line. Use : as a separator and = as a value set for the key, e.g.

-omx_param_dec "smp_mode=0: preview_mode=off: async_io_mode=1"

These arguments match the MainConcept HEVC/H.265 Decoder settings.
See Parameters for more information.
acc_mode Specifies whether you want to use software ("sw"), Intel Quick Sync Video ("iqsv") or NVIDIA NVDEC ("nvdec") decoding. IQSV and NVDEC are GPU decoding modes.

On Windows, you have two additional acceleration modes "dxva1" (deprecated) and "dxva2" that are using DirectX Video Acceleration.

Command line examples

Note
The command line examples below are Windows specific. To run examples on Linux, you must slightly modify them. Instead of -omx_core omxil_core.dll, you need to specify -omx_core libomxil_core.so on Linux.

ffmpeg -c omx_dec_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.dec_hevc.video -i source.h265 output.yuv -y
ffmpeg -c omx_dec_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.dec_hevc.video -i source.mp4 output.yuv -y
ffmpeg -c omx_dec_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.dec_hevc.video -omx_param_dec "acc_toolset_map=cpu" -i source.mp4 output.yuv -y
ffmpeg -c omx_dec_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.dec_hevc.video -omx_param_dec "acc_toolset_map=d3d9" -i source.mp4 output.yuv -y
ffmpeg -c omx_dec_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.dec_hevc.video -omx_param_dec "acc_toolset_map=d3d11" -i source.mp4 output.yuv -y
ffmpeg -c omx_dec_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.dec_hevc.video -omx_param_dec "smp_mode=auto" -i source.h265 output.yuv -y
ffmpeg -c omx_dec_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.dec_hevc.video -omx_param_dec "smp_mode=concurrent" -i source.h265 output.yuv -y
ffmpeg -c omx_dec_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.dec_hevc.video -omx_param_dec "smp_mode=off" -i source.h265 output.yuv -y
ffmpeg -c omx_dec_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.dec_hevc.video -omx_param_dec "smp_mode=overlapped" -i source.h265 output.yuv -y
ffmpeg -c omx_dec_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.dec_hevc.video -omx_param_dec "preview_mode=off" -i source.h265 output.yuv -y
ffmpeg -c omx_dec_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.dec_hevc.video -omx_param_dec "preview_mode=lv1" -i source.h265 output.yuv -y
ffmpeg -c omx_dec_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.dec_hevc.video -omx_param_dec "preview_mode=lv2" -i source.h265 output.yuv -y 
ffmpeg -c omx_dec_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.dec_hevc.video -omx_param_dec "preview_mode=lv3" -i source.h265 output.yuv -y
ffmpeg -c omx_dec_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.dec_hevc.video -omx_param_dec "preview_mode=lv4" -i source.h265 output.yuv -y
ffmpeg -c omx_dec_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.dec_hevc.video -omx_param_dec "async_io_mode=0" -i source.h265 output.yuv -y
ffmpeg -c omx_dec_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.dec_hevc.video -omx_param_dec "async_io_mode=1" -i source.h265 output.yuv -y
ffmpeg -c omx_dec_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.dec_hevc.video -omx_param_dec "cpu_num=1" -i source.h265 output.yuv -y
ffmpeg -c omx_dec_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.dec_hevc.video -omx_param_dec "cpu_num=6" -i source.h265 output.yuv -y

Parameters

The MainConcept HEVC/H.26 Decoder plug-in for FFmpeg allows you to change the following decoder settings and parameters on the command-line.

acc_mode

Specifies the hardware acceleration mode (Windows only).
  • 0: Hardware accelerated decoding off. Enables software decoding only
  • 1: Enables hardware acceleration if available (auto)
  • 2: Enables hardware acceleration only. If hardware acceleration is unavailable, decoder will reject pin connection

smp_mode

Sets the multi-threading mode if available (present on multi-processor systems). It also specifies how to do parallel decoding.
  • -1: auto: Let the decoder decide automatically which mode is best to use
  • 0: off: Use only thread called copybytes for decoding. Do not create more threads
  • 1: overlapped: Decode as many pictures in parallel as possible and decode parallel within each picture
  • 2: concurrent: Decode one picture at a time but decode parallel within each picture

preview_mode

The decoder skips some features or simplifies some steps for picture decoding. This can significantly improve decoding speed for complex streams.
  • 0: OFF: Preview mode is disabled, all features in the stream are applied for decoding
  • 1: LV1: De-blocking filter and SAO skipped on non-reference frames
  • 2: LV2: De-blocking filter and SAO skipped on all frames
  • 3: LV3: De-blocking filter and SAO skipped on all frames, motion vectors precision restricted to half pel
  • 4: LV4: De-blocking filter and SAO skipped on all frames, motion vectors precision restricted to full pel

async_io_mode

Specifies whether frames are decoded synchronously, i.e. only a single frame is completely processed at a time or asynchronously. Synchronous mode is not suitable for low latency use-cases, in which case you should enable the checkbox. In asynchronous output mode, the decoder will receive output pictures in threads other than the copybytes thread. Besides lower latency, this asynchronous I/O can also increase decoding speed.
  • 0: Asynchronous I/O mode disabled
  • 1: Asynchronous I/O mode enabled

cpu_num

Sets the number of logical CPUs which can be used in the specified SMP mode for decoding.
  • -1 or 0: Detect the optimal number automatically (default)
  • 1 - 255: Use the thread count from the specified parameter