mdk 0.10.0

C/C++ Multimedia Development Kit

Install-Package mdk -Version 0.10.0
dotnet add package mdk --version 0.10.0
<PackageReference Include="mdk" Version="0.10.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add mdk --version 0.10.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

MDK: Multimedia Development Kit

Features

  • Simple and powerful API set
  • Cross platform: Windows, UWP, Linux, macOS, Android, iOS, Raspberry Pi
  • Hardware accelerated decoding and 0-copy GPU rendering for all supported platforms
  • OpenGL, D3D11, Vulkan and Metal rendering w/ or w/o user provided context
  • Integrated with any gui toolkit or app via OpenGL, D3D11, Vulkan and Metal (OBS, Qt, SDL, glfw, SFML and native ui etc.) easily
  • Seamless/Gapless media and bitrate switch for any media
  • Configurable FFmpeg runtime libraries.
  • HDR rendering in GPU
  • Optimized Continuous seeking. As fast as mpv, but much lower cpu, memory and gpu load. Suitable for timeline preview

FFmpeg Runtime Lookup

FFmpeg modules can be specified via environment var AVUTIL_LIB, AVCODEC_LIB, AVFORMAT_LIB, AVFILTER_LIB, SWRESAMPLE_LIB, SWSCALE_LIB, or SetGlobalOption() with key avutil_lib, avcodec_lib, avformat_lib, swresample_lib, swscale_lib, avfilter_lib. For example SetGlobalOption(&quot;avutil_lib&quot;, &quot;ffmpeg-4.dll&quot;)

If ffmpeg any module is not set, it's searched in the following order

  • current module dir > framework dir(apple) > system default search dir
  • single ffmpeg library > ffmpeg modules w/ version > ffmpeg modules w/o version

About SDK for Windows

SDK is built by clang-cl 11.0 + lld with

  • FFmpeg: https://sourceforge.net/projects/avbuild/files/windows-desktop/ffmpeg-master-windows-desktop-clang-static-lite.tar.xz/download
  • Windows SDK 10.0.19041.0
  • MSVC CRT 14.26.28801

SDK can be used by any C or C++11 compiler, e.g. vs2015, vs2017, mingw g++, clang

Use in Visual Studio

Install via NuGet (Recommended)

mdk is published on https://www.nuget.org/packages/mdk/. Now you can install it in visual studio.

Import from Release Package

mdk sdk can be imported by vs projects. Insert the following line in your vcxproj as the last element of Project (assume mdk-sdk is in the same dir as vcxproj)

<Import Project="mdk-sdk\build\native\MDK.targets" Condition="Exists('mdk-sdk\build\native\MDK.targets')" />

Once installed or imported, necessary compile flags and link flags will be added, runtime dlls will be copied to output dir.

Runtime Requirements

  • Vista+
  • ucrt, vc140+ runtime

Optional:

  • libEGL.dll, libGLESv2.dll, D3DCompiler_47/43.dll. Qt apps can use qt's dlls

Supported Graphics APIs:

  • D3D11: recommended
  • OpenGL(No UWP): via WGL. The default if EGL runtime is not found.
  • OpenGL ES2/3: via ANGLE or others. The default if EGL runtime is found.
  • Vulkan(No UWP)

Supported Decoders:

  • FFmpeg. options: threads=N. e.g. -c:v FFmpeg. -c:v FFmpeg:threads=4
  • MFT. options: d3d=0/9/11, pool=0/1. e.g. -c:v MFT(software), -c:v MFT:d3d=11(hardware).
  • CUDA(No UWP)
  • D3D11: via FFmpeg
  • DXVA(No UWP): via FFmpeg
  • NVDEC(No UWP): via FFmpeg
  • CUVID(No UWP): via FFmpeg
  • QSV(No UWP): via FFmpeg

Examples

gapless playback for any audio and video: mdkplay.exe(or glfwplay.exe/window.exe/sdlplay.exe) file file2 ...

N players for 1 video: multiplayers -es -share -c:v D3D11 -win N url

N videos and N players: multiplayers -es -share -c:v D3D11 url1 url2 ... urlN

N videos renderers for 1 player: multiwidnows url

Use in CMake Projects

	include(mdk-sdk-dir/lib/cmake/FindMDK.cmake)
	target_link_libraries(your_target PRIVATE mdk)

Source code:

  • some examples using mdk sdk: https://github.com/wang-bin/mdk-examples
  • OBS Studio plugin: https://github.com/wang-bin/obs-mdk
  • QtMultimedia plugin: https://github.com/wang-bin/qtmultimedia-plugins-mdk

Copyright (c) 2016-2020 WangBin(the author of QtAV) <wbsecg1 at gmail.com>
Free for opensource softwares, non-commercial softwares, QtAV donors and contributors.

MDK: Multimedia Development Kit

Features

  • Simple and powerful API set
  • Cross platform: Windows, UWP, Linux, macOS, Android, iOS, Raspberry Pi
  • Hardware accelerated decoding and 0-copy GPU rendering for all supported platforms
  • OpenGL, D3D11, Vulkan and Metal rendering w/ or w/o user provided context
  • Integrated with any gui toolkit or app via OpenGL, D3D11, Vulkan and Metal (OBS, Qt, SDL, glfw, SFML and native ui etc.) easily
  • Seamless/Gapless media and bitrate switch for any media
  • Configurable FFmpeg runtime libraries.
  • HDR rendering in GPU
  • Optimized Continuous seeking. As fast as mpv, but much lower cpu, memory and gpu load. Suitable for timeline preview

FFmpeg Runtime Lookup

FFmpeg modules can be specified via environment var AVUTIL_LIB, AVCODEC_LIB, AVFORMAT_LIB, AVFILTER_LIB, SWRESAMPLE_LIB, SWSCALE_LIB, or SetGlobalOption() with key avutil_lib, avcodec_lib, avformat_lib, swresample_lib, swscale_lib, avfilter_lib. For example SetGlobalOption(&quot;avutil_lib&quot;, &quot;ffmpeg-4.dll&quot;)

If ffmpeg any module is not set, it's searched in the following order

  • current module dir > framework dir(apple) > system default search dir
  • single ffmpeg library > ffmpeg modules w/ version > ffmpeg modules w/o version

About SDK for Windows

SDK is built by clang-cl 11.0 + lld with

  • FFmpeg: https://sourceforge.net/projects/avbuild/files/windows-desktop/ffmpeg-master-windows-desktop-clang-static-lite.tar.xz/download
  • Windows SDK 10.0.19041.0
  • MSVC CRT 14.26.28801

SDK can be used by any C or C++11 compiler, e.g. vs2015, vs2017, mingw g++, clang

Use in Visual Studio

Install via NuGet (Recommended)

mdk is published on https://www.nuget.org/packages/mdk/. Now you can install it in visual studio.

Import from Release Package

mdk sdk can be imported by vs projects. Insert the following line in your vcxproj as the last element of Project (assume mdk-sdk is in the same dir as vcxproj)

<Import Project="mdk-sdk\build\native\MDK.targets" Condition="Exists('mdk-sdk\build\native\MDK.targets')" />

Once installed or imported, necessary compile flags and link flags will be added, runtime dlls will be copied to output dir.

Runtime Requirements

  • Vista+
  • ucrt, vc140+ runtime

Optional:

  • libEGL.dll, libGLESv2.dll, D3DCompiler_47/43.dll. Qt apps can use qt's dlls

Supported Graphics APIs:

  • D3D11: recommended
  • OpenGL(No UWP): via WGL. The default if EGL runtime is not found.
  • OpenGL ES2/3: via ANGLE or others. The default if EGL runtime is found.
  • Vulkan(No UWP)

Supported Decoders:

  • FFmpeg. options: threads=N. e.g. -c:v FFmpeg. -c:v FFmpeg:threads=4
  • MFT. options: d3d=0/9/11, pool=0/1. e.g. -c:v MFT(software), -c:v MFT:d3d=11(hardware).
  • CUDA(No UWP)
  • D3D11: via FFmpeg
  • DXVA(No UWP): via FFmpeg
  • NVDEC(No UWP): via FFmpeg
  • CUVID(No UWP): via FFmpeg
  • QSV(No UWP): via FFmpeg

Examples

gapless playback for any audio and video: mdkplay.exe(or glfwplay.exe/window.exe/sdlplay.exe) file file2 ...

N players for 1 video: multiplayers -es -share -c:v D3D11 -win N url

N videos and N players: multiplayers -es -share -c:v D3D11 url1 url2 ... urlN

N videos renderers for 1 player: multiwidnows url

Use in CMake Projects

	include(mdk-sdk-dir/lib/cmake/FindMDK.cmake)
	target_link_libraries(your_target PRIVATE mdk)

Source code:

  • some examples using mdk sdk: https://github.com/wang-bin/mdk-examples
  • OBS Studio plugin: https://github.com/wang-bin/obs-mdk
  • QtMultimedia plugin: https://github.com/wang-bin/qtmultimedia-plugins-mdk

Copyright (c) 2016-2020 WangBin(the author of QtAV) <wbsecg1 at gmail.com>
Free for opensource softwares, non-commercial softwares, QtAV donors and contributors.

Release Notes

https://github.com/wang-bin/mdk-sdk/releases

Dependencies

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
0.10.0 54 9/1/2020
0.9.2 38 7/30/2020
0.8.1 138 5/1/2020