From 131172eeec9037a906a296b36cc595ff1b1ff711 Mon Sep 17 00:00:00 2001 From: Kevin Rode Date: Mon, 19 Oct 2020 20:17:59 -0400 Subject: [PATCH] Initial Commit --- MVIMG_Carver.py | 19 +++++++++++++++++++ README.md | 8 ++++++++ requirements.txt | 1 + 3 files changed, 28 insertions(+) create mode 100644 MVIMG_Carver.py create mode 100644 README.md create mode 100644 requirements.txt diff --git a/MVIMG_Carver.py b/MVIMG_Carver.py new file mode 100644 index 0000000..7f31f56 --- /dev/null +++ b/MVIMG_Carver.py @@ -0,0 +1,19 @@ +import os, exiftool +for file in os.listdir(os.getcwd()): + try: + with exiftool.ExifTool() as et: + offset = et.get_tag('MicroVideoOffset', file) + if offset != None and offset != '' : + print(offset) + size = os.path.getsize(file) + print(offset) + offset = int(size)-int(offset) + with open(file, "rb") as infile: + infile.seek(int(offset)) + data = infile.read() + with open(file+".mp4", "wb") as outfile: + outfile.write(data) + else: + pass + except ValueError: + pass diff --git a/README.md b/README.md new file mode 100644 index 0000000..7a4eb2b --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +# Motion Photo Carver +This tool is designed to carve out the video segment of Motion Videos from an android device. It is written in python 2.7 to ease porting it to the Magnet Axiom Artifact Exchange. +## Requirements +* Python 2.7 +* PyExifTool \(Found [here](https://github.com/smarnach/pyexiftool)\) +## Usage +Begin by running `pip install -r requirements.txt` \ +The script can then be used by placing it in the same directory as extracted MVIMG files and running `python MVIMG_Carver.py` diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..caab00f --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +pyexiftool==0.1.1