Code Monkey home page Code Monkey logo

iphone-media-splitter's Introduction

iPhone Media Splitter

Allows copying photos, videos, and screen recordings into individual folders.

iOS makes it difficult to cleanly/quickly separate different types of files. While it is possible to filter to "only videos", "only live photos", or "only slow-mo", there is no way to filter to "only photos". I've written an article about this tool here talking about how it works.

When backing up your media from an iOS device, you can bulk copy all of the files into a single folder and then use this tool to separate the different types into separate folders.

Example command:

process.py --source "/path/to/all/media/from/iphone" --photo_dest "/path/to/only/photos" --video_dest "/path/to/only/videos" --stray_dest "/path/for/misc/stuff"

The video files associated with live photos will be copied to be alongside their photos and are not treated the same as actual videos.

"Works On My Machine" disclaimer!

I developed this tool based on parsing files from iOS 15 and 16. It is possible other versions of iOS do not include the metadata that this tool depends on to work.

How to Install

Every platform is different so these instructions are only in general terms.

  1. Download the *.py files in the splitter directory.
    • Or install git and git clone this repository.
  2. Install ExifTool.
    • Make sure it's in your PATH environment variable so your command-line is able to run it.
  3. Install MediaInfo.
    • You need its library to be available for pymediainfo to use it.
  4. Use a Python virtual environment with pip to set up the dependencies for this tool.

Known Problems

  • Modified files (ex: cropped or marked up images) might not be detected because they can have metadata stripped away.
  • Can be slow depending on amount of files. I did not multi-thread this tool yet.
    • FWIW: The initial run will be slow but you can clear out the --source directory of the files you have already processed and it won't take very long for incremental runs.

Future Work

  • Support differentiating between your own files and files that were sent to you.

iphone-media-splitter's People

Contributors

nekorevend avatar

Stargazers

Shawn Charles avatar Jason Banich avatar

Watchers

Jason Banich avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.