-
-
Notifications
You must be signed in to change notification settings - Fork 32
Decoders
Decoders are selected by Player.setDecoders(MediaType::Video, ...)
, or -c:v names
option for examples(glfwplay, mdkplay etc.)
Decoder options/properties can be set in decoder name with key value pairs Player.setDecoders(MediaType::Video, {"Name:key1=val1:key2=val2"})
, or set via Player.setProperty("video.decoder", "key1=val1:key2=val2")
to apply for all decoders
To test decoder performance and options, use DecodeFps or framereader
program in sdk package.
Available builtin decoder names and properties are:
All platforms. Provides software decoding if no property is specified. You can use system ffmpeg if version >= 4.0 because it may provide more features, for example ffmpeg in RaspberryPi OS supports hevc hardware acceleteration and v4l2m2m drm prime output, mdk can benefit from it with OpenGLES(desktop GL is not suitable for hevc) contexts created by EGL(glfwplay -gl -c:v V4L2M2M,FFmpeg:hwcontext=drm
).
It's the default decoder if no name is specified. Properties(also for ffmpeg based hw decoders):
-
threads
: number of decoding threads. 0: logical cpu cores+1 -
codec
: force a codec name -
hwaccel
: codec name suffix, a (hardware) decoder name is{codec}_{suffix}
will be selected. For exampleFFmpeg:hwaccel=rkmpp:hwcontext=drm
. -
hwcontext
: AVHWDeviceType to use. the value isav_hwdevice_get_type_name()
. For decoding in current FFmpeg version it's cuda, drm, dxva2, d3d11va, qsv, vaapi, vdpau, videotoolbox, mediacodec. Also support for a future hardware decoder with internal hwconfig method. -
drop
: 0, 1(default), 2, 3. control frame drop in decoder- 0: never drop
- 1: drop non-ref frames when seeking
- 2: drop non-ref frames
- 3: only decode I-frames
-
sw_fallback
: 0(default) or 1. fallback to sw dec if hw dec error occured. Usually should be disabled, you can use a decoder list insteadPlayer.setDecoders(MediaType::Video, ["D3D11", "FFmpeg"])
, otherwise won't try the next decoder if failed. -
pool
: frame pool for direct rendering. Currently it can be "CVPixelBuffer" for Apple OSes. -
ignore_profile
: 0(default) or 1. ignore codec profile. may result in incorrect result(d3d11/dxva hevc) if turned on -
error
: int, default -1. number of decode errors allowed. -1 means unlimited. if decode error count < this value, continue to decode. decoder error usually appears when seeking mpegts(it's a bug in ffmpeg, avbuild fixed the bug, but here we set error to -1 to be compatible with official ffmpeg's bug) - other ffmpeg avcodec properties. for example
lowres=N
for jpeg2000. -
external
: 0(default) or 1(auto detect). same as global optioneglimage.external
. It's auto enabled when required(external only formats, e.g. RaspberryPi OS hevc hardware decoder, mjpeg YUYV output). Can also be tested onVAAPI
andVADRM
decoder.- 1: convert to an external texture. OpenGLES is required. Use drm prime or x11/dri3 pixmap as an rgb texture in renderer.
- 0: convert to 2D textures. for both OpenGL and ES2+
-
reuse
: 0(default) or 1. set 1 to reuse texture to get better performance, known to support on raspberry pi with mesa driver. same as global optioneglimage.reuse
You have to enable the plugin via SetGlobalOption("plugins", "mdk-r3d")
before any Player
is created, and put R3DSDK runtime(from official sdk or download from here) to app working dir, or SetGlobalOption("R3DSDK_DIR", "your r3d runtime dir")
. mdk-r3d
plugin must be in the path can be dynamically loaded, for macOS, main bundle's PlugIns/mdk
and PlugIns
dir are searched first. To enable multiple plugins, SetGlobalOption("plugins", "mdk-r3d:mdk-braw")
Properties:
-
gpu
:- opencl: default. should work everywhere.
- cuda: seems slowest
- metal: debay by metal.
decompress
must beasync
orgpu
,format
must bergb48le
, output isrgba64le
- other values: use cpu decoder. other decoders will fallback to cpu decoder if fail to initialize.
-
scale
: down scale to a resolution closest to given target resolution. can significantly improve performance. usually you can use screen resolution or video renderer resolution. value patterns are- widthxheight: set target width and height
- width: set target width, height = width
- 1/2, 1/4, 1/8, 1/16: scale to given value
-
format
: output frame format. can be:-
bgr0
: default. bgra with alpha ignored. bgra
-
rgbp16le
: planar rgb, 16bit unsigned channels -
rgb48le
: 16bit rgb.gpu=metal
will outputrgba64le
, otherwise packed 3 channels rgb is not recommended because not supported by gpu renderers except OpenGL.
-
-
decompress
:-
r3d
: works on all platforms -
async
: currently macOS only. faster thenr3d
.gpu
must bemetal
,format
must bergb48le
. -
gpu
: currently macOS only.gpu
must bemetal
,format
must bergb48le
. lower cpu load, very high gpu load. fps does not increase if scale to a lower resolution than 1/4.
-
Full featured and high performance Blackmagic RAW decoder via Blackmagic RAW SDK. You have to enable the plugin via SetGlobalOption("plugins", "mdk-braw")
before any Player
is created, and put BlackmacgicRawAPI runtime(from sdk or download from here) BlackmagicRawAPI.dll
(windows x64)/BlackmagicRawAPI.framework
(mac)/libBlackmagicRawAPI.so
(linux x64) to the location can be loaded. mdk-braw
plugin must be in the path can be dynamically loaded, for macOS, main bundle's PlugIns/mdk
and PlugIns
dir are searched first. To enable multiple plugins, SetGlobalOption("plugins", "mdk-r3d:mdk-braw")
Properties:
-
gpu
orpipeline
:- no, cpu(default). lower fps, higher cpu load.
- auto: metal > cuda > opencl > cpu
- metal: metal gpu pipeline. Requires braw runtime component
DecoderMetal
- opencl: opencl gpu pipeline. Requires braw runtime component
DecoderOpenCL.dll
(windows) orlibDecoderOpenCL.so
(linux). - cuda: cuda gpu pipeline. Requires braw runtime component
DecoderCUDA.dll
(windows) orlibDecoderCUDA.so
(linux).
-
device
: if there are multiple devices supports a pipeline, a device name can be used to select one- nvidia: nvidia gpu. multiple gpu devices support opencl pipeline, select via device name. (nvidia opencl pipeline does not work in my tests)
- avx2: instruction for cpu pipeline. Requires braw runtime component
InstructionSetServicesAVX2.dll
(windows),libInstructionSetServicesAVX2.so
(linux) orInstructionSetServicesAVX2
(mac) - sse: instruction for cpu pipeline. full name is
SSE 4.1
. - avx: instruction for cpu pipeline. WORST performance! Requires braw runtime component
InstructionSetServicesAVX.dll
(windows) orlibInstructionSetServicesAVX.so
(linux) orInstructionSetServicesAVX
(mac) - other names: will list all devices of the pipeline in the log, then you can choose the substring of one
-
scale
: down scale to a resolution closest to given target resolution. can significantly improve performance. usually you can use screen resolution or video renderer resolution. value patterns are- widthxheight: set target width and height
- width: set target width, height = width
-
copy
: copy gpu resource to host memory or not- 1(default)
- 0: currently only works for metal and cuda pipeline. opencl pipeline will always in copy mode.
-
format
: output frame format. can be:-
rgba
: default. rgba 8bit -
bgra
: bgra -
rgb48le
: 16bit rgb. packed 3 channels rgb is not recommended because not supported by gpu renderers except OpenGL. -
rgba64le
: 16bit rgba -
bgra64le
: 16bit bgra -
rgbp16le
: 16bit planar rgb -
rgbpf32le
: 32bit planar rgb -
bgraf32le
: 32bit packed bgra
-
Recommended options: BRAW:gpu=auto:copy=1:scale=ScreenWidthxScreenHeight
You have to enable the plugin via SetGlobalOption("plugins", "mdk-nvjp2k")
before any Player
is created, and insert nvjp2k
before FFmpeg
in video decoders. Requires plugin binaries and nvJPEG2000 runtime libraries(and cudart 11.0+).
RECOMMENDED for apple platforms. MDK's own implementation. Async mode(default) has better performance than VideoToolbox
decoder in ffmpeg. Support more codecs, for example VP9 on macOS11+, 10bit H264, 10bit YUV444 and H264/HEVC GBRP pixel format on M1 and ProRes. Support more output formats, 10~16bit yuv 422/444. Properties:
-
copy
: can be 0(default), 1 and 2.- 0: (default) no copy. best performance.
- 1: lock decoded buffers to be accessible for CPU.
- 2: lock decoded buffers and copy to host memory. slowest.
-
async
: can be 1(default) or 0. enable async decoding or not. Decode frame rate in async mode can be 25% higher thanasync=0
and ffmpegVideoToolbox
decoder. -
hardware
: 0, 1(default) or 2. enable hardware decoding(1) or not(0). 2: force hardware decoding, may fail to open decoder if not supported -
realTime
: 0 or 1(default) -
threads
: number of decoding threads. only supported ifhardware=0
for some decoders -
deinterlace
: 0 or 1(default) -
width
: desired output width in pixels -
height
: desired output height in pixels -
format
: decoded frame pixel format. default is the closest supported format(same chroma subsample size) of the optimal output, usually it's a semi-planar format, e.g.nv12
for 8bit yuv 420,p010le
for 10bit yuv 420. It also can be packed formats, e.g. uyvy422 for 8bit yuv 422. Some default(optimal?) output formats are not supported in mdk, mdk choose the closest format. for example 10bit yuv422 default output is 'v216', mdk choose 'p210', and choose p416('sv44') instead of 'y416' for yuv444p12 input . Apple silicon may produce 'p420' for 10bit yuv420, and Y planeis r10g10b10a2 alike, mdk choosep010le
format -
fourcc
orCVPixelFormat
: force the output CVPixelFormat (for testing). To show the complete format list on your device, runcvformats
in the sdk package. -
alpha
: 1(default) or 0. Enable hevc with alpha channel decoding. -
print_properties
: print VT Session properties. May crash on macOS 15 with M1 Max and M3
RECOMMENDED for windows. Win32, UWP hardware and software decoder via Media Foundation. MDK's own implementation. Performance is better than D3D11 decoder in ffmpeg. Plugins from microsoft store is required to support VP9, HEVC and AV1. Source Code. Properties:
-
d3d
: can be 0, 9, 11, 12.- 0: not using d3d, software decoder.
- 9: (win32) use d3d9 device, i.e. DXVA2 hardware accelerated.
- 11: default. (win7+,UWP) use d3d11 device, i.e. d3d11 hardware accelerated.
- 12: use d3d12 device, hardware accelerated. currently 0-copy is only supported by d3d12 renderer. Lowest memory load, about 1/4 lower than MFT:d3d=11, also lower than FFmpeg d3d11va and d3d12va.
-
fallback
:- 1: default. fallback to lower d3d version if specified version is unsupported. will not fallback to
d3d=0
- 0: returns error if failed to use given d3d version
- 1: default. fallback to lower d3d version if specified version is unsupported. will not fallback to
-
pool
:- 0: default for audio(required by dolby audio decoder?). allocate memory for every decoded sample if necessary.
- 1: default for video. use a pool for decoded samples to reduce memory allocation and copy.
-
copy
: can be 0, 1, 2.- 0: default. for d3d=9/11. No GPU to host memory copy. Best performance
- 1: map to host memory for d3d=9/11, or copy to host memory for d3d=0
- 2: map and copy to host memory
-
feature_level
: d3d11 device feature level to create. from "9.1" to "12.1"(default) -
vendor
: d3d11 device vendor name. can be intel, amd, nvidia, qualcom, microsoft -
adapter
: d3d9/11 adapter number. default 0. Used to select GPU for decoding. -1 to select by system -
low_latency
: low latency mode. can be 0(default) and 1. decoded frames can be out of order for some videos with b-frames if low latency is enabled. -
ignore_profile
: ignore h264 profile. default 0. -
ignore_level
: default 1. doc says max h264 level is 5.1, but actually higher level is also supported. -
kmt
: 0(default) or 1. resource sharing via keyed mutex in multiple command queues(decode + render device context). BUG: failed to decode. If decoder and renderer use the same device context, kmt is not required. -
shared
: 0 or 1(default). resource sharing via legacy mechanism. for d3d=11 win8+. -
shader_resource
: 0(default) or 1. d3d=11 and win8+ only. Set 1 to let decoder output textures can be sampled by shader directly to support 0-copy(no gpu copy) rendering and get best performance, but may result in decode error for some GPUs, see https://github.com/wang-bin/mdk-sdk/discussions/173 -
blacklist
: codec blacklist because of poor support. string, "codec1codec2..." or "codec1+codec2+...", default is "mpeg4". -
debug
: 0(default) or 1. enable d3d11 debug layer
Recommended options: MFT:d3d=11
RECOMMENDED for android. Android hardware decoder. MDK's own implementation. Support both NDK(default if available) and java implementation. Supports async mode. . Properties:
-
java
: can be 0(default) or 1. Use java or NDK api. DO NOT set both 0 and 1 for multiple decoders at the same time- 0: prefer NDK C API if available. the default and recommended. ndk api is available since android 5.0(api level 21).
- 1: always use java API. NOT RECOMMENDED.
-
surface
:- 0: decode to host memory(ByteBuffer). slower
- 1: default. decode to a surface provided by SurfaceTexture, AImage or user. Better performance.
- jni surface ptr(jobject): decode to provided surface, video tunnel mode. Usually you have to use the return value of
NewGlobalRef()
-
window
: ANativeWindow ptr value, decode to provided ANativeWindow, video tunnel mode. -
image
:- 0: use SurfaceTexture or user provided surface
- 1: use AImageReader to provide Surface. Required by Vulkan(WIP). Best performance. NDK mode only
- N (>1): use AImageReader to provide Surface, and image queue size is N. Required by Vulkan(WIP). Best performance. NDK mode only
-
acquire
: when using AImageReader-
latest
: always acquire the latest image -
next
: default. acquire the next image.
-
-
copy
: can be 0(default) or 1- 0: no copy. faster
- 1: copy from decoded ByteBuffer. Conflicts with
surface=1
and will be ignored
-
async
: can be 0 or 1(default).- 0: sync mode
- 1: async mode if available. API 28(android P) and
java=0
is required.
-
dv
: use dolby vision decoder for dolby vision videos. can be 0, 1(default) or -1.- 0: do not use dolby vision decoder
- 1: use dolby vision decoder for profiles not backward compatible if necessary
- -1: always use dolby vision decoder to process color
-
name
: force a codec name, e.g.c2.dolby.decoder.hevc
. only for testing -
mime
: 1 or 0(default), create codec by mime type or not.
Win32 and linux hardware decoder for NVIDIA GPUs. MDK's own implementation. Properties:
-
copy
: 0(default) or 1. copy to host memory or not. 0 is faster. -
deinterlace
: deinterlace algorithm. can bebob
,weave
,adaptive
-
surfaces
: (default=20) number of decoder surfaces -
maxdelay
: (default=4) Max display queue delay. recommend is 2~4 -
lock
: (default=0) use cuvid lock or not -
padding
: 0(default) or 1. Output has padding data.(test only) -
map
: (default 8) Maximum number of output surfaces simultaneously mapped.
or vaapi
. Linux hardware decoder for intel and AMD GPUs(from ffmpeg). Also supported on windows. Properties:
-
copy
: 0(default) or 1 -
threads
: number of decoding threads. 0: logical cpu cores+1 -
hwdevice
: drm fd device path, orXOpenDisplay()
parameter -
display
: va display type, can bex11
(default),drm
-
x11
: x11 display ptr value as a string -
drm
: drm device path -
device
: drm device path on linux(same asdrm
). adapter index or vendor name(case insensitive substring) on windows, e.g.device=nv
ordevice=amd
. -
DRMFd
: address of drm fd -
interop
: interop method for 0-copy rendering. can bex11
,drm
,drm2
,dri3
, the value is auto selected depending on current opengl context type, GLX or EGL, you can also explicitly set a value. legacydrm
may not work on new drivers.-
x11
: default for GLX. glx texture or egl image from pixmap. requires libva-x11. may not work for some drivers/hardwares, e.g. intel iHD/i965 driver may report error in vaPutSurface, andeglCreateImageKHR
may fail, then will fallback todri3
interop. Supportsexternal=1
property. -
dri3
: glx texture or egl image from x11 dri3 pixmap from drm exported from libva. requiresVAEntrypointVideoProc
(vainfo -a
). for intel you may need to installintel-media-va-driver-non-free
, other drivers(opensource iHD and i965) may not support VideoProc. Tested on intel, amd gpus.dri3
may be more efficient thanx11
interop(no blit). Supportsexternal=1
property. -
drm
: legacy drm prime api from libva-drm -
drm2
: default for EGL. drm prime 2 api from libva-drm. will fallback todrm
ifdrm2
is not supported.
-
-
composed
: 0(default) or 1,drm2
interop only.- 1: export a composed multi-planes yuv layer, layer format is a multi-planes format, e.g. NV12 input will export an NV12 layer
- 0: export multi layers, 1 layer per plane, layer format is plane format. for example NV12 input will output 2 layers: R + RG
-
external
: 0(default) or 1(auto detect). same as global optioneglimage.external
. It's auto enabled when required(external only formats, e.g. RaspberryPi OS hevc hardware decoder, mjpeg YUYV output). Can also be tested onVAAPI
andVADRM
decoder.- 1: convert to an external texture. OpenGLES is required. Use drm prime or x11/dri3 pixmap as an rgb texture in renderer.
- 0: convert to 2D textures. for both OpenGL and ES2+
-
storage
: 0(default) or 1. same as global optioneglimage.storage
- 0: use
GL_OES_EGL_image
extension. Spec says it requires OpenGL ES, but in fact desktop OpenGL usually support this extension - 1: use
GL_EXT_EGL_image_storage
extension, supports OpenGL and ES3.
- 0: use
For drm/drm2 interop, all display
, interop
, composed
and external
combinations are supported.
display\interop | x11, dri3 pixmap | legacy drm | drm2 |
---|---|---|---|
x11 | EGL/GLX | EGL | EGL |
drm | EGL | EGL |
You may have to set environment var LIBVA_DRIVER_NAME
if the default does not work. For example export LIBVA_DRIVER_NAME=i965
for intel
For x11, you MUST call SetGlobalOption("X11Display", DisplayPtr)
to enable 0-copy rendering, otherwise may fail. Qt example. You also have to ensure XInitThread()
is called before any x11 call(Qt, glfw already does).
almost the same as VAAPI
except the output is drm prime instead of vaapi surface. May not work
or vdpau
. Linux hardware decoder for NVIDIA GPUs(from ffmpeg). Properties:
-
copy
: 0(default) or 1 -
threads
: number of decoding threads. 0: logical cpu cores+1 -
hwdevice
:XOpenDisplay()
parameter -
interop
: force an interop method, can be-
video
: mapVdpVideoSurface
as yuv textures. default for nvidia gpus -
output
: mapVdpOutputSurface
as an rgb texture. default for non-nvidia gpus -
pixmap
: render to an x11 pixmap and use as an rgb texture. support any combination of EGL+OpenGLES and GLX+OpenGL/OpenGLES. But seems broken in my recent test on some devices.
-
-
connection_type
: can be "drm" or "x11". NOT IMPLEMENTED -
kernel_driver
: NOT IMPLEMENTED -
driver
: NOT IMPLEMENTED
You may have to set environment var VDPAU_DRIVER
if the default does not work. For example export VDPAU_DRIVER=radeonsi
for amd
You MUST call SetGlobalOption("X11Display", DisplayPtr)
to enable 0-copy rendering, otherwise may fail. Qt example. You also have to ensure XInitThread()
is called before any x11 call(Qt already does).
Raspberry pi hardware decoder(from ffmpeg). Properties:
-
copy
: 0(default) or 1 -
threads
: number of decoding threads. 0: logical cpu cores+1
Raspberry pi hardware decoder. MDK's own implementation. Properties:
-
copy
: 0(default), 1 or 2.- 0: decoded frame can be rendered without copy. Best performance
- 1: decode into host memory.
- 2: decode into host memory and copy. slowest.
-
format
: decoded pixel format name. Seems onlyyuv420p
works. -
extra_in
: (default 10) extra input buffers -
extra_out
: (default 0) extra output buffers
Sunxi hardware decoder. MDK's own implementation. Can be rendered via arm UMP acceleration.
From ffmpeg. alias of FFmpeg:hwaccel=v4l2m2m
. RaspberryPi OS system ffmpeg supports drm_prime frame output, you can use it to get maximum performance.
software av1 decoder via dav1d, requires dav1d runtime library, e.g. libdav1d.5.dylib for apple, libdav1d.so.5 for linux, libdav1d.dll(download from https://code.videolan.org/videolan/dav1d/-/pipelines) for windows and libdav1d.so for android. Will automatically fallback to dav1d decoder if Player.setDecoders()
is not called and dav1d library is found. Properties:
-
threads
: default 0(logical cores) -
tile_threads
: tile threads. default is 0(sqrt(threads)
) -
frame_threads
: frame threads. default is 0(threads/tile_threads
)
NOTE: if setDecoders(MediaType::Video,...)
is not called, dav1d
will be automatically used when necessary, otherwise you have to explicitly add dav1d
in decoder list setDecoders(MediaType::Video, {..., "dav1d", ...})
Hap is decoded as compressed textures, and uncompressed on GPU. Lower cpu, gpu and memory load compared with ffmpeg hap decoder. Only desktop platforms are supported, including windows, uwp, macOs and linux. Supported codecs are Hap1
, Hap5
, HapY
and HapM
.
NOTE: if setDecoders(MediaType::Video,...)
is not called, hap
will be automatically used when necessary, otherwise you have to explicitly add hap
in decoder list setDecoders(MediaType::Video, {..., "hap", ...})
. FFmpeg
based hardware decoders may fallback to ffmpeg hap decoder, so you MUST insert hap
before those decoders
or d3d12va
. Win32, UWP hardware decoder(from ffmpeg). Properties:
-
copy
: 0(default) or 1 -
threads
: number of decoding threads. 0: logical cpu cores+1 -
hwdevice
: dxgi adapter index -
debug
: debug layer
or d3d11va
. Win32, UWP hardware decoder(from ffmpeg). Properties:
-
copy
: 0(default) or 1 -
threads
: number of decoding threads. 0: logical cpu cores+1 -
hwdevice
: dxgi adapter index -
debug
: debug layer -
shader_resource
: 0(default) or 1. Set 1 to let decoder output textures can be sampled by shader directly to support 0-copy(no gpu copy) rendering and get best performance, but may result in decode error for some GPUs, see https://github.com/wang-bin/mdk-sdk/discussions/173 -
kmt
: 0(default) or 1. resource sharing via keyed mutex in multiple command queues(decode + render device context). BUG: failed to decode. -
nthandle
: 0(default) or 1. share with nt handle.
or dxva2
. Win32 hardware decoder(from ffmpeg). Properties:
-
copy
: 0(default) or 1 -
threads
: number of decoding threads. 0: logical cpu cores+1 -
hwdevice
: d3d9 adapter index
or qsv
. Intel QuickSync (tested on windows) (from ffmpeg). Properties:
-
copy
: 0(default) or 1 -
d3d
: 11(default) or 9. requires ffmpeg5.0+. output d3d11 or d3d9. -
threads
: number of decoding threads. 0: logical cpu cores+1 -
hwdevice
: implementation. can be "auto", "sw", "hw", "auto_any", "hw_any", "hw2", "hw3", "hw4"
or nvdec. Win32 and linux hardware decoder for NVIDIA GPUs(from ffmpeg). Properties:
-
copy
: 0(default) or 1 -
threads
: number of decoding threads. 0: logical cpu cores+1 -
hwdevice
: cuda device index
or videotoolbox
. macOS and iOS hardware decoder(from ffmpeg).
-
format
: software pixel format. can be "nv12", "p010le", "yuv420p", "uyvy422" etc.
or mediacodec
. Android hardware decoder(from ffmpeg) Properties:
-
copy
: 0(default) or 1 -
threads
: number of decoding threads. 0: logical cpu cores+1 -
surface
:- 0: decode to host memory(ByteBuffer). slower
- 1: default. decode to a surface provided by SurfaceTexture, AImage or user. Better performance.
- jni surface ptr(jobject): decode to provided surface, video tunnel mode. Usually you have to use the return value of
NewGlobalRef()
-
window
: ANativeWindow ptr value, decode to provided ANativeWindow, video tunnel mode. -
image
:- 0: use SurfaceTexture or user provided surface
- 1: use AImageReader to provide Surface. Required by Vulkan(WIP). Best performance. NDK mode only
- N (>1): use AImageReader to provide Surface, and image queue size is N. Required by Vulkan(WIP). Best performance. NDK mode only
-
acquire
: when using AImageReader-
latest
: always acquire the latest image -
next
: default. acquire the next image.
-
Decoders are selected by Player.setDecoders(MediaType::Audio, ...)
, or -c:a names
option for examples(glfwplay, mdkplay etc.)
Available builtin decoder names and properties are:
- MFT supports more codecs
- FFmpeg d3d12 may fail to decode, MFT:d3d=12 works
- MFT may use software fallback if not supported, e.g. radeon r7 430 does not support hevc(how to control?)