PyMediaInfo CLI
This is a command-line interface (CLI) for the pymediainfo library, which provides a way to extract metadata from media files.
Requirement
pymediainfo is a simple wrapper around the MediaInfo library, which you can find at https://mediaarea.net/en/MediaInfo.
- Without the library, this package cannot parse media files, which severely limits its functionality.
- Binary wheels containing a bundled library version are provided for Windows and Mac OS X.
- Packages are available for several major Linux distributions. They depend on the library most of the time and are the preferred way to use pymediainfo on Linux unless a specific version of the package is required.
Installation
You can install this CLI using pip:
pip install pymediainfo-cli
Usage
You can use this CLI by running the pymediainfo command followed by the path to a media file:
pymediainfo-cli path/to/media/file
This will print the metadata for the media file in a human-readable format.
You can also specify various options to control the output:
--output-formator-f: Output format (table, json)--generalor-g: Include General tracks--videoor-v: Include Video tracks--audioor-a: Include Audio tracks--textor-t: Include Text tracks--imageor-i: Include Image tracks--otheror-o: Include Other tracks--menuor-m: Include Menu tracks--parse-speedor-p: MediaInfo parse speed (0-1)--output-file: Write output to a file (optional)
For example, you can use the -f json to output the metadata in JSON format:
pymediainfo-cli path/to/media/file -f json
More information with:
pymediainfo-cli --help
Contributing
Contributions are welcome! Please feel free to submit a pull request.
I use Poetry to mange dependancies see: https://python-poetry.org/
Clone the repo
git clone https://github.com/GuiEpi/pymediainfo-cli.git
Install dependancies
poetry install
Run
poetry run pymediainfo-cli --help
Testing
poetry run pytest tests/test.py
License
This project is licensed under the MIT License.
Credits
This project was inspired by pymediainfo.
Metadata
Release files for pymediainfo-cli 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pymediainfo_cli-0.2.1.tar.gz | 4.3 kB | Without provenance | Details for pymediainfo_cli-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pymediainfo_cli-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for pymediainfo_cli-0.2.1-py3-none-any.whl |
Total release size: 9.6 kB
Release files / pymediainfo_cli-0.2.1.tar.gz
| Download URL | pymediainfo_cli-0.2.1.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
72a716dd08d26c35dc767ed4a4b29dc9cf594c9f16ceb32e4ac7bd0a6e5f43ef
|
|
BLAKE2b-256 checksum How to use checksums |
55971f3d5b60c20fcc64984e347cca9c95884fc584094efe343de789a0131c03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.0 CPython/3.11.6 Linux/6.2.0-1015-azure
|
Release files / pymediainfo_cli-0.2.1-py3-none-any.whl
| Download URL | pymediainfo_cli-0.2.1-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a712d5394943da6076c940673966cb9015a9f85c789cda9885f8b7caf228b29f
|
|
BLAKE2b-256 checksum How to use checksums |
18199ef002d17787b72e42900dd3ce979b5c48bbefd6dc64a38a9bef8c595930
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.0 CPython/3.11.6 Linux/6.2.0-1015-azure
|
Security for pymediainfo-cli 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.