mollywoodnini / flutter_video_info

A flutter plugin to get basic metadatainfo of a video file.

Home Page:https://pub.dev/packages/flutter_video_info

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pub package pub package

flutter_video_info

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.

About

A flutter plugin to get basic metadatainfo of a video file.

https://pub.dev/packages/flutter_video_info

License:MIT License


Languages

Language:Dart 34.5%Language:Java 31.3%Language:Swift 23.9%Language:Ruby 5.6%Language:Objective-C 4.6%