SM Motion Photo
This crate provides functions for extracting video from Motion Photos and getting meta-information from the video. It is a feature of Samsung phones, a JPEG file with a video file embedded.
This feature is available on Galaxy S20, S20+, S20 Ultra, Z Flip, Note10, Note10+, S10e, S10, S10+, Fold, Note9, S9, S9+, Note8, S8, S8+, S7, and S7 edge.
Supports photos saved in JPEG and HEIF (HEIC) format.
Usage
use File;
use SmMotion;
// open file
let photo_file = open.unwrap;
let mut sm = with.unwrap;
println!;
let mut video_file = create.unwrap;
// dump mp4 from jpeg
sm.dump_video_file.unwrap;
// get video duration (no dump needed)
println!;
// get MP4 file context
println!;
// You can also save index and use it afterwards
let mut sm_cached = with_precalculated.unwrap;
println!;