Metadata-Version: 2.1
Name: bondzai.media-handler
Version: 0.0.13
Summary: Bondzai Media Handler
Home-page: UNKNOWN
Author: Bondzai
License: Apache License 2.0
Keywords: davinsy,bondzai,media
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
License-File: NOTICE
Requires-Dist: soundfile (==0.12.1)
Requires-Dist: audio-metadata (==0.11.1)
Requires-Dist: imageio (==2.30.0)
Requires-Dist: imageio-ffmpeg (==0.4.8)

Bondzai Media Handler
=====================

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

.. code:: bash

   apt-get install ffmpeg

MacOS (Homebrew)

.. code:: bash

   brew install ffmpeg
   

bondzai.media-handler
'''''''''''''''''''''

.. code:: bash

   pip install bondzai.media-handler

Usage
~~~~~

.. code:: python

   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")


