rtpPayload-ttml


NamertpPayload-ttml JSON
Version 0.0.3 PyPI version JSON
download
home_pagehttps://github.com/bbc/rd-apmm-python-lib-rtpPayload_ttml
SummaryA library for decoding/encoding TTML RTP payloads
upload_time2023-12-05 17:02:18
maintainer
docs_urlNone
authorBBC R&D
requires_python
licenseapache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # rtpPayload_ttml

This python library provides a means to decode, encode, and interact with TTML RTP payloads as defined in [RFC 8759](https://datatracker.ietf.org/doc/rfc8759/). It is designed for use with an RTP library such as [RTP](https://github.com/bbc/rd-apmm-python-lib-rtp). It only encodes/decodes the payload bitstreams. It DOES NOT provide a means to render or edit TTML documents. It also doesn't provide any network functionality. To send these payloads over UDP, check out [rtpTTML](https://github.com/bbc/rd-apmm-python-lib-rtpTTML).

## Installation

```bash
pip install rtpPayload-ttml
```

## Example usage
```python
from rtp import RTP, PayloadType, Extension
from rtpPayload_ttml import RTPPayload_TTML
from copy import deepcopy

baseRTP = RTP(
    marker=True,
    payloadType=PayloadType.DYNAMIC_96,
    extension=Extension(
        startBits=getExtStartBits(),
        headerExtension=getExtBody()
        ),
    csrcList=getCSRCList()
)
thisRTPBitstream = baseRTP.toBytearray()

while runing:
    nextRTP = deepcopy(baseRTP)
    nextRTP.sequenceNumber += 1
    nextRTP.timestamp = getNextTimestamp()
    nextRTP.payload = RTPPayload_TTML(userDataWords=getNextDoc())

    transmit(nextRTP)
```

```python
from rtp import RTP
from rtpPayload_ttml import RTPPayload_TTML

decodedPayload = RTPPayload_TTML.fromBytearray(
    RTP().fromBytearray(getNextPacket()).payload)
document = decodedPayload.userDataWords

render(document)
```

## 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-rtpPayload_ttml",
    "name": "rtpPayload-ttml",
    "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": "# rtpPayload_ttml\n\nThis python library provides a means to decode, encode, and interact with TTML RTP payloads as defined in [RFC 8759](https://datatracker.ietf.org/doc/rfc8759/). It is designed for use with an RTP library such as [RTP](https://github.com/bbc/rd-apmm-python-lib-rtp). It only encodes/decodes the payload bitstreams. It DOES NOT provide a means to render or edit TTML documents. It also doesn't provide any network functionality. To send these payloads over UDP, check out [rtpTTML](https://github.com/bbc/rd-apmm-python-lib-rtpTTML).\n\n## Installation\n\n```bash\npip install rtpPayload-ttml\n```\n\n## Example usage\n```python\nfrom rtp import RTP, PayloadType, Extension\nfrom rtpPayload_ttml import RTPPayload_TTML\nfrom copy import deepcopy\n\nbaseRTP = RTP(\n    marker=True,\n    payloadType=PayloadType.DYNAMIC_96,\n    extension=Extension(\n        startBits=getExtStartBits(),\n        headerExtension=getExtBody()\n        ),\n    csrcList=getCSRCList()\n)\nthisRTPBitstream = baseRTP.toBytearray()\n\nwhile runing:\n    nextRTP = deepcopy(baseRTP)\n    nextRTP.sequenceNumber += 1\n    nextRTP.timestamp = getNextTimestamp()\n    nextRTP.payload = RTPPayload_TTML(userDataWords=getNextDoc())\n\n    transmit(nextRTP)\n```\n\n```python\nfrom rtp import RTP\nfrom rtpPayload_ttml import RTPPayload_TTML\n\ndecodedPayload = RTPPayload_TTML.fromBytearray(\n    RTP().fromBytearray(getNextPacket()).payload)\ndocument = decodedPayload.userDataWords\n\nrender(document)\n```\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 decoding/encoding TTML RTP payloads",
    "version": "0.0.3",
    "project_urls": {
        "Homepage": "https://github.com/bbc/rd-apmm-python-lib-rtpPayload_ttml"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "df62f8aadf9e778c9ebeea618f78d35991aefc86c2952fad76f2e777060337dd",
                "md5": "de17d54f8d5310d74cd6461f8076d746",
                "sha256": "76eb163efc57def33c4199783ab344f278c588a07dc83db05edeb684d9ad27f8"
            },
            "downloads": -1,
            "filename": "rtpPayload_ttml-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "de17d54f8d5310d74cd6461f8076d746",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5911,
            "upload_time": "2023-12-05T17:02:18",
            "upload_time_iso_8601": "2023-12-05T17:02:18.789741Z",
            "url": "https://files.pythonhosted.org/packages/df/62/f8aadf9e778c9ebeea618f78d35991aefc86c2952fad76f2e777060337dd/rtpPayload_ttml-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-05 17:02:18",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "bbc",
    "github_project": "rd-apmm-python-lib-rtpPayload_ttml",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "rtppayload-ttml"
}
        
Elapsed time: 0.14214s