Simple python package wrapper for converting apple media formatted files into high-compatible formats.
Project description
APple Media TO (APMTO)
APMTO is a simple Python package wrapper to easily convert apple-formatted media files into highly-compatible formats.
Requirements
Operating System
OS independent.
Frameworks & Libraries
Python
See requirements.txt for more.
- Python 3 >= 3.9
- pillow
- pillow_heif
- ffmpeg-python
Installation
Installing FFmpeg
Please follow the instruction of ffmpeg-python repository to properly install FFmpeg framework.
Via PyPI
You can install the lastest apmto
package using the following command:
pip install apmto
or you can install from this GitHub repository.
pip install git+https://github.com/nda111/APMTO.git
Usage
Example Code
You can convert the files into high-compatible formats using the following code (file).
# example/convert.py
import apmto
apmto.heif_to_jpg('example/sample.heif') # for HEIF (or HEIC, HEIX) image files.
apmto.mov_to_mp4('example/sample.mov', verbose=True) # for MOV video files.
You can run this example code by this command.
python -m example.convert
If you want to specify ffmpeg
command arguments, try the following code.
import apmto
apmto.mov_to_mp4('example/sample.mov', verbose=True, option=dict(
vcodec='h264',
acodec='aac',
video_bitrate=1800 * 1000,
audio_bitrate=120 * 1000,
))
Format Support
Following table summarizes the supported formats.
Class | Source | Target |
---|---|---|
Image | HEIF HEIC HEIX |
JPG JPEG PNG |
Video | MOV |
MP4 MKV |
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
File details
Details for the file apmto-1.0.0.tar.gz
.
File metadata
- Download URL: apmto-1.0.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab2520492e01c67bc4e70ad17bfa0e08f988df80352aa5d46337e1bfed54a27a |
|
MD5 | ab552315f011306368d43aa57edf5a15 |
|
BLAKE2b-256 | 39a7c3eb9bc7515f90144e4dba731ab5274497368ecb53c2dfde0d66d8d2e7ed |
File details
Details for the file apmto-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: apmto-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0029ea38e17d78ad110a900c5f0474692e82907a8f1c4449f0a65b7c5065d2e2 |
|
MD5 | fe5fa3aaacbbfc8a21685099b3812e13 |
|
BLAKE2b-256 | 81a3cb70d967bd7442f9c59c0f3e556c28711295291e69c51aa01ba1c0e5a1b0 |