# rtpTTML
A library for transmitting/receiving TTML documents over RTP as per [RFC 8759](https://datatracker.ietf.org/doc/rfc8759/).
## 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](https://github.com/bbc/rd-apmm-python-lib-rtp) and [rtpPayload_ttml](https://github.com/bbc/rd-apmm-python-lib-rtpPayload_ttml) for encoding/decoding the payload bitstreams.
## Installation
```bash
pip install rtpTTML
```
## Example usage
There are fully functional transmitter and receiver examples in the [examples directory](https://github.com/bbc/rd-apmm-python-lib-rtpTTML/tree/master/examples). The bare minimum usage is as follows.
```python
from rtpTTML import TTMLReceiver
def processDoc(doc, timestamp):
print("{}\n".format(doc))
port = 12345
client = TTMLReceiver(port, processDoc)
client.run()
```
```python
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](https://github.com/bbc/rd-apmm-wireshark-rtpTTML).
## Contributing
We desire that contributors of pull requests have signed, and submitted via email, a [Contributor Licence Agreement (CLA)](http://www.bbc.co.uk/opensource/cla/rfc-8759-cla.docx), 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](LICENSE).
## Authors
* James Sandford
For further information, contact <cloudfit-opensource@rd.bbc.co.uk>
Raw data
{
"_id": null,
"home_page": "https://github.com/bbc/rd-apmm-python-lib-rtpTTML",
"name": "rtpTTML",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "BBC R&D",
"author_email": "cloudfit-opensource@rd.bbc.co.uk",
"download_url": "",
"platform": null,
"description": "# rtpTTML\n\nA library for transmitting/receiving TTML documents over RTP as per [RFC 8759](https://datatracker.ietf.org/doc/rfc8759/).\n\n## What rtpTTML does/doesn't do\nThis 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!\n\nThis library makes use of [RTP](https://github.com/bbc/rd-apmm-python-lib-rtp) and [rtpPayload_ttml](https://github.com/bbc/rd-apmm-python-lib-rtpPayload_ttml) for encoding/decoding the payload bitstreams.\n\n## Installation\n\n```bash\npip install rtpTTML\n```\n\n## Example usage\nThere are fully functional transmitter and receiver examples in the [examples directory](https://github.com/bbc/rd-apmm-python-lib-rtpTTML/tree/master/examples). The bare minimum usage is as follows.\n\n```python\nfrom rtpTTML import TTMLReceiver\n\n\ndef processDoc(doc, timestamp):\n print(\"{}\\n\".format(doc))\n\n\nport = 12345\nclient = TTMLReceiver(port, processDoc)\nclient.run()\n```\n\n```python\nfrom time import sleep\nfrom datetime import datetime\nfrom rtpTTML import TTMLTransmitter\n\n\naddress = \"127.0.0.1\"\nport = 12345\n\nwith TTMLTransmitter(address, port) as tx:\n while True:\n docStr = generateDoc(tx.nextSeqNum)\n nowTime = datetime.now()\n\n tx.sendDoc(docStr, nowTime)\n sleep(1)\n```\n\n## Debugging\nIf you are looking to debug RTP TTML packets on the wire, you might be interested in the wireshark disector available [here](https://github.com/bbc/rd-apmm-wireshark-rtpTTML).\n\n## Contributing\nWe desire that contributors of pull requests have signed, and submitted via email, a [Contributor Licence Agreement (CLA)](http://www.bbc.co.uk/opensource/cla/rfc-8759-cla.docx), which is based on the Apache CLA.\n\nThe 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.\n\nIf you haven't signed and emailed the agreement yet then the project owners will contact you using the contact info with the pull request.\n\n## License\nSee [LICENSE](LICENSE).\n\n## Authors\n\n* James Sandford\n\nFor further information, contact <cloudfit-opensource@rd.bbc.co.uk>\n",
"bugtrack_url": null,
"license": "apache-2.0",
"summary": "A library for transmitting/receiving TTML over RTP",
"version": "0.0.2",
"project_urls": {
"Homepage": "https://github.com/bbc/rd-apmm-python-lib-rtpTTML"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c96b8973d120c28b388d7b8975fcbb84968de8f5c8f88e9892b8acc861e30c67",
"md5": "0f3c5ba99425dfb38f7a54de401cb4b4",
"sha256": "2d7d85519d10b97ba2efc0574c30e55e66e1ac932bb7ed68578369686c8dd241"
},
"downloads": -1,
"filename": "rtpTTML-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0f3c5ba99425dfb38f7a54de401cb4b4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 7591,
"upload_time": "2023-12-05T16:55:28",
"upload_time_iso_8601": "2023-12-05T16:55:28.877248Z",
"url": "https://files.pythonhosted.org/packages/c9/6b/8973d120c28b388d7b8975fcbb84968de8f5c8f88e9892b8acc861e30c67/rtpTTML-0.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-05 16:55:28",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "bbc",
"github_project": "rd-apmm-python-lib-rtpTTML",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "rtpttml"
}