Global Options - wang-bin/mdk-sdk GitHub Wiki
SetGlobalOptions(key, value)
, GetGlobalOption(key)
. If the value is a path, for qt users it can be QString::fromUtf8("u8 dir").toLocal8bit().toStdString()
key | value type | value range | default | description |
---|---|---|---|---|
MDK_KEY | string | license key for your commercial product | ||
MDK_KEY_CODE_PAGE | string | license key code page used internally(windows only) | ||
logLevel, log | string int LogLevel |
LogLevel, it's raw int value, or it's name "Error", "Warning", "Info", "Debug", "All" | Debug | By default log is disabled, you must also call setLogHandler() to enable, then a custom log handler will test log level. Use setLogHandler(nullptr) once to log to std::clog, twice to disable log completely. |
ffmpeg.loglevel or ffmpeg.log | string | quiet, panic, fatal, error, warning, info, verbose, debug, trace, or level=name | info | set global log level, or AVClass log level via level=name , e.g. trace=https . can set different level=name many times |
ffmpeg.cpuflags | string | cpu flags | ||
${avmodule}_lib, e.g. avcodec_lib | string | path or name of ffmpeg module, ${avmodule} can be avutil, avcodec, avformat, swscale, swresample, avfilter. See https://github.com/wang-bin/mdk-sdk/wiki/FFmpeg-Runtime#select-ffmpeg-runtime | ||
${avmodule}, e.g. avcodec | void* string |
handle(void*) or path(string) of ffmpeg module. See https://github.com/wang-bin/mdk-sdk/wiki/FFmpeg-Runtime#select-ffmpeg-runtime | ||
avformat | string | key1=val1:key2=val2... | avformat module options, for example "fflags=nobuffer:analyzeduration=1000000" | |
ffmpeg.configuration | const char* | Get only. The most recent loaded ffmpeg module configuration | ||
ffmpeg.version | int | Get only. The most recent loaded ffmpeg major version | ||
videoout.clear_on_stop | int bool |
true | clear renderer if stopped by user | |
videoout.buffer_frames | int string |
Z+ | max buffered frames to in the renderer | |
videoout.hdr | int string |
0,1 | 0 | 0: always tone mapping to sRGB. 1: enable hdr depdending on screen capability(metal, d3d11). overrides Player.set(ColorSpace) |
videoout.flush_before_seek | int<string | 0,1 | unset | flush frames before seek. hardware decoded frames may be not ref counted, then must flush. if not set, auto detect |
jvm, JavaVM | void* |
JavaVM* Required by android if no System.loadLibrary("mdk")
|
||
android.content.Context android.app.Application |
void* | automatically set when setting JavaVM | ||
X11Display | Display* |
REQUIRED for x11. Used by VAAPI, VDPAU 0-copy rendering. May still work without it but not recommended. Qt example. You also have to ensure XInitThread() is called before any x11 call(Qt, glfw already does). |
||
DRMDevice | string | drm device path, for vaapi | ||
DRMFd | int* | drm fd, for vaapi | ||
demuxer.live_eos_timeout | int | 5000 | timeout(ms) for live recorded video EOS | |
demuxer.io | int | 0,1,2 | 1 | 0: demuxer internal io. 1: prefer own io module. 2: always use own io module |
demuxer.max_errors | int | 0 | continue to demux the stream if error count is less than this value | |
profiler.gpu | int bool string |
0,1 true,false |
0 | sample the gpu time to render a frame. the value will be shown in the log if LogLevel::All is set |
plugins_dir, plugins.dir | string | plugins directory. MUST set before "plugins" if not in default dirs. For qt users, value can be QString::fromUtf8("u8 dir").toLocal8bit().toStdString()
|
||
plugins | string | name1:name2:... | enable plugins, for example enable braw SetGlobalOption("plugins", "mdk-braw") , enable both braw and r3d SetGlobalOption("plugins", "mdk-braw:mdk-r3d")
|
|
R3DSDK_DIR | string | R3D dlls dir. default dir is working dir. For qt users, value can be QString::fromUtf8("u8 dir").toLocal8bit().toStdString()
|
||
BRAWSDK_DIR | string | BRAW dlls dir, optional. For qt users, value can be QString::fromUtf8("u8 dir").toLocal8bit().toStdString()
|
||
eglimage.reuse | string/int | 0/1 | 0 | reuse eglimage to improve performance. currently only works for raspberry pi mesa driver |
eglimage.external | string/int | 0/1 | auto detect | use eglimage as external texture. auto enabled when required(e.g. RaspberryPi OS hevc hardware decoder). otherwise you can set 0 or 1 |
eglimage.storage | string/int | 0/1 | 1 | for drm 0-copy rendering. prefer GL_OES_EGL_image if 0, GL_EXT_EGL_image_storage otherwise or no GL_OES_EGL_image. GL_OES_EGL_image is designed for ES, but desktop gl driver also implements it. GL_EXT_EGL_image_storage can be desktop and es, external or not. |
sdr.white | float | 203.0 | SDR white level. It can be a different value in some gui toolkits, e.g. Qt is 100. OBS Studio default is 300 and can be changed by user in settings dialog. | |
hdr10.format | string | rgb10a2,rgba16f | rgba16f | Metal only. Metal layer pixel format for HDR10 videos. Default is rgba16f can let QtQuick apps support perfect HDR10 playback on macOS |
d3d11.device | string/void* | 0,1,ID3D11Device* | 0 | set a global d3d11 device if not null, shared by decoder and renderer. if value is 1, create an internal device as global device. global device can ensure d3d11 decoded frame rendered in 0-copy mode in d3d11 renderer. |
d3d11.copy | int/string | 0,1,-1 | -1 | when sharing resource across different devices, copy resources via gpu or not. -1: auto, copy for amd, 0-copy otherwise. 0: always 0-copy. 1: force copy. 0-copy mode has better performance, especially when playing multiple videos at the same time |
d3d11.trace | int/string | 0,1 | 0 | trace dx11/12 objects. |
subtitle.fonts.dir | string | extra fonts dir for subtitle renderer | ||
subtitle.fonts.file | string | default subtitle font as fallback. can be an asset path for android | ||
subtitle.fonts.family | string | efault subtitle font family as fallback |