This project is a Python implementation of Ringmaster.
The original C++ code is from ringmaster and lng205/ringmaster.
To run the code, you need to install the following dependencies on Linux (Ubuntu):
sudo apt install g++ libvpx-dev libsdl2-devDownload the demo raw ice_4cif_30fps.y4m.
To set up the environment using conda:
conda create -n pyringmaster python=3.11
conda activate pyringmaster
conda install -c conda-forge gcc # Alternative
pip install -r requirements.txtAlternatively, to set up the environment using venv:
python -m venv pyringmaster
source pyringmaster/bin/activate
pip install -r requirements.txtRecommended sender invocation:
python -m app.video_sender 12345 ice_4cif_30fps.y4mRecommended receiver invocation:
python -m app.video_receiver 127.0.0.1 12345 704 576 --fps 30 --cbr 500Direct execution from app/video_sender.py and app/video_receiver.py is still supported for convenience.
Run the lightweight regression suite with:
python -m unittest discover -s tests -vThese tests cover protocol serialization, file-descriptor reads, and poller activation semantics.
app/: Sender/receiver entry points, VP9 encoder/decoder logic, and wire protocol definitions.utils/: File-descriptor wrappers, socket helpers, polling, timerfd integration, timestamps, and FFI utilities.video/: Raw frame containers, SDL display code, and the YUV4MPEG reader.tests/: Pure-Python regression tests for the refactored infrastructure layer.