flutter_video_info
1.3.3, released 2 years ago by an unverified publisher
A Flutter plugin that extracts basic metadata from local video files on Android and iOS.
What it does
It uses the native MediaMetadataRetriever (Android) and equivalent iOS APIs to read title, path, author, mimetype, dimensions, filesize, duration, orientation, creation date, framerate and location of a video file. The data is returned as a simple Dart object.
AI-written summary of version 1.3.3, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to display or process video file information such as duration or resolution before playback
- You need to store or sort local videos based on their metadata
Skip it when
- You require video streaming or remote URL metadata
- You need advanced video processing or editing capabilities
- You target platforms other than Android or iOS
Strengths
- Native APIs provide accurate metadata
- Supports both Android and iOS
- Null‑safety and simple async API
Weaknesses
- Works only with local file paths
- Limited to the listed metadata fields
- May require additional permissions on Android and iOS
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 1
Add NSPhotoLibraryUsageDescription (and other needed keys) to iOS Info.plist; ensure appropriate Android permissions (e.g., READ_EXTERNAL_STORAGE) for accessing video files
import 'package:flutter_video_info/flutter_video_info.dart';
final videoInfo = FlutterVideoInfo();
var info = await videoInfo.getVideoInfo('path/to/video.mp4');
print('Duration: ${info.duration}, Width: ${info.width}, Height: ${info.height}');Alternatives
Packages that do the same job and could replace flutter_video_info.
- video_player_android
Android implementation of the video_player plugin
88Compare - video_player_avfoundation
iOS and macOS implementation of the video_player plugin
86Compare - flutter_recorder
Low-level cross-platform audio recorder plugin using miniaudio with real-time waveform, FFT and volume.
87Compare - native_video_player
A Flutter widget to play videos on iOS and Android using a native implementation.
67Compare