A library for transmitting/receiving TTML over RTP
Project description
rtpTTML
A library for transmitting/receiving TTML documents over RTP as per RFC 8759.
What rtpTTML does/doesn't do
This library is very minimal. It takes documents as strings, encodes them as an RTP payload, and sends them over UDP. It's doesn't currently implement any of the RTP control mechanisms, SDP, FEC, document validation, document rendering etc. PRs welcome if you want to add these features!
This library makes use of RTP and rtpPayload_ttml for encoding/decoding the payload bitstreams.
Installation
pip install rtpTTML
Example usage
There are fully functional transmitter and receiver examples in the examples directory. The bare minimum usage is as follows.
from rtpTTML import TTMLReceiver
def processDoc(doc, timestamp):
print("{}\n".format(doc))
port = 12345
client = TTMLReceiver(port, processDoc)
client.run()
from time import sleep
from datetime import datetime
from rtpTTML import TTMLTransmitter
address = "127.0.0.1"
port = 12345
with TTMLTransmitter(address, port) as tx:
while True:
docStr = generateDoc(tx.nextSeqNum)
nowTime = datetime.now()
tx.sendDoc(docStr, nowTime)
sleep(1)
Debugging
If you are looking to debug RTP TTML packets on the wire, you might be interested in the wireshark disector available here.
Contributing
We desire that contributors of pull requests have signed, and submitted via email, a Contributor Licence Agreement (CLA), which is based on the Apache CLA.
The purpose of this agreement is to clearly define the terms under which intellectual property has been contributed to the BBC and thereby allow us to defend the project should there be a legal dispute regarding the software at some future time.
If you haven't signed and emailed the agreement yet then the project owners will contact you using the contact info with the pull request.
License
See LICENSE.
Authors
- James Sandford
For further information, contact cloudfit-opensource@rd.bbc.co.uk
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file rtpTTML-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: rtpTTML-0.0.2-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d7d85519d10b97ba2efc0574c30e55e66e1ac932bb7ed68578369686c8dd241 |
|
MD5 | 0f3c5ba99425dfb38f7a54de401cb4b4 |
|
BLAKE2b-256 | c96b8973d120c28b388d7b8975fcbb84968de8f5c8f88e9892b8acc861e30c67 |