Library / SDK
media-kit/media-kit avatar
media-kit/media-kit

media_kit: Cross-platform playback for Flutter and Dart

A cross-platform video player & audio player for Flutter & Dart.

1,845 stars504 forksDartMIT

At a glance

What is it?
media_kit packages video and audio playback across Android, iOS, macOS, Windows, GNU/Linux, and the web for Flutter and Dart applications. Its modular native dependencies and broad playback controls make it a credible option, but the README documents only a partial quick-start example.
Who is it for?
Flutter teams seeking one media-player interface across desktop, mobile, and web should start with media_kit, while audio-only or platform-specific projects should first compare the package footprint and initialization requirements. The first checks are the exact `pubspec.yaml` dependency set, native `media_kit_libs_video` or `media_kit_libs_audio` integration, and completion of application initialization before evaluating playback behavior.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 54 days ago.
What is it written in?
Mainly Dart, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.

Editorial analysis

media_kit's cross-platform playback scope

media_kit addresses applications that need media playback through Dart and Flutter code rather than maintaining separate player integrations for each target. It is intended for Flutter developers building applications that play video or audio on Android, iOS, macOS, Windows, GNU/Linux, and the web. The repository describes it as a cross-platform video player and audio player, with one primary package and separate rendering and native-library packages.

The supported scope is broad. The README lists video and audio playback for all six target families. It also lists format and codec support, hardware or GPU acceleration, playlists, volume, rate and pitch changes, audio, video and subtitle track selection, external audio and subtitle tracks, HTTP headers, video controls, subtitle styling, and screenshots. Those are relevant capabilities for media-heavy Flutter applications, although the README does not provide a codec compatibility matrix or explain which features behave identically on every platform.

The architecture is intentionally split into packages. Based on the repository layout, `media_kit/` contains the primary package, `media_kit_video/` contains video rendering, and `libs/` is associated with native dependencies supplied through packages such as `media_kit_libs_video` and `media_kit_libs_audio`. The `media_kit_test/` directory appears to be the project's test application, while `video_player_media_kit/` is a separate repository entry related to the Flutter video player plugin. That separation means application developers choose only the components required for their playback use case, with the stated goal of reducing bundle size.

Selecting media_kit's native dependency packages

The README does not present media_kit as one dependency to add indiscriminately. It splits installation according to whether the application renders video or only plays audio. A video application needs the primary package, the video rendering package, and the video native library package. An audio-only application uses the primary package with the audio native library package instead.

For a video application, the documented dependency set is:

yaml
dependencies:
  media_kit: ^1.2.6 # Primary package.
  media_kit_video: ^2.0.1 # For video rendering.
  media_kit_libs_video: ^1.0.7 # Native video dependencies.

This configuration separates Dart-level playback from Flutter video rendering and native playback dependencies. The README specifically warns that the video libraries should be selected when both video and audio support are needed. It also states that `media_kit_libs_video` and `media_kit_libs_audio` must not be mixed. An audio-only application should instead use:

yaml
dependencies:
  media_kit: ^1.2.6 # Primary package.
  media_kit_libs_audio: ^1.0.7 # Native audio dependencies.

That distinction has direct consequences for package resolution and application size. Adding the video rendering package when only audio is required would contradict the README's modular installation guidance. Conversely, an application that later gains video output must move to the documented video library set rather than combine both native library packages.

media_kit's playback architecture and data path

The repository package layout indicates a layered design. Application code imports `media_kit`, while Flutter video output is handled through `media_kit_video`. Native playback components are supplied separately as `media_kit_libs_video` or `media_kit_libs_audio`. This arrangement keeps the primary Dart package independent of the selected output and native dependency set.

The repository topics include Dart and Flutter alongside C, C++, Objective-C, Java and Swift. That combination is consistent with a shared Dart package connected to platform-specific native code. The topics also include `libmpv`, identifying the native media engine associated with the project. The README does not trace a method call from Dart through a platform channel into libmpv, so the exact internal bridge and buffering sequence cannot be confirmed from the repository documentation. What can be confirmed is the division between the primary package, rendering package, and native libraries.

The documented features also imply several distinct operational paths. Opening a media source leads to playback, with headers available when a server requires them. Playlists can move forward, backward, jump, and shuffle. Track selection covers audio, video and subtitles, including external tracks, while subtitle styling changes how subtitles appear in the rendered output. Screenshot support applies to video output rather than an audio-only installation. Volume, playback rate and pitch are separate controls, which matters for applications whose playback requirements extend beyond starting and stopping a file.

For the web, the same high-level feature list is presented, but the README does not document browser-specific limitations, media element behavior, or which native functionality changes on that target.

A documented first media_kit setup

The first concrete step for a video application is to add the three documented dependencies to `pubspec.yaml`. Developers should check that the application is using Flutter and Dart before applying the video configuration. The exact dependency versions should also be checked against the project's Flutter and Dart constraints, because the README does not state those compatibility ranges.

After resolving the dependencies, the README begins its quick-start Dart example with Flutter's Material library and an import from media_kit:

dart
import 'package:flutter/material.dart';

// Make sure to add following packages to pubspec.yaml:
// * media_kit
// * media_kit_video
// * media_kit_libs_video
import 'package:media_kit/medi

The README text ends at the `package:media_kit/medi` line in the available project copy. It therefore does not provide a complete import path, player construction, media opening, video controller configuration, or application initialization. Inventing the missing lines would produce a tutorial that the repository text cannot substantiate. A complete first-use implementation requires consulting the full example or the package documentation included with the selected version.

The README also gives two build-related constraints. It states that release-mode performance is substantially higher than debug-mode performance, so performance evaluation should not be based on a debug build. On Android, it recommends enabling `--split-per-abi` or using an app bundle instead of an APK. Those choices affect how the native media components are delivered and should be configured before judging package size or playback behavior.

Platform support and media_kit's operational limits

The platform table sets minimum operating-system targets: Android 5.0 or above, iOS 9 or above, macOS 10.9 or above, and Windows 7 or above. For GNU/Linux, the README says any modern GNU/Linux distribution, and for the web it says any modern web browser. These statements establish nominal target coverage, but they do not promise identical codec availability on every device or operating-system version.

A major limitation is the gap between feature availability and documentation depth. The README lists wide format and codec support, external subtitles, HTTP headers, screenshots, pitch changes, track selection and subtitle styling, yet it supplies no per-platform support matrix. A team deciding whether media_kit fits a release target would still need to verify the required codecs, HTTP behavior, external-track formats, subtitles, and rendering features on each platform it intends to ship. The README is silent on codec-specific exceptions and on how playback failure is surfaced.

The package split is another practical constraint. A video application carries `media_kit_video` and `media_kit_libs_video`; an audio application carries `media_kit_libs_audio` instead. Mixing the two native library packages is explicitly prohibited. This reduces unnecessary dependencies for a disciplined configuration, but it also means package choices must follow the final rendering requirements.

The project is therefore not a universal fit for every media requirement. A web-only application with simple controls may carry more architecture than it needs. A native platform application that already depends on platform-specific playback behavior may require exact feature parity that the README does not establish. Similarly, teams that need a fully documented one-file setup will find the truncated quick-start incomplete.

media_kit versus a platform-specific Flutter player integration

The repository includes a `video_player_media_kit/` entry alongside its primary package set.

The practical difference is the area each approach owns. A platform-specific integration generally couples an application to the target platform's player and requires separate platform coverage. media_kit centralizes its playback model in Dart and Flutter packages, then separates native libraries from rendering so the same high-level project can target mobile, desktop, Linux and web. Its documented playlist, track, subtitle, rate, pitch, header and screenshot features also put more media operations behind one interface.

The trade-off is platform certainty. media_kit states broad support across its package set, but the README does not map every listed feature to every platform or spell out how web playback differs from native playback. A team whose decision depends on precise native-player behavior should compare required codecs and feature parity against the exact target configuration rather than relying on the general cross-platform label.

For audio-only applications, the comparison is simpler. media_kit provides `media_kit_libs_audio` without `media_kit_video`, so teams can retain a Dart-oriented player interface while excluding video rendering. That is the clearest reason to use media_kit rather than adopt a video-centered integration solely for audio.

Release cadence, upgrades, and MIT licensing

The repository is not archived, and its last push was on 2026-08-30. The release list shows `media_kit-v1.1.10` and `media_kit_video-v1.2.3` dated 2023-10-19, plus `media_kit_video-v1.2.2` dated 2023-10-16. These dates show a repository push after the listed releases, but they do not document the contents or stability of changes made after those release tags.

The README's installation example uses newer constraints, including `media_kit: ^1.2.6`, `media_kit_video: ^2.0.1`, and native library versions at `^1.0.7`. This difference from the listed recent release names makes dependency selection an explicit upgrade concern. Developers should compare the versions documented for the application against the package versions actually resolved by Flutter and Dart. Because the project is split across packages, an upgrade can involve the primary package, rendering package, native library package, or all three.

Native dependencies also add platform build considerations. The Android guidance addresses ABI splitting and app bundles, while the repository's native-language topics and multi-platform demos show that playback is not confined to Dart code. Upgrade testing consequently needs to cover the target platforms and the selected dependency combination, especially the rule against mixing `media_kit_libs_video` and `media_kit_libs_audio`.

The repository is licensed under MIT. That permits use, modification, distribution and sublicensing subject to the license terms and preservation of the required notice. The MIT label does not remove the need to review the full `LICENSE` file and the notices distributed with application dependencies.

Editorial conclusion

Flutter teams seeking one media-player interface across desktop, mobile, and web should start with media_kit, while audio-only or platform-specific projects should first compare the package footprint and initialization requirements. The first checks are the exact `pubspec.yaml` dependency set, native `media_kit_libs_video` or `media_kit_libs_audio` integration, and completion of application initialization before evaluating playback behavior.

Frequently asked questions

Which packages should a Flutter app add for media_kit video playback?

The README lists `media_kit`, `media_kit_video`, and `media_kit_libs_video`. It also says to use the video libraries when both video and audio support are required.

Does an audio-only media_kit app need media_kit_video?

No. The documented audio-only dependency set contains `media_kit` and `media_kit_libs_audio`. `media_kit_video` is listed for video rendering.

Can media_kit_libs_video and media_kit_libs_audio be used together?

The README explicitly says that `media_kit_libs_video` and `media_kit_libs_audio` should not be mixed. Apps needing both audio and video should select the video libraries.

Official sources

  1. License: MIT
  2. media-kit/media-kit on GitHub
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/media-kit-media-kit.svg)](https://hysenlabs.com/projects/media-kit-media-kit)

Was this useful?