Skip to main content

Python parser for MediaInfo text logs.

Project description

pymiparse

pymiparse is an easy to use parser for MediaInfo text logs. Most current MediaInfo parsing libraries for Python either act as straight wrappers around the MediaInfo binary or are only capable of translating XML output from MediaInfo.

In addition, pymiparse is capable of automatically parsing and identifying the following in a developer-friendly format, so that developers don’t have to:

  • All MediaInfo sections (General, Audio, Video, Text, Menu)

  • Filename and container

  • Primary video codec

  • Primary audio codec

  • Common audio channel configurations (1.0, 2.0, 2.1, 5.1, 7.1)

  • All audio languages

  • All subtitle languages

  • And more!

pymiparse is powerful and easy to use:

>>> import pymiparse
>>> with open('mediainfo_log.txt', 'r') as f:
...     logs = pymiparse.parse_from_file(f)
...
>>> logs[0].get_primary_video_codec()
'H.264'
>>> logs[0].get_primary_audio_codec()
'AAC'
>>> logs[0].get_primary_audio_channels()
'2.0'
>>> logs[0].get_audio_languages()
['Japanese']
>>> logs[0].get_subtitle_languages()
['English', 'Japanese']

Installing

pymiparse can be installed with pip:

$ pip install pymiparse

Alternatively, you can grab the latest source code from GitHub:

$ git clone git://github.com/wchill/pymiparse.git
$ python setup.py install

Documentation

To be completed…

Contributing

To be completed…

Maintainers

Changes

0.1.1 (2016-11-03)

  • Fixed several parsing bugs.

0.1.0 (2016-11-03)

  • Initial release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymiparse-0.1.1.tar.gz (5.7 kB view details)

Uploaded Source

File details

Details for the file pymiparse-0.1.1.tar.gz.

File metadata

  • Download URL: pymiparse-0.1.1.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pymiparse-0.1.1.tar.gz
Algorithm Hash digest
SHA256 77f8bb06de545dd6d14a3e86e15c7d5ee6f3015e7c7e7afce89a7e402ff17f9c
MD5 30a63aa23f05c838c0852c6bff4da775
BLAKE2b-256 e30f42a9ed781b3da5c529b5b447efcab6c7454884cffa770e5a414f81941c13

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page