{"id":28164074,"url":"https://github.com/superkabuki/threefive","last_synced_at":"2025-05-15T11:15:38.916Z","repository":{"id":282379422,"uuid":"948390549","full_name":"superkabuki/threefive","owner":"superkabuki","description":"threefive3 is the best SCTE-35 Parser, SCTE-35 Decoder and SCTE-35 Encoder Available. SCTE-35 Cli and SCTE-35 python3 library. threefive3 parses SCTE-35 from MPEGTS, HLS, XML,Base64,Bytes, Integers, Hex, JSON, etc.. Multicast support is  built in.","archived":false,"fork":false,"pushed_at":"2025-05-10T22:09:40.000Z","size":709,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-11T20:22:43.961Z","etag":null,"topics":["adbreak","adrianofdoom","adtech","hls-live-streaming","hls-scte35","mpegts","python3","scte","scte-214","scte-35","scte-35-hls","scte35","spliceinfosection","threefive","threefive3"],"latest_commit_sha":null,"homepage":"https://iodisco.com/scte35","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","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,"zenodo":null}},"created_at":"2025-03-14T08:55:42.000Z","updated_at":"2025-05-11T20:16:09.000Z","dependencies_parsed_at":"2025-03-14T10:21:49.115Z","dependency_job_id":"40b8fe93-ab6d-4920-8303-ee95cefd7f7a","html_url":"https://github.com/superkabuki/threefive","commit_stats":null,"previous_names":["superkabuki/threefive3","superkabuki/scte-35","superkabuki/scte-35_threefive3","superkabuki/threefive"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superkabuki%2Fthreefive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superkabuki%2Fthreefive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superkabuki%2Fthreefive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superkabuki%2Fthreefive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/superkabuki","download_url":"https://codeload.github.com/superkabuki/threefive/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254328377,"owners_count":22052634,"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","adtech","hls-live-streaming","hls-scte35","mpegts","python3","scte","scte-214","scte-35","scte-35-hls","scte35","spliceinfosection","threefive","threefive3"],"created_at":"2025-05-15T11:15:06.820Z","updated_at":"2025-05-15T11:15:38.903Z","avatar_url":"https://github.com/superkabuki.png","language":"Python","funding_links":[],"categories":["SCTE-35"],"sub_categories":[],"readme":" [__Install__](#install) |[__SCTE-35 Cli__](#the-cli-tool) | [__SCTE-35 HLS__](https://github.com/superkabuki/threefive/blob/main/hls.md) | [__Cue__ Class](https://github.com/superkabuki/threefive/blob/main/cue.md) | [__Stream__ Class](https://github.com/superkabuki/threefive/blob/main/stream.md) | [__Online SCTE-35 Parser__](https://iodisco.com/scte35) | [__Encode SCTE-35__](https://github.com/superkabuki/threefive/blob/main/encode.md) | [__SCTE-35 Examples__](https://github.com/superkabuki/threefive/tree/main/examples)\n | [__SCTE-35 XML__ ](https://github.com/superkabuki/SCTE-35/blob/main/xml.md) and [More __XML__](node.md) | [__SuperKabuki SCTE-35 MPEGTS Packet Injection__](inject.md) | [__SCTE-35 As a Service__](sassy.md)\n\n# `Heads up` \n\u003cpre\u003eI called this repo threefive3 in an attempt to avoid confusion with my old threefive repo,\nthat didn't work at all.\n \n Going forward, \u003cb\u003ethis will be threefive and will be released as such.\u003c/b\u003e\n \n Adrian\n \u003c/pre\u003e\n\n\n### `Q.` What is SCTE-35?\n\n### `A.` SCTE-35 is just encoded binary data. The SCTE-35 data is used to signal when to splice in commercials and such. The decoded variables in SCTE-35 are used determine the type and length of commercials. As with most things related to streaming video, it's way too complicated. Don't worry though, threefive makes it much easier.\n\n\n\u003cbr\u003e\n\n# threefive is the most advanced SCTE-35 tool available* \n\n \\* _No asterisks, no exceptions._\n\n\n* __Decode SCTE-35__ in __TEN__ formats: __MPEGTS, Base64, Bytes, Dicts, Hex,HLS, Integers,JSON,XML and XML+Binary__.\n* __Encode SCTE-35__ in __EIGHT__ formats: __MPEGTS, Base64, Bytes, Hex, Int, JSON,XML, and Xml+binary.__\n* __All HLS SCTE-35 Tags__ are Supported.\n* __Automatic AES decryption__ for HLS.\n* Built-in __Multicast Sender and Receiver__ \n* [The __SuperKabuki SCTE-35 MPEGTS Packet Injection Engine__](inject.md) was added to __threefive__ v3.0.39\n\n\n### [Sassy, the new SCTE-35 as a service, Decode SCTE-35 in your browser](sassy.md)      \n* returns decoded SCTE-35 as JSON\n* https://iodisco.com/cb/sassy?scte35=0xfc302f00019164e7980000000506fe849f2fa80019021743554549ffffffff7fbf010866756d6174696361100100ae05fd2e\n* open that URL in a browser\n* curl works too.\n* If you can make an https request, you can decode SCTE-35 with sassy, no installation required.\n* powered by nstuff\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 threefive 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/threefive/tree/main/examples)\n\u003cbr\u003e\n\n\n----\n\n\n\u003cbr\u003e\n\n### [Super Cool new xml stuff in threefive v3.0.45](node.md) \n### The new xml stuff is really sweet, you can even pass an DASH MPD directly to a Cue instance, and it will parse the first Event with SCTE-35 it finds. Let me show you.\n```py3\na@fu:~/threefive$ pypy3\n\nPython 3.9.16 (7.3.11+dfsg-2+deb12u3, Dec 30 2024, 22:36:23)\n[PyPy 7.3.11 with GCC 12.2.0] on linux\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n\u003e\u003e\u003e\u003e \n\u003e\u003e\u003e\u003e from threefive import Cue,reader\n\u003e\u003e\u003e\u003e data = reader('https://demo.unified-streaming.com/k8s/live/stable/scte35-n\\\no-splicing.isml/.mpd').read()    # use reader to pull the mpd over a network.\n\u003e\u003e\u003e\u003e cue=Cue(data)     # pass in to a Cue instance\n\u003e\u003e\u003e\u003e cue.show()\n{\n    \"info_section\": {\n        \"table_id\": \"0xfc\",\n        \"section_syntax_indicator\": false,\n        \"private\": false,\n        \"sap_type\": \"0x03\",\n        \"sap_details\": \"No Sap Type\",\n        \"section_length\": 32,\n        \"protocol_version\": 0,\n        \"encrypted_packet\": false,\n        \"encryption_algorithm\": 0,\n        \"pts_adjustment\": 0.0,\n        \"cw_index\": \"0x00\",\n        \"tier\": \"0x0fff\",\n        \"splice_command_length\": 15,\n        \"splice_command_type\": 5,\n        \"descriptor_loop_length\": 0,\n        \"crc\": \"0xe4612424\"\n    },\n    \"command\": {\n        \"command_length\": 15,\n        \"command_type\": 5,\n        \"name\": \"Splice Insert\",\n        \"break_auto_return\": true,\n        \"break_duration\": 38.4,\n        \"splice_event_id\": 14432855,\n        \"splice_event_cancel_indicator\": false,\n        \"out_of_network_indicator\": true,\n        \"program_splice_flag\": true,\n        \"duration_flag\": true,\n        \"splice_immediate_flag\": true,\n        \"event_id_compliance_flag\": true,\n        \"unique_program_id\": 49152,\n        \"avail_num\": 0,\n        \"avails_expected\": 0\n    },\n    \"descriptors\": []\n}\n```\n# Latest release is v3.0.49\n\n* cyclomatic complexity __2.01__ ,__That's a kickass score.__\n\n* pylint score is __9.62/10__, _this needs a liitle work_.\n\n\u003e Stay up to date, only the latest release is supported.\n\u003e \n\n\n\n \n* Xml is back and better than ever. __The new Ultra Xml Parser Supreme__ replaces the Super Xml Parser.\n\n#### [__threefive runs Four Times Faster on pypy3__](https://pypy.org/) | \n\n# `Documentation`\n### `Install`\n* [Install](#install)\n### `Examples` \n* [__Examples__](https://github.com/superkabuki/threefive/tree/main/examples)\n### `XML`\n* [XML](https://github.com/superkabuki/SCTE-35/blob/main/xml.md) __New__! _updated 05/01/2025_\n### `Cli`\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 `threefive help`\n### `HLS`\n* [Advanced Parsing of SCTE-35 in HLS with threefive](https://github.com/superkabuki/threefive/blob/main/hls.md) All HLS SCTE-35 tags, Sidecar Files, AAC ID3 Header Timestamps, SCTE-35 filters... Who loves you baby?\n### `MPEGTS Packet Injection`\n* [The SuperKabuki MPEGTS Packet Injection Engine in the Cli](inject.md)\n\n### `SCTE-35 As a Service`\n* Decode SCTE-35 without installing anything. [__Sassy__](sassy.md) is SCTE-35 as a service. \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/threefive$ 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/threefive/blob/main/classes.md)\n* [Cue Class](https://github.com/superkabuki/threefive/blob/main/cue.md)  Cue is the main SCTE-35 class to use. \n* [Stream Class](https://github.com/superkabuki/threefive/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/threefive/blob/main/encode.md) Some encoding code examples. \n\n\n___\n\n### `Install`\n* python3 via pip\n```rebol\npython3 -mpip install threefive\n```\n* pypy3 \n```rebol\npypy3 -mpip install threefive\n```\n* from the git repo\n```rebol\ngit clone https://github.com/superkabuki/scte35.git\ncd threefive\nmake install\n```\n___\n\n### `Using the library`\n* Let me show you how easy threefive is to use.\n* well start off reading SCTE-35 xml from a file\n```py3\na@fu:~/threefive$ pypy3\nPython 3.9.16 (7.3.11+dfsg-2+deb12u3, Dec 30 2024, 22:36:23)\n[PyPy 7.3.11 with GCC 12.2.0] on linux\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n\u003e\u003e\u003e\u003e from threefive import reader\n\u003e\u003e\u003e\u003e from threefive import Cue\n\u003e\u003e\u003e\u003e data =reader('/home/a/xml.xml').read()\n* load it into a threefive.Cue instance\n```py3\n\u003e\u003e\u003e\u003e cue = Cue(data)\n```\n* Show the data as JSON\n```py3\n\u003e\u003e\u003e\u003e cue.show()\n{\n    \"info_section\": {\n        \"table_id\": \"0xfc\",\n        \"section_syntax_indicator\": false,\n        \"private\": false,\n        \"sap_type\": \"0x03\",\n        \"sap_details\": \"No Sap Type\",\n        \"section_length\": 92,\n        \"protocol_version\": 0,\n        \"encrypted_packet\": false,\n        \"encryption_algorithm\": 0,\n        \"pts_adjustment\": 0.0,\n        \"cw_index\": \"0x00\",\n        \"tier\": \"0x0fff\",\n        \"splice_command_length\": 15,\n        \"splice_command_type\": 5,\n        \"descriptor_loop_length\": 60,\n        \"crc\": \"0x7632935\"\n    },\n    \"command\": {\n        \"command_length\": 15,\n        \"command_type\": 5,\n        \"name\": \"Splice Insert\",\n        \"break_auto_return\": false,\n        \"break_duration\": 180.0,\n        \"splice_event_id\": 1073743095,\n        \"splice_event_cancel_indicator\": false,\n        \"out_of_network_indicator\": true,\n        \"program_splice_flag\": false,\n        \"duration_flag\": true,\n        \"splice_immediate_flag\": false,\n        \"event_id_compliance_flag\": true,\n        \"unique_program_id\": 1,\n        \"avail_num\": 12,\n        \"avails_expected\": 5\n    },\n    \"descriptors\": [\n        {\n            \"tag\": 0,\n            \"identifier\": \"CUEI\",\n            \"name\": \"Avail Descriptor\",\n            \"provider_avail_id\": 12,\n            \"descriptor_length\": 8\n        },\n        {\n            \"tag\": 0,\n            \"identifier\": \"CUEI\",\n            \"name\": \"Avail Descriptor\",\n            \"provider_avail_id\": 13,\n            \"descriptor_length\": 8\n        },\n        {\n            \"tag\": 0,\n            \"identifier\": \"CUEI\",\n            \"name\": \"Avail Descriptor\",\n            \"provider_avail_id\": 14,\n            \"descriptor_length\": 8\n        },\n        {\n            \"tag\": 0,\n            \"identifier\": \"CUEI\",\n            \"name\": \"Avail Descriptor\",\n            \"provider_avail_id\": 15,\n            \"descriptor_length\": 8\n        },\n        {\n            \"tag\": 0,\n            \"identifier\": \"CUEI\",\n            \"name\": \"Avail Descriptor\",\n            \"provider_avail_id\": 16,\n            \"descriptor_length\": 8\n        },\n        {\n            \"tag\": 0,\n            \"identifier\": \"CUEI\",\n            \"name\": \"Avail Descriptor\",\n            \"provider_avail_id\": 17,\n            \"descriptor_length\": 8\n        }\n    ]\n}\n```\n* convert the data back to xml\n```py3\n\u003e\u003e\u003e\u003e print(cue.xml())\n\u003cscte35:SpliceInfoSection xmlns:scte35=\"https://scte.org/schemas/35\"  ptsAdjustment=\"0\" protocolVersion=\"0\" sapType=\"3\" tier=\"4095\"\u003e\n   \u003cscte35:SpliceInsert spliceEventId=\"1073743095\" spliceEventCancelIndicator=\"false\" spliceImmediateFlag=\"false\" eventIdComplianceFlag=\"true\" availNum=\"12\" availsExpected=\"5\" outOfNetworkIndicator=\"true\" uniqueProgramId=\"1\"\u003e\n      \u003cscte35:BreakDuration autoReturn=\"false\" duration=\"16200000\"/\u003e\n   \u003c/scte35:SpliceInsert\u003e\n   \u003cscte35:AvailDescriptor providerAvailId=\"12\"/\u003e\n   \u003cscte35:AvailDescriptor providerAvailId=\"13\"/\u003e\n   \u003cscte35:AvailDescriptor providerAvailId=\"14\"/\u003e\n   \u003cscte35:AvailDescriptor providerAvailId=\"15\"/\u003e\n   \u003cscte35:AvailDescriptor providerAvailId=\"16\"/\u003e\n   \u003cscte35:AvailDescriptor providerAvailId=\"17\"/\u003e\n\u003c/scte35:SpliceInfoSection\u003e\n```\n* convert to xml+binary\n```py3\n\u003e\u003e\u003e\u003e print(cue.xmlbin())\n\u003cscte35:Signal xmlns:scte35=\"https://scte.org/schemas/35\"\u003e\n    \u003cscte35:Binary\u003e/DBcAAAAAAAAAP/wDwVAAAT3f69+APcxQAABDAUAPAAIQ1VFSQAAAAwACENVRUkAAAANAAhDVUVJAAAADgAIQ1VFSQAAAA8ACENVRUkAAAAQAAhDVUVJAAAAEQdjKTU=\u003c/scte35:Binary\u003e\n\u003c/scte35:Signal\u003e\n```\n* convert to base64\n```py3\n\u003e\u003e\u003e\u003e print(cue.base64())\n/DBcAAAAAAAAAP/wDwVAAAT3f69+APcxQAABDAUAPAAIQ1VFSQAAAAwACENVRUkAAAANAAhDVUVJAAAADgAIQ1VFSQAAAA8ACENVRUkAAAAQAAhDVUVJAAAAEQdjKTU=\n```\n* convert to hex\n```py3\n\u003e\u003e\u003e\u003e print(cue.hex())\n0xfc305c00000000000000fff00f05400004f77faf7e00f7314000010c05003c0008435545490000000c0008435545490000000d0008435545490000000e0008435545490000000f000843554549000000100008435545490000001107632935\n```\n* show just the splice command\n```py3\n\u003e\u003e\u003e\u003e cue.command.show()\n{\n    \"command_length\": 15,\n    \"command_type\": 5,\n    \"name\": \"Splice Insert\",\n    \"break_auto_return\": false,\n    \"break_duration\": 180.0,\n    \"splice_event_id\": 1073743095,\n    \"splice_event_cancel_indicator\": false,\n    \"out_of_network_indicator\": true,\n    \"program_splice_flag\": false,\n    \"duration_flag\": true,\n    \"splice_immediate_flag\": false,\n    \"event_id_compliance_flag\": true,\n    \"unique_program_id\": 1,\n    \"avail_num\": 12,\n    \"avails_expected\": 5\n}\n```\n* edit the break duration\n```py3\n\u003e\u003e\u003e\u003e cue.command.break_duration=30\n\u003e\u003e\u003e\u003e cue.command.show()\n{\n    \"command_length\": 15,\n    \"command_type\": 5,\n    \"name\": \"Splice Insert\",\n    \"break_auto_return\": false,\n    \"break_duration\": 30,\n    \"splice_event_id\": 1073743095,\n    \"splice_event_cancel_indicator\": false,\n    \"out_of_network_indicator\": true,\n    \"program_splice_flag\": false,\n    \"duration_flag\": true,\n    \"splice_immediate_flag\": false,\n    \"event_id_compliance_flag\": true,\n    \"unique_program_id\": 1,\n    \"avail_num\": 12,\n    \"avails_expected\": 5\n}\n```\n* re-encode to base64 with the new duration\n```py3\n\u003e\u003e\u003e\u003e cue.base64()\n'/DBcAAAAAAAAAP/wDwVAAAT3f69+ACky4AABDAUAPAAIQ1VFSQAAAAwACENVRUkAAAANAAhDVUVJAAAADgAIQ1VFSQAAAA8ACENVRUkAAAAQAAhDVUVJAAAAEe1FB6g='\n```\n* re-encode to xml with the new duration\n```py3\n\u003e\u003e\u003e\u003e print(cue.xml())\n\u003cscte35:SpliceInfoSection xmlns:scte35=\"https://scte.org/schemas/35\"  ptsAdjustment=\"0\" protocolVersion=\"0\" sapType=\"3\" tier=\"4095\"\u003e\n   \u003cscte35:SpliceInsert spliceEventId=\"1073743095\" spliceEventCancelIndicator=\"false\" spliceImmediateFlag=\"false\" eventIdComplianceFlag=\"true\" availNum=\"12\" availsExpected=\"5\" outOfNetworkIndicator=\"true\" uniqueProgramId=\"1\"\u003e\n      \u003cscte35:BreakDuration autoReturn=\"false\" duration=\"2700000\"/\u003e\n   \u003c/scte35:SpliceInsert\u003e\n   \u003cscte35:AvailDescriptor providerAvailId=\"12\"/\u003e\n   \u003cscte35:AvailDescriptor providerAvailId=\"13\"/\u003e\n   \u003cscte35:AvailDescriptor providerAvailId=\"14\"/\u003e\n   \u003cscte35:AvailDescriptor providerAvailId=\"15\"/\u003e\n   \u003cscte35:AvailDescriptor providerAvailId=\"16\"/\u003e\n   \u003cscte35:AvailDescriptor providerAvailId=\"17\"/\u003e\n\u003c/scte35:SpliceInfoSection\u003e\n```\n* show just the descriptors\n```py3\n\u003e\u003e\u003e\u003e _ = [d.show() for d in cue.descriptors]\n{\n    \"tag\": 0,\n    \"identifier\": \"CUEI\",\n    \"name\": \"Avail Descriptor\",\n    \"provider_avail_id\": 12,\n    \"descriptor_length\": 8\n}\n{\n    \"tag\": 0,\n    \"identifier\": \"CUEI\",\n    \"name\": \"Avail Descriptor\",\n    \"provider_avail_id\": 13,\n    \"descriptor_length\": 8\n}\n{\n    \"tag\": 0,\n    \"identifier\": \"CUEI\",\n    \"name\": \"Avail Descriptor\",\n    \"provider_avail_id\": 14,\n    \"descriptor_length\": 8\n}\n{\n    \"tag\": 0,\n    \"identifier\": \"CUEI\",\n    \"name\": \"Avail Descriptor\",\n    \"provider_avail_id\": 15,\n    \"descriptor_length\": 8\n}\n{\n    \"tag\": 0,\n    \"identifier\": \"CUEI\",\n    \"name\": \"Avail Descriptor\",\n    \"provider_avail_id\": 16,\n    \"descriptor_length\": 8\n}\n{\n    \"tag\": 0,\n    \"identifier\": \"CUEI\",\n    \"name\": \"Avail Descriptor\",\n    \"provider_avail_id\": 17,\n    \"descriptor_length\": 8\n}\n```\n* pop off the last descriptor and re-encode to xml\n```py3\n\n\u003e\u003e\u003e\u003e cue.descriptors.pop()\n{'tag': 0, 'identifier': 'CUEI', 'name': 'Avail Descriptor', 'private_data': None, 'provider_avail_id': 17, 'descriptor_length': 8}\n\u003e\u003e\u003e\u003e print(cue.xml())\n\u003cscte35:SpliceInfoSection xmlns:scte35=\"https://scte.org/schemas/35\"  ptsAdjustment=\"0\" protocolVersion=\"0\" sapType=\"3\" tier=\"4095\"\u003e\n   \u003cscte35:SpliceInsert spliceEventId=\"1073743095\" spliceEventCancelIndicator=\"false\" spliceImmediateFlag=\"false\" eventIdComplianceFlag=\"true\" availNum=\"12\" availsExpected=\"5\" outOfNetworkIndicator=\"true\" uniqueProgramId=\"1\"\u003e\n      \u003cscte35:BreakDuration autoReturn=\"false\" duration=\"2700000\"/\u003e\n   \u003c/scte35:SpliceInsert\u003e\n   \u003cscte35:AvailDescriptor providerAvailId=\"12\"/\u003e\n   \u003cscte35:AvailDescriptor providerAvailId=\"13\"/\u003e\n   \u003cscte35:AvailDescriptor providerAvailId=\"14\"/\u003e\n   \u003cscte35:AvailDescriptor providerAvailId=\"15\"/\u003e\n   \u003cscte35:AvailDescriptor providerAvailId=\"16\"/\u003e\n\u003c/scte35:SpliceInfoSection\u003e\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\nthreefive 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  threefive \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\nthreefive '/DAWAAAAAAAAAP/wBQb+ztd7owAAdIbbmw=='\n\n```\n\n\n| Input Type |     Cli Example                                                                                             |\n|------------|-------------------------------------------------------------------------------------------------------------|\n| __Base64__     |  `threefive '/DAsAAAAAyiYAP/wCgUAAAABf1+ZmQEBABECD0NVRUkAAAAAf4ABADUAAC2XQZU='`\n| __Hex__        |`threefive 0xfc301600000000000000fff00506fed605225b0000b0b65f3b`|\n| __HLS__         |`threefive hls https://example.com/master.m3u8`                                                             |\n| __JSON__        |`threefive \u003c json.json`  |\n| __Xmlbin__      | `js threefive \u003c xmlbin.xml`                                                                                 |\n\n# `Streams`\n\n|Protocol       |  Cli Example                                                                                                                                       |\n|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------|\n|  File         |   `threefive video.ts`                                                                                                                            |\n|  Http(s)      |   `threefive https://example.com/video.ts`                                                                                                        |\n|  Stdin        |  `threefive \u003c video.ts`            |\n|  UDP Multicast|  `threefive udp://@235.35.3.5:9999`                                                                          |\n|  UDP Unicast  |                                                                      `threefive udp://10.0.0.7:5555`                                              |\n|  HLS          |                                                                                                    `threefive 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__     |                                                                                                                                                                    `threefive 0xfc301600000000000000fff00506fed605225b0000b0b65f3b  base64  `                                                                                                                                                                                                                                                                                                                                         |\n| __Bytes__       |                                                                                 `threefive 0xfc301600000000000000fff00506fed605225b0000b0b65f3b  bytes`                                                                                                                                                                                                                                                                                                                                                                                                                               |\n| __Hex__         | `threefive '/DAsAAAAAyiYAP/wCgUAAAABf1+ZmQEBABECD0NVRUkAAAAAf4ABADUAAC2XQZU='  hex`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |\n| __Integer__     |                                                                                                                                                                                                                                                       `threefive '/DAsAAAAAyiYAP/wCgUAAAABf1+ZmQEBABECD0NVRUkAAAAAf4ABADUAAC2XQZU='  int`   |\n| __JSON__        |                                                                                                                                                                                                                                                                                                              `threefive 0xfc301600000000000000fff00506fed605225b0000b0b65f3b json ` |\n| __Xml+bin__     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        `threefive 0xfc301600000000000000fff00506fed605225b0000b0b65f3b xmlbin   `      |`\n\n#### `hls`\n* parse hls manifests and segments for SCTE-35\n```smalltalk\nthreefive hls https://example.com/master.m3u8\n```\n___\n#### `Iframes`\n* Show iframes PTS in an MPEGTS video\n\n```smalltalk\nthreefive iframes https://example.com/video.ts\n```\n___\n#### `packets`   \n* Print raw SCTE-35 packets from multicast mpegts video\n\n```smalltalk\nthreefive 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\nthreefive proxy video.ts\n```\n___\n#### `pts`    \n* Print PTS from mpegts video\n\n```smalltalk\nthreefive pts video.ts\n```\n___\n#### `sidecar`  \n* Parse a stream, write pts,write SCTE-35 Cues to sidecar.txt\n\n```smalltalk\nthreefive sidecar video.ts\n```\n___\n#### `sixfix`  \n* Fix SCTE-35 data mangled by ffmpeg\n\n```smalltalk\nthreefive sixfix video.ts\n```\n___\n#### `show`  \n\n* Probe mpegts video _( kind of like ffprobe )_\n\n```smalltalk\n threefive show video.ts\n```\n___\n#### `version`     \n* Show version\n\n```smalltalk\n threefive version\n```\n___\n#### `help`        \n* Help\n```rebol\n threefive help\n```\n___\n\n\n### Stream Multicast with the threefive cli, it's easy.\n\n* The threefive 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* threefive 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:~$ threefive mcast help\nusage: threefive 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### [iodisco.com/scte35](https://iodisco.com/scte35)\n\n\n___\n [__Install__](#install) |[__SCTE-35 Cli__](#the-cli-tool) | [__SCTE-35 HLS__](https://github.com/superkabuki/threefive/blob/main/hls.md) | [__Cue__ Class](https://github.com/superkabuki/threefive/blob/main/cue.md) | [__Stream__ Class](https://github.com/superkabuki/threefive/blob/main/stream.md) | [__Online SCTE-35 Parser__](https://iodisco.com/scte35) | [__Encode SCTE-35__](https://github.com/superkabuki/threefive/blob/main/encode.md) | [__SCTE-35 Examples__](https://github.com/superkabuki/threefive/tree/main/examples)\n | [__SCTE-35 XML__ ](https://github.com/superkabuki/SCTE-35/blob/main/xml.md) and [More __XML__](node.md) | [__threefive runs Four Times Faster on pypy3__](https://pypy.org/) | [__SuperKabuki SCTE-35 MPEGTS Packet Injection__](inject.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperkabuki%2Fthreefive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuperkabuki%2Fthreefive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperkabuki%2Fthreefive/lists"}