Videna is a video decoding and playback library for flutter on Windows and Linux.
To use this package, add videna
as a dependency in your pubspec.yaml
file.
dependencies:
videna: ^0.0.1
Then, run the following command in your terminal to fetch the package:
$ flutter pub get
Import the package into your Dart file:
import 'package:videna/videna.dart';
To play a local video file, you can use the Video widget:
final video = Video();
video.open('path_to_video_file.mp4');
Similarly, to decode a video, use the videnaPlayer class:
final videna = VidenaPlayer(imageCallback: (videoFrame) {},
imageMetadataCallback: (videoFrameMetadata) {},
progressCallback: (progress) {});
videna.open(file: 'path_to_video_file.mp4',
speed: double.infinity,
imgFormat: ImageFormat.yuv420P);
To get metadata from a video file:
MediaMetadata m;
m = getMediaMetadataSync('path_to_video_file.mp4');
// Or
m = await getMediaMetadata('path_to_video_file.mp4');
For a complete example, please refer to the example directory in this repository.
Contributions are welcome! If you encounter any issues or have suggestions for improvements, please open an issue on the GitHub repository.
This project is licensed under the LGPL 2.1 License.
Thank you to the contributors of the Flutter framework for providing a robust platform for building cross-platform applications and also to contributors of the FFmpeg project for building such reliable tools.
For any inquiries or support, please contact stalejko@gmail.com.