{"id":23385453,"url":"https://github.com/superkabuki/scte35","last_synced_at":"2025-04-15T18:41:40.945Z","repository":{"id":266201146,"uuid":"897683949","full_name":"superkabuki/threefive3","owner":"superkabuki","description":"threefive3 is SCTE-35.","archived":false,"fork":false,"pushed_at":"2025-03-02T19:48:11.000Z","size":667,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-06T09:37:49.667Z","etag":null,"topics":["adbreak","adrianofdoom","ads","bestscte35parser","dash","hls-live-streaming","hls-stream","python3","scte-104","scte-214","scte-35","scte-35parser","scte-67","scte35","scte35-2022","scte35-decoder","scte35-encoder","superhappyfuntime","threefive","threefive3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/superkabuki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-03T03:52:08.000Z","updated_at":"2025-03-02T19:48:15.000Z","dependencies_parsed_at":"2024-12-06T07:27:07.665Z","dependency_job_id":"a29c0ea5-22e4-449a-a6d4-2aaf84091594","html_url":"https://github.com/superkabuki/threefive3","commit_stats":null,"previous_names":["superkabuki/splicefu","superkabuki/scte35","superkabuki/threefive3"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superkabuki%2Fthreefive3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superkabuki%2Fthreefive3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superkabuki%2Fthreefive3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superkabuki%2Fthreefive3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/superkabuki","download_url":"https://codeload.github.com/superkabuki/threefive3/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243196654,"owners_count":20251861,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adbreak","adrianofdoom","ads","bestscte35parser","dash","hls-live-streaming","hls-stream","python3","scte-104","scte-214","scte-35","scte-35parser","scte-67","scte35","scte35-2022","scte35-decoder","scte35-encoder","superhappyfuntime","threefive","threefive3"],"created_at":"2024-12-22T00:17:32.331Z","updated_at":"2025-04-15T18:41:40.938Z","avatar_url":"https://github.com/superkabuki.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[__Install__](#install) |[__SCTE-35 Cli__](#the-cli-tool) | [__SCTE-35 HLS__](https://github.com/superkabuki/threefive3/blob/main/hls.md) | [__Cue__ Class](https://github.com/superkabuki/threefive3/blob/main/cue.md) | [__Stream__ Class](https://github.com/superkabuki/threefive3/blob/main/stream.md) | [__Online SCTE-35 Parser__](https://iodisco.com/scte35) | [__Encode SCTE-35__](https://github.com/superkabuki/threefive3/blob/main/encode.md) | [__SCTE-35 Examples__](https://github.com/superkabuki/threefive3/tree/main/examples)\n | [__SCTE-35 XML__](#xml)\n\n# threefive3 is the coolest SCTE-35 parser.\n\n✅ SCTE-35 __Parser__  ✅ SCTE-35 __Encoder__    ✅ SCTE-35 __HLS__     ✅ SCTE-35 __Xml+binary__     ✅ SCTE-35 __Cli__     ✅  SCTE-35 __library__\n\n\n* Parses __SCTE-35__ from MPEGTS, HLS, XML+Binary, Base64, Bytes, Hex, Integers, or JSON.\n* Encode __SCTE-35__ to Base64, Bytes, Hex, Int, JSON, or Xml+binary.\n* Built-in network support for HTTP(S), UDP, and Multicast.\n* Automatic AES decryption for HLS.\n* All HLS __SCTE-35__ Tags are Supported.\n\n# Latest release is v3.0.35 \n_Released Thursday April 3rd, 2025 4am EDT_\n\u003e Stay up to date, only the latest release is supported.\n\n## MPEGTS streams can be parsed for SCTE-35 with three lines of code.\n\n```py3\na@fu:~/build5/scte35/scte35$ pypy3\n\n\u003e\u003e\u003e\u003e from threefive3 import Stream\n\u003e\u003e\u003e\u003e strm=Stream('https://futzu.com/xaa.ts')\n\u003e\u003e\u003e\u003e strm.decode()\n```\n\n# Checkout the Super Cool SCTE-35 [__Examples__](https://github.com/superkabuki/threefive3/tree/main/examples)\n\u003cbr\u003e\n\n # threefive3 v3.0.37 is almost ready\n \n* We are super close to __threefive3 v3.0.37__, \n* I have been __combing through the code__ for the last two weeks __looking for obscure bugs__ and any potential problems.\n* I'm __profiling and linting__ everything.\n * __File any bug reports now__,  I'm going to be __playing a lot of golf__ soon trying to get on the tour and won't be around as much.\n* I've __fixed every bug I 've found in the last two weeks__, and I've spend all day looking and I can't find any new ones.\n* The __Cue__ class is verified to __decode and encode SCTE-35 in Base64, Bytes, Dicts, Hex, Int, JSON, Xml, and Xml+bin__.\n* Xml is back and better than ever. __The new Ultra Xml Parser__ replaces the Super Xml Parser.\n* __threefive3 v3.0.37 will be production ready__\n\n# Xml\n\u003cpre\u003e\n    I pulled xml support a few months ago, I wasn't happy with the implementation. \nOne out of every seven lines of code was xml specific, there was xml code everywhere.\nIt was all way too clunky. Everytime I touched one part of the code, something else would break.\n \n The xml parser worked completely different from the xml generator.\n Now, generating and parsing xml both use the Node class, it's much cleaner.\n The new Ultra Xml Parser  is nice code,  \n\u003c/pre\u003e\n\n\n# `Q.`Why would you write a xml parser for threefive3? \n \n# `A.`  __quadratic blowup__ and __billion laughs__. \n\n* These are very old attacks, __over ten years old__,  and the [__python xml parsers are all vunerable__](https://docs.python.org/3/library/xml.html#xml-vulnerabilities) to both attacks.\n\n*  threefive3's __Ultra XML Parser is NOT__ __vunerable__ to either one.\n\n* __I'd fix the parsers__ for them, but __I've been banned from python's github repo__ for __criticizing PEP 668__ and trying to __start a mutiny__. \n\n \n* [Code stolen from here](https://gist.github.com/jordanpotti/04c54f7de46f2f0f0b4e6b8e5f5b01b0)\n* \n![image](https://github.com/user-attachments/assets/121edabe-947f-47b9-a5ad-ed7b0b393474)\n\n\n\n# `Documentation`\n\n* [Install](#install)\n\n### Cli\n\n* [SCTE-35 Cli Super Tool](#the-cli-tool) Encodes, Decodes, and Recodes. This is pretty cool, it does SCTE-35 seven different ways.\n     * The cli tool comes with builtin documentation just type `threefive3 help`\n\n### HLS\n* [Advanced Parsing of SCTE-35 in HLS with threefive3](https://github.com/superkabuki/threefive3/blob/main/hls.md) All HLS SCTE-35 tags, Sidecar Files, AAC ID3 Header Timestamps, SCTE-35 filters... Who loves you baby?\n\n\n### `Classes`\n* The python built in help is always the most up to date docs for the library.\n\n```py3\n\na@fu:~/build7/threefive3$ pypy3\n\n\u003e\u003e\u003e\u003e from threefive import Stream\n\u003e\u003e\u003e\u003e help(Stream)\n\n```\n\n* [Class Structure](https://github.com/superkabuki/threefive3/blob/main/classes.md)\n* [Cue Class](https://github.com/superkabuki/threefive3/blob/main/cue.md)  Cue is the main SCTE-35 class to use. \n* [Stream Class](https://github.com/superkabuki/threefive3/blob/main/stream.md)  The Stream class handles MPEGTS SCTE-35 streams local, Http(s), UDP, and Multicast.\n___\n\n### `| more`\n\n* [Online SCTE-35 Parser](https://iodisco.com/scte35)  Supporte Base64, Bytes,Hex,Int, Json, Xml, and Xml+binary.\n\n* [Encode SCTE-35](https://github.com/superkabuki/threefive3/blob/main/encode.md) Some encoding code examples. \n\n\n___\n\n### `Install`\n* python3 via pip\n```rebol\npython3 -mpip install threefive3\n```\n* pypy3 \n```rebol\npypy3 -mpip install threefive3\n```\n* from the git repo\n```rebol\ngit clone https://github.com/superkabuki/scte35.git\ncd threefive3\nmake install\n```\n___\n\n### `The Cli tool`\n\n#### The cli tool installs automatically with pip or the Makefile.\n\n* [__SCTE-35 Inputs__](#inputs)\n* [__SCTE-35 Outputs__](#outputs)\n* [Parse __MPEGTS__ streams for __SCTE-35__](#streams)\n* [Parse __SCTE-35__ in __hls__](#hls)\n* [Display __MPEGTS__ __iframes__](#iframes)\n* [Display raw __SCTE-35 packets__ from __video streams__](#packets)\n* [__Repair SCTE-35 streams__ changed to __bin data__ by __ffmpeg__](#sixfix)\n\n#### `Inputs`\n\n* Most __inputs__ are __auto-detected.__ \n* __stdin__ is __auto selected__ and __auto detected.__\n* __SCTE-35 data is printed to stderr__\n* __stdout is used when piping video__\n* mpegts can be specified by file name or URI.\n```rebol\nthreefive3 udp://@235.2.5.35:3535\n```\n* If a file comtains a SCTE-35 cue as a string( base64,hex,int,json,or xml+bin), redirect the file contents.\n```rebol\n\n  threefive3 \u003c json.json  \n\n ```\n\n* quoted strings(( base64,hex,int,json or xml+bin), can be passed directly on the command line as well.\n\n```awk\n\nthreefive3 '/DAWAAAAAAAAAP/wBQb+ztd7owAAdIbbmw=='\n\n```\n\n\n| Input Type |     Cli Example                                                                                             |\n|------------|-------------------------------------------------------------------------------------------------------------|\n| __Base64__     |  `threefive3 '/DAsAAAAAyiYAP/wCgUAAAABf1+ZmQEBABECD0NVRUkAAAAAf4ABADUAAC2XQZU='`\n| __Hex__        |`threefive3 0xfc301600000000000000fff00506fed605225b0000b0b65f3b`|\n| __HLS__         |`threefive3 hls https://example.com/master.m3u8`                                                             |\n| __JSON__        |`threefive3 \u003c json.json`  |\n| __Xmlbin__      | `js threefive3 \u003c xmlbin.xml`                                                                                 |\n\n# `Streams`\n\n|Protocol       |  Cli Example                                                                                                                                       |\n|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------|\n|  File         |   `threefive3 video.ts`                                                                                                                            |\n|  Http(s)      |   `threefive3 https://example.com/video.ts`                                                                                                        |\n|  Stdin        |  `threefive3 \u003c video.ts`            |\n|  UDP Multicast|  `threefive3 udp://@235.35.3.5:9999`                                                                          |\n|  UDP Unicast  |                                                                      `threefive3 udp://10.0.0.7:5555`                                              |\n|  HLS          |                                                                                                    `threefive3 hls https://example.com/master.m3u8`|\n|               |                                                                                                                                                    |\n\n\n#### Outputs\n* output type is determined by the key words __base64, bytes, hex, int, json, and xmlbin__.\n* __json is the default__.\n* __Any input (except HLS,) can be returned as any output__\n  * examples __Base64 to Hex__ etc...) \n\n\n| Output Type | Cli Example         |\n|-------------|----------------------------------------------------------|\n|__Base 64__     |                                                                                                                                                                    `threefive3 0xfc301600000000000000fff00506fed605225b0000b0b65f3b  base64  `                                                                                                                                                                                                                                                                                                                                         |\n| __Bytes__       |                                                                                 `threefive3 0xfc301600000000000000fff00506fed605225b0000b0b65f3b  bytes`                                                                                                                                                                                                                                                                                                                                                                                                                               |\n| __Hex__         | `threefive3 '/DAsAAAAAyiYAP/wCgUAAAABf1+ZmQEBABECD0NVRUkAAAAAf4ABADUAAC2XQZU='  hex`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |\n| __Integer__     |                                                                                                                                                                                                                                                       `threefive3 '/DAsAAAAAyiYAP/wCgUAAAABf1+ZmQEBABECD0NVRUkAAAAAf4ABADUAAC2XQZU='  int`   |\n| __JSON__        |                                                                                                                                                                                                                                                                                                              `threefive3 0xfc301600000000000000fff00506fed605225b0000b0b65f3b json ` |\n| __Xml+bin__     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        `threefive3 0xfc301600000000000000fff00506fed605225b0000b0b65f3b xmlbin   `      |`\n\n#### `hls`\n* parse hls manifests and segments for SCTE-35\n```smalltalk\nthreefive3 hls https://example.com/master.m3u8\n```\n___\n#### `Iframes`\n* Show iframes PTS in an MPEGTS video\n\n```smalltalk\nthreefive3 iframes https://example.com/video.ts\n```\n___\n#### `packets`   \n* Print raw SCTE-35 packets from multicast mpegts video\n\n```smalltalk\nthreefive3 packets udp://@235.35.3.5:3535\n```\n___\n#### `proxy`   \n* Parse a https stream and write raw video to stdout\n\n```smalltalk\nthreefive3 proxy video.ts\n```\n___\n#### `pts`    \n* Print PTS from mpegts video\n\n```smalltalk\nthreefive3 pts video.ts\n```\n___\n#### `sidecar`  \n* Parse a stream, write pts,write SCTE-35 Cues to sidecar.txt\n\n```smalltalk\nthreefive3 sidecar video.ts\n```\n___\n#### `sixfix`  \n* Fix SCTE-35 data mangled by ffmpeg\n\n```smalltalk\nthreefive3 sixfix video.ts\n```\n___\n#### `show`  \n\n* Probe mpegts video _( kind of like ffprobe )_\n\n```smalltalk\n threefive3 show video.ts\n```\n___\n#### `version`     \n* Show version\n\n```smalltalk\n threefive3 version\n```\n___\n#### `help`        \n* Help\n```rebol\n threefive3 help\n```\n___\n\n\n### Stream Multicast with the threefive cli, it's easy.\n\n* The threefive3 cli has long been a Multicast Receiver( client )\n* The cli now comes with a builtin Multicast Sender( server).\n* It's optimized for MPEGTS (1316 byte Datagrams) but you can send any video or file.\n* The defaults will work in most situations, you don't even have to set the address.\n* threefive3 cli also supports UDP Unicast Streaming.\n  \n![image](https://github.com/user-attachments/assets/6042b8e0-5d6b-4de0-b6b0-9556cecc184f)\n \n```js\na@fu:~$ threefive3 mcast help\nusage: threefive3 mcast [-h] [-i INPUT] [-a ADDR] [-b BIND_ADDR] [-t TTL]\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -i INPUT, --input INPUT\n                        like \"/home/a/vid.ts\" or \"udp://@235.35.3.5:3535\" or\n                        \"https://futzu.com/xaa.ts\"\n                        [default:sys.stdin.buffer]\n  -a ADDR, --addr ADDR  Destination IP:Port [default:235.35.3.5:3535]\n  -b BIND_ADDR, --bind_addr BIND_ADDR\n                        Local IP to bind [default:0.0.0.0]\n  -t TTL, --ttl TTL     Multicast TTL (1 - 255) [default:32]\na@fu:~$ \n```\n\n\n### [iodisco.com/scte35](https://iodisco.com/scte35)\n\n\n___\n\n[Install threefive3](#install)  | [SCTE-35 HLS](https://github.com/superkabuki/threefive3/blob/main/hls.md) | [Cue Class](https://github.com/superkabuki/threefive3/blob/main/cue.md) | [Stream Class](https://github.com/superkabuki/threefive3/blob/main/stream.md) | [Online SCTE-35 Parser](https://iodisco.com/scte35) | [Encode SCTE-35](https://github.com/superkabuki/threefive3/blob/main/encode.md) \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperkabuki%2Fscte35","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuperkabuki%2Fscte35","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperkabuki%2Fscte35/lists"}