-
-
Notifications
You must be signed in to change notification settings - Fork 33
Home
WangBin edited this page Jul 6, 2023
·
16 revisions
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.
- 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. You can use your own ffmpeg 4.0~6.x(or master branch) by removing bundled ffmpeg dynamic library.
- High performance. Lower cpu, gpu and memory load than libmpv based players.
- Small footprint. Only about 10MB size increase(platform dependent).
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
- 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