Name | mpeg-convert JSON |
Version |
0.2.1
JSON |
| download |
home_page | None |
Summary | A python wrapper that enhances the user experience and productivity when using ffmpeg |
upload_time | 2024-05-23 23:54:13 |
maintainer | None |
docs_url | None |
author | Zichen |
requires_python | >=3.7 |
license | MIT |
keywords |
transcode
ffmpeg
convert
media
mp4
mp3
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
A customizable<sup>[1](#Configuring)</sup> tool that provides some quality-of-life additions for [FFmpeg](https://ffmpeg.org) such as pretty printing, progress bars, and command presets. This tool does not aim to replace FFmpeg or other transcoding software such as [Handbrake](https://handbrake.fr/). Rather, it tries to provide an easier to use interface to FFmpeg for simple operations.
## Installation
Ensure [Python](https://www.python.org/downloads/) and [FFmpeg](https://ffmpeg.org/download.html) is installed. Then, use the [Python Packaging Index](https://pypi.org/) (PyPI) to install `mpeg-convert` and its dependencies. You may need to use `pip3` instead of `pip` in certain environments:
```bash
$ pip install --upgrade mpeg-convert
$ mpeg-convert --help
```
See [usages](#Usage) and [configuring](#Configuring) for more details.
## Usage
The most basic way to use `mpeg-convert` is to specify an input file path and an output file path. `mpeg-convert` will then call FFmpeg to initiate the conversion, and display a bar indicating the progress of the conversion. No extra FFmpeg options will be added when transcoding the file. This is demonstrated with the command and screenshot below:
```bash
$ mpeg-convert sample.mp4 output.mov
```
![no_preset_nobg](https://github.com/SomedudeX/mpeg-convert/assets/101906945/f990118f-0f3c-4f0d-aabf-5afa65efdb37)
For conversions where you may need or want to tweak extra options (e.g. frame rate, contrast, or bitrate changes), you can add a named or unnamed preset by following the [configuration guide](#Configuring). After you have saved your custom preset to the config file, you can use it by using the `--preset` flag for named presets, or convert between matching file containers/extensions for unnamed presets. This will use the extra custom FFmpeg options you specified in the preset when transcoding. This is demonstrated below:
```bash
$ mpeg-convert sample.mp4 output.mov --preset="custom-1080p"
```
![yes_preset_nobg](https://github.com/SomedudeX/mpeg-convert/assets/101906945/44503c85-5bed-441a-9f6d-c241820b8c09)
As of writing, presets are the only method to use FFmpeg options while converting with `mpeg-convert`. Additionally, multiple inputs and other advanced FFmpeg features are not supported by `mpeg-convert`. Such feature is unlikely to be added to `mpeg-convert`, since it is written as a complement, not replacement, to FFmpeg; consider directly using FFmpeg or other UI based programs such as Handbrake for such tasks.
## Configuring
**Presets** allows you to save FFmpeg commands for repeated use, eliminating the need to enter long and complex flag/options each time you need to convert or edit media files. You can add presets to `mpeg-convert` by editing the YAML configuration file. To open the config, use the `--config` flag as demonstrated below:
```bash
$ mpeg-convert --config
```
There are two types of presets you can specify in the config file: named presets and unnamed presets.
* **Named presets** are invoked when you explicitly use the `--preset` flag. You can add a named preset under the `named` key. Each named preset must have a unique name and a string of ffmpeg options. To activate a named preset, specify its name with the `--preset` flag, and `mpeg-convert` will use the options when converting. An example of a named preset is below:
```yml
named:
- name: "custom-1080p"
options: "-vf scale=1920x1080 -r 24"
```
* **Unnamed presets** are applied automatically to conversions of specific file types and extensions. They are useful when you want conversions between one container type and another container type to always use certain FFmpeg options. Each unnamed preset must have an array of file extensions in `from-type` and `to-type`, and a string of FFmpeg options; and voilĂ , whenever you convert between any of the file extensions in `from-type` to any of the extensions in `to-type`, `mpeg-convert` will automatically use the FFmpeg options specified in the unnamed preset. An example of an unnamed preset is below:
```yml
unnamed:
- from-type: ["mp4", "mov"]
to-type: ["gif"]
command: "-vf scale=1280x720 -r 8"
```
If you have an unnamed preset specified for a file type you are converting to/from, but you would like to temporarily disable it, you can use the `--plain` flag. This will remove any FFmpeg options for the current conversion.
When searching for matching presets, `mpeg-convert` will check using the following order:
* Check if `--plain` flag is specified. If not...
* Check if `--preset` flag is specified. If not...
* Check if there is a matching unnamed preset. If not...
* Initiate the conversion without any FFmpeg commands
## Troubleshooting
* Do you have python installed?
* Do you have ffmpeg installed?
* Common pitfalls:
+ Does the output file have an extension?
+ Does the extension match the codec?
- `HEVC` with `.mp4`
- `ALAC` with `.m4a`
+ Is the encoder installed on your system?
## Notes
This project has undergone substantial changes in `v0.2.0`. Click [here](https://github.com/SomedudeX/mpeg-convert/blob/15f4026633c5da667e6283cdeb78d82b29cd1b3d/README.md) if you are looking for documentation before `v0.2.0`
This project has been tested in the following environments:
* Python 3.9.1 (Windows)
* Python 3.8.19 (Linux)
* Python 3.12.2 (macOS)
--
Raw data
{
"_id": null,
"home_page": null,
"name": "mpeg-convert",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "transcode, ffmpeg, convert, media, mp4, mp3",
"author": "Zichen",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/50/15/d1fbd5eebcb54ab7286b5caae4ae5ea94e985dee3008bc99058cfce76284/mpeg_convert-0.2.1.tar.gz",
"platform": null,
"description": "A customizable<sup>[1](#Configuring)</sup> tool that provides some quality-of-life additions for [FFmpeg](https://ffmpeg.org) such as pretty printing, progress bars, and command presets. This tool does not aim to replace FFmpeg or other transcoding software such as [Handbrake](https://handbrake.fr/). Rather, it tries to provide an easier to use interface to FFmpeg for simple operations. \n\n## Installation \n\nEnsure [Python](https://www.python.org/downloads/) and [FFmpeg](https://ffmpeg.org/download.html) is installed. Then, use the [Python Packaging Index](https://pypi.org/) (PyPI) to install `mpeg-convert` and its dependencies. You may need to use `pip3` instead of `pip` in certain environments: \n\n```bash\n$ pip install --upgrade mpeg-convert\n$ mpeg-convert --help\n```\n\nSee [usages](#Usage) and [configuring](#Configuring) for more details. \n\n## Usage\n\nThe most basic way to use `mpeg-convert` is to specify an input file path and an output file path. `mpeg-convert` will then call FFmpeg to initiate the conversion, and display a bar indicating the progress of the conversion. No extra FFmpeg options will be added when transcoding the file. This is demonstrated with the command and screenshot below: \n\n```bash\n$ mpeg-convert sample.mp4 output.mov\n```\n\n![no_preset_nobg](https://github.com/SomedudeX/mpeg-convert/assets/101906945/f990118f-0f3c-4f0d-aabf-5afa65efdb37)\n\nFor conversions where you may need or want to tweak extra options (e.g. frame rate, contrast, or bitrate changes), you can add a named or unnamed preset by following the [configuration guide](#Configuring). After you have saved your custom preset to the config file, you can use it by using the `--preset` flag for named presets, or convert between matching file containers/extensions for unnamed presets. This will use the extra custom FFmpeg options you specified in the preset when transcoding. This is demonstrated below:\n\n```bash\n$ mpeg-convert sample.mp4 output.mov --preset=\"custom-1080p\"\n```\n\n![yes_preset_nobg](https://github.com/SomedudeX/mpeg-convert/assets/101906945/44503c85-5bed-441a-9f6d-c241820b8c09)\n\nAs of writing, presets are the only method to use FFmpeg options while converting with `mpeg-convert`. Additionally, multiple inputs and other advanced FFmpeg features are not supported by `mpeg-convert`. Such feature is unlikely to be added to `mpeg-convert`, since it is written as a complement, not replacement, to FFmpeg; consider directly using FFmpeg or other UI based programs such as Handbrake for such tasks. \n\n## Configuring\n\n**Presets** allows you to save FFmpeg commands for repeated use, eliminating the need to enter long and complex flag/options each time you need to convert or edit media files. You can add presets to `mpeg-convert` by editing the YAML configuration file. To open the config, use the `--config` flag as demonstrated below:\n\n```bash\n$ mpeg-convert --config\n```\n\nThere are two types of presets you can specify in the config file: named presets and unnamed presets.\n\n * **Named presets** are invoked when you explicitly use the `--preset` flag. You can add a named preset under the `named` key. Each named preset must have a unique name and a string of ffmpeg options. To activate a named preset, specify its name with the `--preset` flag, and `mpeg-convert` will use the options when converting. An example of a named preset is below:\n\n```yml\nnamed:\n- name: \"custom-1080p\"\n options: \"-vf scale=1920x1080 -r 24\"\n```\n\n * **Unnamed presets** are applied automatically to conversions of specific file types and extensions. They are useful when you want conversions between one container type and another container type to always use certain FFmpeg options. Each unnamed preset must have an array of file extensions in `from-type` and `to-type`, and a string of FFmpeg options; and voil\u00e0, whenever you convert between any of the file extensions in `from-type` to any of the extensions in `to-type`, `mpeg-convert` will automatically use the FFmpeg options specified in the unnamed preset. An example of an unnamed preset is below:\n\n```yml\nunnamed:\n- from-type: [\"mp4\", \"mov\"]\n to-type: [\"gif\"]\n command: \"-vf scale=1280x720 -r 8\"\n```\n\nIf you have an unnamed preset specified for a file type you are converting to/from, but you would like to temporarily disable it, you can use the `--plain` flag. This will remove any FFmpeg options for the current conversion.\n\nWhen searching for matching presets, `mpeg-convert` will check using the following order:\n * Check if `--plain` flag is specified. If not...\n * Check if `--preset` flag is specified. If not...\n * Check if there is a matching unnamed preset. If not...\n * Initiate the conversion without any FFmpeg commands\n\n## Troubleshooting\n\n* Do you have python installed?\n* Do you have ffmpeg installed?\n* Common pitfalls:\n + Does the output file have an extension?\n + Does the extension match the codec?\n - `HEVC` with `.mp4`\n - `ALAC` with `.m4a`\n + Is the encoder installed on your system?\n\n## Notes\n\nThis project has undergone substantial changes in `v0.2.0`. Click [here](https://github.com/SomedudeX/mpeg-convert/blob/15f4026633c5da667e6283cdeb78d82b29cd1b3d/README.md) if you are looking for documentation before `v0.2.0`\n\nThis project has been tested in the following environments:\n * Python 3.9.1 (Windows)\n * Python 3.8.19 (Linux)\n * Python 3.12.2 (macOS)\n\n--\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A python wrapper that enhances the user experience and productivity when using ffmpeg",
"version": "0.2.1",
"project_urls": {
"Homepage": "https://github.com/SomedudeX/mpeg-convert",
"Issues": "https://github.com/SomedudeX/mpeg-convert/issues"
},
"split_keywords": [
"transcode",
" ffmpeg",
" convert",
" media",
" mp4",
" mp3"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2498badc015858e9dfde56538fad4f4f3b1bbca6c0ddbf166531d7d54dfd8de5",
"md5": "a87301c50a3d8f193af21b42da160ea0",
"sha256": "bde192d698891961838440a7e043a26e3420c07a3c330be096d3a25419d25543"
},
"downloads": -1,
"filename": "mpeg_convert-0.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a87301c50a3d8f193af21b42da160ea0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 17326,
"upload_time": "2024-05-23T23:54:11",
"upload_time_iso_8601": "2024-05-23T23:54:11.333484Z",
"url": "https://files.pythonhosted.org/packages/24/98/badc015858e9dfde56538fad4f4f3b1bbca6c0ddbf166531d7d54dfd8de5/mpeg_convert-0.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5015d1fbd5eebcb54ab7286b5caae4ae5ea94e985dee3008bc99058cfce76284",
"md5": "919a927aef1b1e2fbf097b49ff5afe9c",
"sha256": "f800694feaba844d42e45b3bcae2e5c704dab27029123e72342a86c42fc260a7"
},
"downloads": -1,
"filename": "mpeg_convert-0.2.1.tar.gz",
"has_sig": false,
"md5_digest": "919a927aef1b1e2fbf097b49ff5afe9c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 17277,
"upload_time": "2024-05-23T23:54:13",
"upload_time_iso_8601": "2024-05-23T23:54:13.080393Z",
"url": "https://files.pythonhosted.org/packages/50/15/d1fbd5eebcb54ab7286b5caae4ae5ea94e985dee3008bc99058cfce76284/mpeg_convert-0.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-23 23:54:13",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "SomedudeX",
"github_project": "mpeg-convert",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "mpeg-convert"
}