Skip to content

Releases: wang-bin/mdk-sdk

v0.35.1

30 Dec 09:50

Choose a tag to compare

  • API: Fix frame move assignment and constructor
  • VT:
    • Improve AV1 support
    • Ignore session create error for hvc1, fix decoder open error on macOS 26
  • VAAPI:
    • Fallback to drm display if no wayland
    • Add drm vendor option: vendor can be "nv", "intel" etc.
  • rockchip decoder: supprt avs1 p2 p16(avs+), avs2
  • Shader:
    • Fix locale restore
    • HLG extended model
  • BRAW: stop decoding on error to fix corrupt file playback
  • Fix subtitle font scale
  • Fix audio + cover art wrong position after seek and loop
  • Fix BC4 channel map and display white as red in dx, metal and vk renderer
  • FFmpeg:
    • Add property "codec.$name" to force a decoder for a codec, for example "FFmpeg:codec.cavs=libcavs"
    • Keep streams order for muxer

v0.35.0

30 Sep 06:07

Choose a tag to compare

  • API:
    • Add Player.onSubtitleText(), a callback to be invoked when new subtile text lines are ready to display
    • Add global options video.decoders.hint, used by player.setProperty("video.decoders", GetGlobalOption("video.decoders.hint"))
    • More properties. avsync.audio value "false" can sync to a steady clock
  • VT:
    • Fix vp9 alpha layer is not decoded
    • HEVC alpha is always supported even for sw decoders
    • Support "only" & "delivery" to drop frames, known to work for jpeg and maybe more
  • Metal:
    • Fix renderer and layer colorspace do not match, e.g. bt2100pq is used for prores raw's bt2100 scene referred linear
  • Update renderer if "cc", "subtitle" property changed even when paused
  • D3D11:
    • Disable internal fence if kmt is used
    • Avoid creating rtv for decoder error
  • CUDA:
    • Fix gfx resources are not unregistered
  • Record active tracks only
  • Optimize vk spirv blobs
  • Fix macOS < 10.13 compatibility
  • Fix wrong subtitle aspect ratio in vo size mode
  • FFmpeg:
    • Fix SAR if only exists in container
    • Add property "avformat.input" to force input format, e.g. can be used by h264 raw stream over udp
  • BRAW:
    • Add error property

v0.34.0

01 Sep 02:59

Choose a tag to compare

  • API:
    • Add VideoFrame.rotation()
    • Add VideoFrame.metadata(). Currently it's only used by exporting frame SEI, see this feature request
    • Add Player.setAudioMix()
  • Add rockchip decoder as a plugin, libmdk-rockchip.so from sdk is required(will be copied automatically if use FindMDK.cmake). setDeoders(MediaType::Video, {"rockchip", "FFmpeg", "dav1d"}) will enable rockchip decoder. Document
  • Decoder plugins are loaded automatically when invoking setDecoders(). plugin name is mdk-$decodename_lowercase. For example, SetGlobalOption("plugins", "mdk-braw:mdk-r3d") is no longer required for BRAW and R3D decoder.
  • VT decoder:
    • force prores raw output rgbaf16. Previously the default format is used, which is rgbaf16 on M1, 'b16q'(a 4 planes bayer format) on M2+, but 'b16q' is not supported by current renderers.
    • ProRes Raw support scene referred extended linear trc. Now Metal renderer has almost the same result as QuickTime player.
    • Add scale property to output a lower resolution, value can be 1, 1/2, 1/4 and 1/8. Decoding speed is higher for lower resolution. Known used by ProRes and ProRes Raw.
  • Support apply decoder properties when decoding via Player.setProperty("video.decoder", "key1=val1:key2=val2"), and Player.setProperty("avcodec.$opt", "val"), for example VT and FFmpeg decoder scale option. Audio is the same.
  • XAudio2: support changing audio device even when playing
  • PulseAudio: Fix wrong volume from input event
  • OpenGL:
    • Fix crop ratio, avoid recreating textures frequently
    • DRM EGL: Enable immutable texture only for desktop GL by default
    • Fix packed rectangle texture attributes.
  • Add recorder error event {error, "record", "write"}
  • BRAW: Fix a crash if release resources after decoder stopped`.
  • Fix leak in VideoFrame.to()
  • FFmpeg:
    • Global option avfilter.ignore_errors=1 enables original frame output if there's an error in filter
    • Disable frame duration to workaround frame accurate issue introduced in 0.33.0
    • Add vulkan decoder

v0.33.1

05 Jul 16:11

Choose a tag to compare

  • GL:
  • CUDA:
    • Use a stream for output
    • Fix blank lines at bottom if coded height != height
  • VAAPI:
    • Support wayland display via SetGlobalOption("wl_display*"). It's optional because x11 and drm also work in wayland environment
    • Fix dri3 interop was disabled and unusable long times ago
    • va display is shared by default to avoid an potential crash in x11, can be disabled by decoder option shared=0 or SetGlobalOption("vaapi.shared", 0)
  • D3D11:
    • Fix RTV leak in 0.33.0
    • Disable IDXSync introduced in 0.33.0 for D3D11RenderAPI.rtv because a leak issue not yet fixed
  • Fix high cpu load on linux when EOF is read
  • Fix global options not applied for decoders output drm objects, except vaapi
  • Fix a mem leak: drmGetFormatModifierName, pulse audio init
  • Apple: fix audio renderer recursive init
  • BRAW: support 4.5+ SDK
  • R3D: support 9.0+ SDK and N-RAW. But still built with 8.6 SDK because of a bug in 9.0
  • FFmpeg:
    • Fix missing rotation data for when avfilter is used
    • Fix can't load avdevice on android

v0.33.0

28 May 06:11

Choose a tag to compare

  • API:
    • Audio/VideoFrame is ref counted
    • Add VideoFrame.get(DX11Resource*, ID3D11Device*) to get underlying dx11 resource, or convert to dx11 textures if device is provided(cuda only)
  • Rockchip rkmpp decoder 10bit output can be directly imported by EGLImage w/o rga format conversion. Maybe it's the only player supports this feature.
  • MFT:
    • Support async and hardware mft via property hardware=1 or async=1, hardware implies async. jpeg and vp8 can be async decoder
    • hardware property value can be a vendor name, e.g. nvidia, intel, amd, qcom
    • packed yuv format is not preferred
  • D3D11:
    • Render target D3D11RenderAPI.rtv can be an array texture. array index starts from 0, and increases if renderVideo() draws a new frame, i.e. returns a new timestamp
    • Expose IDXSync for user, which can be used to sync between contexts if render decoded dx11 resource from VideoFrame.get(DX11Resource*) or encode/process dx11 texture rendered by renderVideo(). It's also used internally.
    • Fix signal on a wrong fence
    • Improve cross device rendering w/o cpu wait
  • OpenGL:
    • Fix yuv sampler shader
    • Don't use GL_OES_EGL_image_external for ES3, fix error on some devices(e.g. rk3588 mali driver)
    • More EGL platform types, and platform extension is used when possible.
  • Metal: render target supports array texture
  • CUDA:
    • Add decoder property array=N or global option cuda.array for dx11 to use an array texture as output
    • Add decoder property persistent or global option cuda.persistent for gl and dx11 to map as cuda resource only once
  • Dolby vision: support profile 20, used by MV-HEVC
  • Use rgba format for GBM to fix no EGLConfig for rgb. env var GBM_FORMAT can force another format, the value is a GBM fourcc, e.g. AR24
  • record() without any decoder will remux the media. steps: setMedia(..., {}) => record(file,...) => set(State::Playing) => waitFor(State::Stopped)
  • Fix avfilter processed audio format
  • Fix bitmap subtitle display area
  • Fix some subtitle crash
  • Fix mirror for rotated video used by OpenGL FBO
  • build with libc++21
  • lto is disabled for apple platforms because of compiler bug.
  • FFmpeg: support 8.0 abi
    • Add global option ffmpeg and libffmpeg to reload all av modules, value can be libffmpeg path or handle

Version 0.32.0

22 Mar 10:56

Choose a tag to compare

  • API:
    • Add AudioFrame and Player.onFrame<AudioFrame>(). Example: obs
    • VideoFrame.from() can import CUDA and VAAPI resources
  • NEW: VP8/9, HEVC with Alpha support. Maybe it's the 1st player engine supports those standard alpha videos.
    • VP8/9, HEVC alpha layer decoding for all decoders.
    • alpha layer rendering in all renderers. Alpha and base layer can be from different decoders and have different strides, and sampler types can be different.
    • alpha=0 can disable alpha layer decoding, e.g. player.setProperty("video.decoder", "alpha=0")
  • non-standard alpha videos whose alpha data is at bottom or right, enable via decoder property alpha=right or alpha=bottom. sw decoder or hw decoder copy mode only.
  • MFT: support HEVC base layer decoding if has multiple layers(alpha and MV-HEVC). By default such bitstream is rejected by MFT
  • D3D11: fix downloading from stage texture, previously may crash on amd, arm64
  • CUDA:
  • VT: RequestedMVHEVCVideoLayerIDs bug reported by me in 2024 is fixed in macOS 15.4, so remove workaroud for macOS 15.4+
  • VAAPI: add "vpp" property, 1 to convert to rgb via vpp
  • EGL:
    • Prefer storage extension for desktop gl. external only formats support is vendor dependent. Works well on all gpus including raspberry pi. previously only OpenGL ES + external image can be used for extenal only formats.
    • Fix no hdr metadata warnings in system log on android
    • Support android platform display
    • Fix HDR display if no colorspace extension(regression in 0.31.0)
    • Fix crash if no client extension(regression in 0.31.0)
  • Add value "fit" to property "subtitle.size" to scale subtitle to renderer size and keep aspect ratio
  • CMake: add rpath-link for linux libc++
  • Load libshaderc.so instead of libshaderc-shared.so on linux
  • global option videoout.hdr10_metadata=0 can disable hdr10 metadata passthru to display
  • Fix old subtitle rendered if track switched
  • Fix point map if render api changed(default opengl, to another)
  • Don't clear render target if failed to open a decoder
  • FFmpeg:
    • Add "format" option for sw decoder. used by hevc alpha, for example format=yuva420p
    • "sw_fallback" property applies for codecs w/o hwaccel

v0.31.0

30 Jan 13:32

Choose a tag to compare

  • API:
  • EGL:
    • Support HDR color spaces. player.set(ColorSpaceUnknown) will switch between HDR and SDR color space depending on current rendering video frame. Tested on android, may work on linux
    • Enable HDR10 metadata pass through, can be disabled by env var EGL_HDR_METADATA=0
    • Prefer rgb10a2 to avoid recreating context when switching between SDR and HDR
    • Support KHR_no_config_context to avoid recreating context when switching between SDR and HDR
  • Subtitle:
    • Fix properties not applied if set before play
    • Support splitting ASS rendered rgba image into several smaller regions when possible to reduce total size and gpu bandwidth. controlled by player property subtitle.ass.regions.max or env ASS_REGIONS_MAX, value is int. use subtitle.ass.regions.debug or env ASS_REGIONS_DEBUG to visualize regions and show debug messages.
    • Keep colorspace the same as video, fix dark in bt2020 pq
    • Add player property subtitle.scale to scale all kind of subtitles. default is 1.0, i.e. no scale
    • Fix subtitle.blur is not applied because of a libass bug
    • Add player property subtitle.size, default value is video to render in video frame size, other values will render in video renderer resolution
    • Redraw subtitle if output resolution changed even if playback is paused, e.g. rendering in renderer resolution, and resize the renderer
    • Redraw subtitle for any subtitle property change even if playback is paused.
    • Render earlier
    • Fix dead lock
    • Fix unexpected null texture for some timestamp values and blinking
    • Set ass storage size
  • Dolby vision: Fix shader error if yuv sampler is used for MediaCodec decoder
  • GL: add glFinish() before context destroyed
  • D3D11: Improve UMA support check. UMA optimized texture download. can be disabled by env GPU_OPTIMAL_DOWNLOAD=0
  • DXGI: Use the 1st screen's HDR capability
  • Metal: Fix rendering mutiple overlayes
  • MFT: return error if output type is not supported
  • Fix wrong start time if record() multiple times.
  • Fix buffered packets out of range of the value set by setBufferRange()
  • Fix audio not decoded after seek if paused and result in a/v desync(apple only).
  • Fix seek(if not started) callback may be called twice.
  • Fix global subtitle options not applied, regression in 0.30.1
  • FFmpeg:
    • Support webvtt in mkv. Patch is from avbuild, not merged by upstream.
    • Workaround aac packets from rtsp have no keyframe if ffmpeg > 7.1

v0.30.1

23 Nov 13:53

Choose a tag to compare

  • Fix a crash in audio renderer if get delay
  • renderVideo() before the 1st frame will clear render target with background color. useful if render target content is undefined
  • Fix some global options not applied immediately
  • FFmpeg: prefer new avcodec_get_supported_config()

Version 0.30.0

08 Nov 16:52

Choose a tag to compare

  • API:
    • Add Player.appendBuffer() to play streams with user provided data, for example data is from websocket. media protocol is stream, i.e. player.setMedia("stream:empty_or_any_string"). setTimeout() can abort current playback if timedout to read data from user.
  • Plain text subtitle(srt for example) style can be changed by user via subtitle properties
  • Multi channels audio rendering, no downmix to stereo
  • Support dolby vision in mpeg ts
  • PulseAudio is the default audio render for linux
  • Improve audio renderer delay and AV sync
  • VT: Fix hardware decoder disabled if hvcC has no PS NALUs
  • D3D11:
    • Fix UMA check if run x64 on arm64 and failed to create textures
    • Disable cross context 0-copy for AMD gpus to avoid corrupt result on many gpus
    • Set usage for swapchain, fix back buffer RTV create error on some win7 devices
  • VAAPI:
    • Map YUYV fourcc, fix jpeg yuv 422 rendering
    • Convert to RGB with VPP if DRM to EGLImage is not possible(desktop gl + external only formats)
  • DRM Prime:
    • Error if no OpenGL ES2/3 context for external only formats, then VAAPI can fallback to suboptimal rendering instead of blank
    • Map more formats
  • Player property "audio.tracks", "video.tracks" and "subtitle.tracks" is same as setActiveTracks(), value is a int list string, e.g. "0,1"
  • Reset more callbacks before deleting player object to simplify user code
  • Fix undefined symbol on wayland < 1.10, compatible with more linux distributions, e.g. ubuntu 14.04
  • More packed yuv formats
  • MFT: fix d3d9 not tried if d3d11 is not supported
  • Fix null callback invoked if reset by user
  • Will try to load Ass.framework on apple OS except macOS, to be compatible with media-kit's frameworks
  • FFmpeg: Fix wromg abi version if avfilter is disabled when swresample is loaded and crash, e.g. qt6's ffmpeg dlls
  • Add nvjpeg2000 plugin for windows x64, requires cudart64_12.dll and nvjpeg2k_0.dll
  • Compatible with libc++20

Version 0.29.1

30 Aug 14:04

Choose a tag to compare

  • Android 64bit is built with 16KB page size support
  • Supprt GL_EXT_EGL_image_storage for drm, via global option "eglimage.storage=1"
  • VAAPI: prefer x11 display to support both EGL and GLX
  • Add privacy manifest for apple platforms
  • Improve demuxer cache
  • Enable http reconnect
  • Fix OpenGL symbols not resolved on android 15 emulator
  • Fix snapshot in OpenGL renderers
  • Fix snapshot callback not invoked if failed
  • Fix muxer write after close
  • Fix a decoder crash when stopping playback
  • Fix waitFor(State::Stopped)
  • Stop demuxer immediately if io is aborted.
  • Apply ffmmpeg muxer options
  • Prefer ffmpeg dynamic library even if statically linked. mainly used by iOS user provided FFmpeg.framework