Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

For get video from motion photo for android.

License

NotificationsYou must be signed in to change notification settings

fluttercandies/mvimg

Repository files navigation

A library for handle mvimg.

The file type used in some android device.It like livephoto in iphone.

The file is composed of two files, jpg and mp4.

Usually, the jpg name isMVIMG_XXXXX.jpg.Or, the name isxxxx.MP.jpg.

For information about their differences, please referhere, or view thexap file in assets.

Usage

Add dependency

dependencies:mvimg:^1.0.0

Code

For pure dart

Themvimg package is pure dart, so you can use it in flutter or other dart project.

See theexample for more details.

import'dart:io';import'package:buff/buff_io.dart';import'package:mvimg/mvimg.dart';voidmain() {final mvimg=Mvimg(FileBufferInput.fromPath('assets/test.jpg'));  mvimg.decode();try {if (!mvimg.isMvimg()) {print('not mvimg');return;    }final img= mvimg.getImageBytes();final video= mvimg.getVideoBytes();final videoOutputPath='assets/split/output.mp4';final imgOutputPath='assets/split/output.jpg';final videoFile=File(videoOutputPath);final imgFile=File(imgOutputPath);    videoFile.createSync(recursive:true);    imgFile.createSync(recursive:true);    videoFile.writeAsBytesSync(video);    imgFile.writeAsBytesSync(img);  }finally {    mvimg.dispose();  }}

For flutter

You can see theflutter example to learn how to use it in flutter.

Themain.dart of flutter.

License

Apache License 2.0

About

For get video from motion photo for android.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp