Skip to content

wang-bin/mdk-sdk

Repository files navigation

Build status github

Build Status

Download Nightly Build SDK

SourceforgeSourceforge Github ReleasesGithub Release NuGetNuGet

Changelog. API

Features

Install

CMake

  include(${MDK_SDK_DIR}/lib/cmake/FindMDK.cmake)
  target_link_libraries(your_target PRIVATE mdk)

Qt qmake

include($$MDK_SDK_DIR/mdk.pri)

CocoaPods

(Objective-)C/C++ Users

pod 'mdk'

Optionally you can use mdk.xcframework directly.

Swift Users

pod 'swift-mdk'

and add

import swift_mdk

Nuget

Install via NuGet in Visual Studio for both Windows desktop and UWP

macOS Hardened Runtime

You may fail to run(or codesign) with default hardened runtime options because there are some dylib files in mdk.framework not signed correctly. You can either select Disable Library Validation in Hardened Runtime options, or sign dylib(RECOMMENDED): In Build Phase, add a New Run Script Phase with content

[ -n "$CODE_SIGN_IDENTITY" ] && find "$BUILT_PRODUCTS_DIR" -depth -path "*mdk.framework/*" -name "lib*.dylib" -exec codesign -f -vvvv -s"${EXPANDED_CODE_SIGN_IDENTITY}" ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements,flags {} \;

Distribute

  • mdk(libmdk.so.0/ibmdk.dylib/mdk.dll) and ffmpeg library(or standard ffmpeg libraries) are always REQUIRED
  • libass.dll/libass.dylib/ass.framework/libass.so can be optional if not using subtitle rendering
  • mdk-braw.dll/libmdk-braw.{so,dylib}: optional, for blackmagic raw videos
  • mdk-r3d.dll/libmdk-r3d.{so,dylib}: optional, for RED raw videos
  • mdk.pdb/libmdk.so*.dsym: debug symbols.
  • Add libdav1d.dll/libdav1d.dylib/dav1d.framework/libdav1d.so from to support av1 software decoding

Documents

Recommended settings

  • macOS, iOS: player.setDecoders(MediaType::Video, {"VT", "hap", "FFmpeg", "dav1d"});
  • Windows: player.setDecoders(MediaType::Video, {"MFT:d3d=11", "D3D11", "CUDA", "hap", "FFmpeg", "dav1d"});
  • Linux:
    // XInitThreads(); // If using x11. before any x11 api call. some gui toolkits already call this, e.g. qt, glfw
    SetGlobalOption("X11Display", DisplayPtr); // If using x11. Requred by VAAPI, VDPAU
    player.setDecoders(MediaType::Video, {"VAAPI", "VDPAU", "CUDA", "hap", "FFmpeg", "dav1d"});
  • Raspberry Pi: use mdk-sdk-linux.tar.xz, delete libffmpeg.so.* to use system ffmpeg to support h264, hevc hardware decoder and 0-copy rendering
    player.setDecoders(MediaType::Video, {"V4L2M2M", "FFmpeg:hwcontext=drm", "FFmpeg"});
  • Android:
    SetGlobalOption("JavaVM", JvmPtr); // REQUIRED
    player.setDecoders(MediaType::Video, {"AMediaCodec", "FFmpeg", "dav1d"});

Open Source

Modules and Dependencies

Examples and Plugins for Other Frameworks

Language Bindings

Sponsors

Sportimization

Users

BigRingVR Seer HeavyM Sportimization SureyyaSoft Flyability Quipu GyroFlow XnViewMP www.connecting-technology kalismart NOTIONTHEORY smartplayer smartplayer

! DaKanji Fimosa

金嵘达科技 爱玩宝

License

  • Free for opensource projects, QtAV donors and contributors: you can acquire a key from me. Can be commercial software
  • Free for Flutter users. A key is already included. Can be commercial softwares.
  • Free for other non-commercial users: you can acquire a key from me.
  • Commercial license for other users: a key for an app for a single platform or multiple platforms.
  • Other users without a key: make sure your sdk is updated, otherwise you may see an QR image in the last frame.

License key generator and validator is open source