-
-
Notifications
You must be signed in to change notification settings - Fork 34
Global Options
WangBin edited this page Sep 11, 2024
·
42 revisions
SetGlobalOptions(key, value)
, GetGlobalOption(key)
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 | ||
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 | ||
BRAWSDK_DIR | string | BRAW dlls dir, optional | ||
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 | 0 | 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, so default 0 is fine. GL_EXT_EGL_image_storage can be desktop and es. |
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, shared by decoder and renderer. if value is 1, create an internal device as global device |
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 |