Skip to main content

Estimates media file size in different formats w/o actually converting the file

Project description

media-filesize-estimator

PYPI Version Python Version Build status Dependencies Status Coverage Report

Estimates media file size in different formats w/o actually converting the file

Installation

The package works with python 3.8+.

pip install -U media-filesize-estimator

# or install with `Poetry`
poetry add media-filesize-estimator

Then you can run

media-filesize-estimator --help

# or with `Poetry`:
poetry run media-filesize-estimator --help

Working

$ media-filesize-estimator --help
Usage: media-filesize-estimator [OPTIONS]

  Estimates media file size in different formats w/o actually converting the
  file

Options:
  -m, --media TEXT           Media file path  [required]
  -p, --property TEXT        Parameter (resolution/frame_rate/bit_depth/sampli
                             ng_rate/channels) to compare
  -sf, --save-format TEXT    Format (json/xml/csv) to save media metadata
  -sl, --save-location TEXT  Location to save media metadata and/or graph
                             [default: ./]
  -v, --version              Prints the version of the media-filesize-
                             estimator package.
  --help                     Show this message and exit.
$ media-filesize-estimator --media assets/sample_video_redfort.mp4 --property resolution --save-location /tmp/ --save-format xml
The given media file is of type : video
Extracting data from file : sample_video_redfort.mp4
Extraction completed successfully to file : /tmp/sample_video_redfort.xml
Metadata is saved at /tmp/sample_video_redfort.xml
The given media file is of type : video
Uncompressed file size estimation of the given file in MB with resolution 1920x1080 : 593.262 MB
Uncompressed file size estimation of the given file in MB with resolution 3840x2160 : 2373.047 MB
Uncompressed file size estimation of the given file in MB with resolution 2560x1440 : 1054.688 MB
Uncompressed file size estimation of the given file in MB with resolution 1920x1080 : 593.262 MB
Uncompressed file size estimation of the given file in MB with resolution 1280x720 : 263.672 MB
Uncompressed file size estimation of the given file in MB with resolution 640x360 : 65.918 MB
Plotting the graph for the given parameter : resolution
Estimated filesize graph saved at /tmp//estimated_filesize.png

Contributing

Thanks for considering contributing to this project. Please follow Contributing guidelines.

🛡 License

License

This project is licensed under the terms of the MIT license. See LICENSE for more details.

📃 Citation

@misc{media-filesize-estimator,
  author = {kHarshit, Pappuru-Dinesh, TejodhayBonam, AbdulBasitA},
  title = {Estimates media file size in different formats w/o actually converting the file},
  year = {2022},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/kHarshit/media-filesize-estimator}}
}

Credits

This project was generated with python-package-template

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

media-filesize-estimator-1.0.0.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

media_filesize_estimator-1.0.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file media-filesize-estimator-1.0.0.tar.gz.

File metadata

  • Download URL: media-filesize-estimator-1.0.0.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.9.5 Linux/5.9.1-1.el7.elrepo.x86_64

File hashes

Hashes for media-filesize-estimator-1.0.0.tar.gz
Algorithm Hash digest
SHA256 927b4258e1a2bebbb93566a3cce2d81f5c691e49541d41e7db6026d66bc09a16
MD5 c03def68a1095aa77a2d2518f7b7cbf1
BLAKE2b-256 1c103eca1b97ecc0fdb04a26bc639fe923805e3f8cc638c953b81a2d54792c8e

See more details on using hashes here.

File details

Details for the file media_filesize_estimator-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for media_filesize_estimator-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e6c602b5fd16cc150370b69e613cb07ae78e04e869d91fbdd97c477339dae91e
MD5 80624715c5c31a9f429b148f2234873c
BLAKE2b-256 91d284131d9138d0bd04fbc58a935ba7af071f05ad7467ce6d4a82237028c52b

See more details on using hashes here.

Supported by

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