CLI for splitting motion photo files into separate picture and vide file.
Project description
Motion photo splitter
Take list of filenames containing joined photo and video and split them in two separate files.
Usefull eg for samsung motion photo files
Install
The package is ready on PYPI, python3.5+ needed.
pip3 install motion-photo-splitter
Usage
Usage: motion_photo_splitter [OPTIONS] [FILENAMES]...
Take list of filenames containing joined photo and video and split them in
two separate files.
Works for samsung motion photos by default - they contain
"MotionPhoto_data" edge marker - but any other marker text can be passed.
NOTE: how the output file names are constructed:
`{path_prefix}{fname_orig}{pic_suffix}` - for picture files
`{path_prefix}{fname_orig}{vid_suffix}` - for video files
WARNING: If you set empty string as the file suffix, the original file
gets overwritten! WARNING: If using the `path-prefix`, you should create
the folders yourself.
Options:
-q, --quiet supress all output
-m, --marker TEXT The utf-8 encoded edge marker text. Default is for
samsung motion photos [default: MotionPhoto_Data]
--pic-suffix TEXT Suffix of the splitted picture file. [default: .jpg]
--vid-suffix TEXT Suffix of the splitted video file. [default: .mp4]
--path-prefix TEXT Prefix of the splitted files path - eg to put them in
subfolder `out/`. [default: ]
--help Show this message and exit.
Examples
One file
> motion_photo_splitter images/pic.jpg
image/pic.jpg :: exporting image/pic.jpg.jpg [3.69 MB] && image/pic.jpg.mp4 [1.13 MB]
Multiple files with different suffixes
> motion_photo_splitter --pic-suffix=.jpeg --vid-suffix=.mpeg4 images/pic1.jpg images/pic2.jpg
image/pic1.jpg :: exporting image/pic1.jpg.jpeg [3.69 MB] && image/pic1.jpg.mpeg4 [1.13 MB]
image/pic2.jpg :: exporting image/pic2.jpg.jpeg [3.69 MB] && image/pic2.jpg.mpeg4 [1.13 MB]
Prefix folder
> mkdir out
> motion_photo_splitter pic.jpg --path-prefix="out/"
pic.jpg :: exporting out/pic.jpg.jpg [3.69 MB] && out/pic.jpg.mp4 [1.13 MB]
Links
Wrote from scratch.
Other projects with the similar goal:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for motion_photo_splitter-1.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6822568ac33e7054f477a34fe44ebaccc071f15b5d0133dd57c05946d66c3b3c |
|
MD5 | 75450450941a9c50bc41fb0d4caff215 |
|
BLAKE2b-256 | 0302acacba490ca937d8b1657db6699424c217d216ee5a38e300ef1d2c36724f |
Close
Hashes for motion_photo_splitter-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 110557d3259f35bc7a6adc6fc9c53ef2cd9330829b5e5644f461ffea4b05f2a3 |
|
MD5 | f98e8b971ebf24219cde52e562640320 |
|
BLAKE2b-256 | 733885b29b93c643cfd2aad53f572c068d49e72ea57e22c1d0b3ca9dd5ed173a |