-
Notifications
You must be signed in to change notification settings - Fork 5
Boombox in Python MVP #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Let's have first evaluation of where we are by April 15th. First experiment to conduct:
|
Progress
To doImprove how the messages between Pyrlang and Boombox gateway are structured.There has to be some sort of serialization of the image data. The default data structure of images in Python will most likely be a NumPy array, and the in Elixir we'll most likely stick to the currently used The binary data is not enough on it's own, we also need to send some metadata:
We can just send a map with these fields and the raw data, it should suffice. This structure would only be applicable for video, but it'll be my focus for now, since most use cases use only video. Allow for sending a stream from Boombox to PythonI have only tested generating a stream in Python and sending it to Boombox, not the other way around. It should work fine, however it still needs to be tested. The previous paragraph also applies, I think images should have the same structure regardless which way they are sent. Add an API in Python that will accurately map to the Elixir APIWe need an API that will allow Python users to create a Boombox instance with specified input and output. This API should resemble the Elixir one as closely as possible while still being "pythonic". The Elixir API is based completely on primitive types, so we won't need to worry creating any struct equivalents. The only problematic type is the atom, since there is no obvious analogue in Python. Most likely a string would be a good substitute. That creates a minor inconvenience for type translation, since depending on a field we would like to either decode it to a string or an atom. This inconvenience has already been solved in some sense when creating CLI for Boombox, so maybe it can be generalized and reused here. I'm also wondering whether we don't want to utilize some data structures with static fields to improve the experience, but that may be beyond the scope of this POC. ReleaseI need to figure out how to release this as a python package. Pyrlang is not on PyPI, this may be a problem. We also need to have Boombox compile during installation or have it already precompiled. This needs some more research and cosulting, |
Uh oh!
There was an error while loading. Please reload this page.
The objective is to create some sort of Python package that could start and interact with Boombox.
Running Elixir in Python
This interoperability is crucial for our goal of having a Python API for Boombox.
Existing solutions:
Python multimedia libraries
One of the most valuable contributions that boombox could provide would be getting some input and getting raw video from it as some data structure (e.g. numpy arrays). They could be then easily passed to a model.
Boombox would also allow for getting raw frames from python and storing / streaming them in some way.
Existing solutions:
scikit-video
- this library provides a ffmpeg wrapper that allows for anything that ffmpeg can do. Thier API is a generator for raw video frames as input and regular funcion calls as output.opencv
- it's pretty powerful, basically can handle any popular container formats as well as some more established network protocols like RTMP, RTSP and most likely any other one that ffmpeg can handle.PyAV
- another ffmpeg wrapper, also allows for audio operations.I think the selling point of boombox could be support for things that ffmpeg struggles with, most notably WebRTC.
We concluded that creating a POC would be a good idea
The text was updated successfully, but these errors were encountered: