Skip to main content

Bondzai Media Handler

Project description

Description

Bondzai Media Handler is a tool used to convert media data (audio, image, video) file to a raw binary file. For the present, the file’s Mime accepted are the following:

  • Audio

    • audio/x-wav

    • audio/mpeg

  • Image

    • image/jpeg

    • image/png

    • image/tiff

  • Video

    • video/mp4

    • video/quicktime

    • video/webm

Installation

ffmpeg

In order to work, this tool needs ffmpeg installed

Linux/Ubuntu

apt-get install ffmpeg

MacOS (Homebrew)

brew install ffmpeg

bondzai.media-handler

pip install bondzai.media-handler

Usage

from bondzai.media_handler import get_raw_data, get_metadata, \
    save_binary, load_binary

# Getting raw data from a media file
data = get_raw_data("path/to/file.[mp3|mp4|wav|webm|jpg|png|...]")

# Getting meta data from a media file
meta = get_metadata("path/to/file.[mp3|mp4|wav|webm|jpg|png|...]")

# Saving raw data in a binary file
save_binary("path/to/file.bin", data)

# Loading raw data from a binary file
data = load_binary("path/to/file.bin")

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

bondzai.media-handler-0.0.18.tar.gz (11.2 kB view hashes)

Uploaded Source

Built Distribution

bondzai.media_handler-0.0.18-py3-none-any.whl (15.9 kB view hashes)

Uploaded Python 3

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