Search packages, repositories and app categories

Package detailsv1.3.3

flutter_video_info

A flutter plugin to get basic metadata information of a video file.

AndroidiOS
30-day downloads
17.3K
Likes
73
Pub points
150

Install package

flutter pub add flutter_video_info

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

flutter_video_info is a Flutter plugin that extracts basic metadata from video files on Android and iOS devices. It provides essential information such as duration, resolution, frame rate, and file size without requiring external dependencies. The plugin is lightweight and designed for use in media applications where quick access to video properties is needed. It integrates seamlessly with Flutter's ecosystem and supports both platforms through native code bridges. Ideal for developers building video players, media libraries, or content management tools.

Use cases

  • Extracting video duration for playback controls
  • Displaying video resolution in media previews
  • Checking file size before downloading
  • Validating video format before processing
  • Building media library metadata displays

Key features

  • Supports Android and iOS
  • Retrieves duration, resolution, frame rate, and size
  • Lightweight and fast
  • No external dependencies
  • Simple API for metadata extraction

Suitable for

  • Media player apps
  • Video upload formatters
  • Content management systems
  • Media library interfaces
  • Cross-platform video utilities

Considerations

  • Requires platform-specific permissions for file access
  • Limited to basic metadata (no audio details)
  • Does not support streaming URLs
  • Metadata accuracy depends on source file integrity
  • May not work with encrypted or corrupted video files

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

pub package pub package

flutter_video_info 1.3.3

This plugin uses MediaMetadataRetriever class of native android to get basic meta information of a video file.

The following info can be extracted by this plugin:

title path author mimetype height width filesize duration orientation date framerate location

Installation & Uses

Add flutter_video_info as a dependency in your pubspec.yaml file (what?).

dependencies:
    flutter_video_info: <current version>

Import FlutterVideoInfo in your dart file.

import 'package:flutter_video_info/flutter_video_info.dart';

final videoInfo = FlutterVideoInfo();

String videoFilePath = "your_video_file_path";
var info = await videoInfo.getVideoInfo(videoFilePath);

//String title = info.title;   to get title of video
//similarly path,author,mimetype,height,width,filesize,duration,orientation,date,framerate,location can be extracted.

for iOS

If you select a video from your photo library, Add the following keys to your Info.plist file, located in /ios/Runner/Info.plist:

NSPhotoLibraryUsageDescription - describe why your app needs permission for the photo library. This is called Privacy - Photo Library Usage Description in the visual editor.

Troubleshooting

Checkout here

PR is welcomed

Anyone can pr for these issues

Categories

Dependencies

Dependency list 1 items

Source repository

Projects using this package