Skip to content
/ fvp Public
forked from wang-bin/fvp

Flutter official video player plugin based on libmdk for all desktop+mobile platforms. download prebuilt examples from github actions. https://pub.dev/packages/fvp

License

Notifications You must be signed in to change notification settings

lecletest/fvp

 
 

Repository files navigation

FVP

A plugin for Flutter Video Player to support all desktop and mobile platforms, with hardware accelerated decoding and optimal rendering. Based on libmdk.

Prebuilt example can be download from artifacts of github actions.

Features

  • All platforms: Windows, Linux, macOS, iOS, Android
  • Optimal render api: d3d11 for windows, metal for macOS/iOS, OpenGL for Linux and Android
  • Hardware decoders are enabled by default
  • Minimal code change for existing Video Player apps
  • Support most formats via FFmpeg demuxer and software decoders if not supported by gpu.

How to Use

flutter pub add fvp then add 2 lines in your video_player examples

import 'package:fvp/fvp.dart';

MdkVideoPlayer.registerWith();

To select other decoders, pass options like this

MdkVideoPlayer.registerWith({'video.decoders': ['D3D11', 'NVDEC', 'FFmpeg']}); // windows

Build this Git Repo

If you are developing this project

git submodule update --init
cd example
flutter run

Will download libmdk sdk if not found. You can also download the latest sdk for android, windows and linux manually and extract in android, windows and linux folder. macOS and iOS will download the latest sdk by cocoapods. To upgrade to the latest macOS/iOS sdk

cd examples/macos
pod deintegrate
pod cache clean mdk
pod install --verbose

Known Issues

  • Memory leak on linux if a player is disposed

Design

  • Playback control api in dart via ffi
  • Manage video renderers in platform specific manners. Receive player ptr via MethodChannel to construct player instance and set a renderer target.
  • Callbacks and events in C++ are notified by ReceivePort

Screenshots

fpv_android fvp_win fvp_linux fvp_macos

About

Flutter official video player plugin based on libmdk for all desktop+mobile platforms. download prebuilt examples from github actions. https://pub.dev/packages/fvp

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 53.1%
  • C++ 22.6%
  • CMake 13.9%
  • Swift 3.4%
  • C 2.9%
  • Java 2.3%
  • Other 1.8%