This is the repository for the interoperability kit of EBU-TT Live.
The kit is envisaged to contain a set of components for generating, testing and distributing subtitle documents in EBU-TT Part 3 format.
This is an open source project. Anyone is welcome to contribute to the development of the components. Please see the wiki for the list of required components, guidelines and release plan.
We have a Slack team called ebu-tt-lit for day to day communications, questions etc. Please join up!
Preparing the build environment
Make sure you have python 2.7+. Make sure you have python virtual environment capability.
If not you can install virtualenv systemwide from your operating system's package repository or by pip:
sudo pip install virtualenv
After that creating a virtual environment should be as simple as:
Let's activate it (source makes sure the current shell executes the script and assumes the environment variables that the activation script sets):
To build the project you will also need node.js. Please read the instructions for your system here.
After having created the python virtual environment, having activated it and having installed node.js the package can be built by typing make if you have GNU build tooling on your system.
pip install -r requirements.txt python setup.py develop pyxbgen --binding-root=./ebu_tt_live/bindings -m __init__ --schema-root=./ebu_tt_live/xsd/ -r -u ebutt_all.xsd npm install nunjucks node_modules/nunjucks/bin/precompile ebu_tt_live/ui/user_input_producer/template/user_input_producer_template.xml > ebu_tt_live/ui/user_input_producer/template/user_input_producer_template.js
After this you are supposed to be able to launch the command line tools this python package provides i.e.:
Windows is not the best friend of Makefiles. So there is a make.bat file for those who would like to develop using Windows. Assuming python 2.7 and virtualenv is installed and are on the PATH. To build the project you will also need node.js. Please read the instructions for your system here. Then run :
This will make sure a virtual environment is created and activated and installs all the tools into it.
After that the following command should work:
The Schema definitions XSD
The schema definitions are to be found embedded in the Python library in the xsd1.1 subfolder. The root schemadocument is called ebutt_live.xsd.
The Python library
The library uses XSD schemas from the xsd1.1 subdirectory. The bindings will keep the validation sane and PyXB makes sure that updates are working as expected. Should the schema be modified a regeneration can be run and the bindings will respect the changes.
There are several scripts that emulate different components in the infrastructure. Assuming the Makefile worked, the package is installed in a virtual environment and the virtual environment is active the following scripts should be available directly from the command line.
The simple producer is the beginning of the data pipeline. It generates EBU-TT-Live documents in a timed manner. In the repository root there is a test.html file that can be used for manual testing of the producer in any websocket capable browser.
The simple consumer connects to the producer or later on in the pipeline, assuming there are more components inserted.
The user input consumer script is intended to receive data from the user input producer. The user input producer is a user interface that allows users to create documents
and to send them live (see the documentation for details). To run it, just run
ebu-user-input-consumer and open the file
The documentation framework uses the popular Sphinx documentation generating engine and autodoc plugins to give developers the flexibility of writing Extra documentation interleaved with the autogenerated documentation created by autodoc.
brew install graphviz
Documentation can be generated based on the sources in the docs/source directory. After having installed the packages in requirements.txt (which is done automatically by the make command) documentation can be generated by one of the following three ways:
1 Calling setuptools
python setup.py build_sphinx
2 Running make in the docs directory where separate makefiles and a make.bat file is giving a variety of options.
cd docs make html
3 Calling the sphinx-build command line script that comes with sphinx. WARNING: Platform-dependent path-separators.
sphinx-build -b html docs/source/ docs/build/html
Previewing the documentation
After sphinx finished with a successful execution log the generated documentation should be accessible by opening the docs/build/html/index.html in any web browser.
The test framework is described in CONTRIBUTING.md
How to contribute
Please refer to CONTRIBUTING.md