Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

rtpTTML-0.0.2-py3-none-any.whl (7.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page