CLI version of the pymediainfo package
Project description
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-format
or-f
: Output format (table, json)--general
or-g
: Include General tracks--video
or-v
: Include Video tracks--audio
or-a
: Include Audio tracks--text
or-t
: Include Text tracks--image
or-i
: Include Image tracks--other
or-o
: Include Other tracks--menu
or-m
: Include Menu tracks--parse-speed
or-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
Testing
You can run the unit tests for this CLI using the pytest
:
poetry install
poetry run pytest tests/test.py
Contributing
Contributions are welcome! Please feel free to submit a pull request.
License
This project is licensed under the MIT License.
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
Hashes for pymediainfo_cli-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba86a622977aeb97244f84330da7a2dca52898e3954886d95c32518c539993e5 |
|
MD5 | 5a7cd4aa39813469874f279ee01ab6a3 |
|
BLAKE2b-256 | c3bc0655db35bf9c64496a9917c9c22d97dc4ef12163130e94784ca076c8671c |