Skip to main content

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

Metadata

Release files for rtpTTML 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for rtpTTML 0.0.2
File Interpreter ABI Platform
rtpTTML-0.0.2-py3-none-any.whl Python 3 none any Details

Release files / rtpTTML-0.0.2-py3-none-any.whl

Download URL rtpTTML-0.0.2-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2d7d85519d10b97ba2efc0574c30e55e66e1ac932bb7ed68578369686c8dd241
BLAKE2b-256 checksum
How to use checksums
c96b8973d120c28b388d7b8975fcbb84968de8f5c8f88e9892b8acc861e30c67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.6

Release history Release notifications | RSS feed

This release

0.0.2 This release

1 release file

0.0.1

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page