threefive 3.0.89__tar.gz → 3.0.93__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {threefive-3.0.89 → threefive-3.0.93}/PKG-INFO +18 -256
- {threefive-3.0.89 → threefive-3.0.93}/README.md +17 -255
- {threefive-3.0.89 → threefive-3.0.93}/pyproject.toml +1 -2
- {threefive-3.0.89 → threefive-3.0.93}/threefive/cli.py +18 -1
- {threefive-3.0.89 → threefive-3.0.93}/threefive/hls.py +4 -2
- {threefive-3.0.89 → threefive-3.0.93}/threefive/new_reader.py +2 -2
- {threefive-3.0.89 → threefive-3.0.93}/threefive/segment.py +4 -10
- {threefive-3.0.89 → threefive-3.0.93}/threefive/stream.py +52 -161
- {threefive-3.0.89 → threefive-3.0.93}/threefive/version.py +1 -1
- {threefive-3.0.89 → threefive-3.0.93}/threefive.egg-info/PKG-INFO +18 -256
- {threefive-3.0.89 → threefive-3.0.93}/threefive.egg-info/entry_points.txt +0 -1
- {threefive-3.0.89 → threefive-3.0.93}/LICENSE +0 -0
- {threefive-3.0.89 → threefive-3.0.93}/setup.cfg +0 -0
- {threefive-3.0.89 → threefive-3.0.93}/threefive/__init__.py +0 -0
- {threefive-3.0.89 → threefive-3.0.93}/threefive/aac.py +0 -0
- {threefive-3.0.89 → threefive-3.0.93}/threefive/base.py +0 -0
- {threefive-3.0.89 → threefive-3.0.93}/threefive/bitn.py +0 -0
- {threefive-3.0.89 → threefive-3.0.93}/threefive/bump.py +0 -0
- {threefive-3.0.89 → threefive-3.0.93}/threefive/commands.py +0 -0
- {threefive-3.0.89 → threefive-3.0.93}/threefive/crc.py +0 -0
- {threefive-3.0.89 → threefive-3.0.93}/threefive/crctable.py +0 -0
- {threefive-3.0.89 → threefive-3.0.93}/threefive/cue.py +0 -0
- {threefive-3.0.89 → threefive-3.0.93}/threefive/descriptors.py +0 -0
- {threefive-3.0.89 → threefive-3.0.93}/threefive/encode.py +0 -0
- {threefive-3.0.89 → threefive-3.0.93}/threefive/gums.py +0 -0
- {threefive-3.0.89 → threefive-3.0.93}/threefive/hlsprofile.py +0 -0
- {threefive-3.0.89 → threefive-3.0.93}/threefive/hlstags.py +0 -0
- {threefive-3.0.89 → threefive-3.0.93}/threefive/iframes.py +0 -0
- {threefive-3.0.89 → threefive-3.0.93}/threefive/packetdata.py +0 -0
- {threefive-3.0.89 → threefive-3.0.93}/threefive/pmt.py +0 -0
- {threefive-3.0.89 → threefive-3.0.93}/threefive/section.py +0 -0
- {threefive-3.0.89 → threefive-3.0.93}/threefive/segmentation.py +0 -0
- {threefive-3.0.89 → threefive-3.0.93}/threefive/sixfix.py +0 -0
- {threefive-3.0.89 → threefive-3.0.93}/threefive/speedo.py +0 -0
- {threefive-3.0.89 → threefive-3.0.93}/threefive/streamtypes.py +0 -0
- {threefive-3.0.89 → threefive-3.0.93}/threefive/stuff.py +0 -0
- {threefive-3.0.89 → threefive-3.0.93}/threefive/superkabuki.py +0 -0
- {threefive-3.0.89 → threefive-3.0.93}/threefive/throttle.py +0 -0
- {threefive-3.0.89 → threefive-3.0.93}/threefive/udp.py +0 -0
- {threefive-3.0.89 → threefive-3.0.93}/threefive/upids.py +0 -0
- {threefive-3.0.89 → threefive-3.0.93}/threefive/uxp.py +0 -0
- {threefive-3.0.89 → threefive-3.0.93}/threefive/xml.py +0 -0
- {threefive-3.0.89 → threefive-3.0.93}/threefive.egg-info/SOURCES.txt +0 -0
- {threefive-3.0.89 → threefive-3.0.93}/threefive.egg-info/dependency_links.txt +0 -0
- {threefive-3.0.89 → threefive-3.0.93}/threefive.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: threefive
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.93
|
|
4
4
|
Summary: threefive is The #1 SCTE-35 Decoder and Encoder on the Planet.
|
|
5
5
|
Author-email: AdrianofDoom <spam@iodisco.com>
|
|
6
6
|
License-Expression: Sleepycat
|
|
@@ -17,59 +17,35 @@ Description-Content-Type: text/markdown
|
|
|
17
17
|
License-File: LICENSE
|
|
18
18
|
Dynamic: license-file
|
|
19
19
|
|
|
20
|
-
#
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
<img width="1000" height="748" alt="100_0033" src="https://github.com/user-attachments/assets/dc967211-35d4-4aa5-af75-ce6099207946" />
|
|
24
|
-
|
|
25
|
-
## https://github.com/superkabuki/threefive
|
|
26
|
-
|
|
27
|
-
## threefive is the only tool that supports SCTE-35-1 and SCTE-35-2
|
|
28
|
-
|
|
20
|
+
# threefive is the highest rated SCTE-35 tool. Ever.
|
|
29
21
|
* __Decodes SCTE-35__ from `MPEGTS`✔ `Base64`✔ `Bytes`✔ `DASH`✔ `Hex` ✔ `HLS`✔ `Integers`✔ `JSON`✔ `XML`✔ `XML+Binary`✔
|
|
30
22
|
* __Encodes SCTE-35__ to `MPEGTS`✔ `Base64`✔ `Bytes`✔ `Hex`✔ `Integers`✔ `JSON`✔ `XML`✔ `XML+Binary`✔
|
|
31
23
|
___
|
|
32
24
|
|
|
33
25
|
## [ News ]
|
|
34
|
-
|
|
35
|
-
*
|
|
26
|
+
* __threefive__ now has support for __SCTE-35-2. Event Descriptors__ and __Property types__ from the recently published __2026 SCTE-35-2 Specification__.
|
|
27
|
+
* __threefive v3.0.93__ now supports HLS autodetection in the cli.
|
|
36
28
|
___
|
|
37
29
|
|
|
38
|
-
## [ Latest version is v3.0.
|
|
30
|
+
## [ Latest threefive version is v3.0.93 ] _Released 06/11/2026_
|
|
39
31
|
___
|
|
40
|
-
## [ Examples ]
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
* [base64toxmlbin.py](base64toxmlbin.py) - __convert__ __base64__ encoded __SCTE-35__ to __xml+binary__ encoded SCTE-35 and back.
|
|
44
|
-
* [cue2vtt.py](cue2vtt.py) - display __SCTE-35__ in __WebVTT__ subtitles to __verify__ __SCTE-35__ __splice points__.
|
|
45
|
-
* [decodenext.py](decodenext.py) - parse __MPEGTS__ streams for __SCTE-35__ using __Stream.decode_next()__. _(__Updated__ 01/12/2026)_
|
|
46
|
-
* [dtmf.py](dtmf.py) - parse __base64__ __SCTE-35__ with a __DTMF__ descriptor and __re-encode__ to __SCTE-35__ in __Hex__ format.
|
|
47
|
-
* [edit_break_duration.py](edit_break_duration.py) - change the __SCTE-35__ __break duration__ and __re-encode__ __SCTE-35__.
|
|
48
|
-
* [event_descriptors.py](event_descriptors.py) - The __Event Descriptor__ examples from the __2026 SCTE-35 part 2 specification__. _(__New!__ 05/10/2026)_
|
|
49
|
-
* [encode_time_signal.py](encode_time_signal.py) - __encode__ a __SCTE-35__ __Cue__ with a __TimeSignal__ from scratch.
|
|
50
|
-
* [parsehlstags.py](parsehlstags.py) - use the __TagParser__ class to parse __HLS tags__ from a __m3u8__ file and group the tags by segment.
|
|
51
|
-
* [proxy.py](proxy.py) - how to use the __Stream.proxy()__ method for parsing __SCTE-35__ and __piping__ video.
|
|
52
|
-
* [quickstream.py](quickstream.py) - how to __add SCTE-35 parsing__ for __MPEGTS__ streams to __your application__.
|
|
53
|
-
* [spliceinsert.py](spliceinsert.py) - a __SCTE-35__ __Splice Insert__ example.
|
|
54
|
-
* [upid_custom_output.py](upid_custom_output.py) - __customizing Upid data output__ for a variety of __Upids__. _(__New!__ 01/11/2026)_
|
|
55
|
-
* [custom_upid_handling.py](custom_upid_handling.py) - Custom __user defined UPID__ handling example. _(__New!__ 01/11/2026)_
|
|
32
|
+
## [[ Examples ]](https://github.com/superkabuki/threefive_is_scte35/blob/main/examples)
|
|
33
|
+
___
|
|
34
|
+
## [ [ Tip of the Week ] ](totw.md)
|
|
56
35
|
___
|
|
57
|
-
|
|
58
|
-
|
|
59
36
|
# [ Documentation ]
|
|
60
37
|
#### Need to inject SCTE-35 into HLS? [X9k3.](https://github.com/superkabuki/x9k3)
|
|
61
38
|
* [__web based SCTE-35 tools__](#web) - threefive and friends over http.
|
|
62
39
|
* [__install__](#install)
|
|
63
|
-
* [__quick start__](
|
|
40
|
+
* [__quick start__](quickstart.md)
|
|
64
41
|
* __command line tools__
|
|
65
42
|
* [ __threefive__](#cli) _decode SCTE-35 on the command line_
|
|
66
43
|
* [__scte35bump__](#scte35bump) _adjust SCTE-35 PTS in MPEGTS streams_
|
|
67
44
|
* [__scte35fix__](#scte35fix) _ffmpeg changes scte-35 streams into bin data, scte35fix changes them back._
|
|
68
|
-
* [__scte35hls__](#scte35hls) _scte35hls parses hls and ABR hls for scte-35. All hls scte-35 tags are supported__
|
|
69
45
|
* [__scte35inject__](scte35inject.md) _scte35inject inject scte-35 into mpegts._
|
|
70
46
|
* [__gums__](#gums) _gums is a multicast sender(server) for video_
|
|
71
47
|
* __library__
|
|
72
|
-
* [__Using the threefive.Cue class__](
|
|
48
|
+
* [__Using the threefive.Cue class__](lib.md)
|
|
73
49
|
* [__Using the threefive library__](#using-the-library) _decode SCTE-35 with less than ten lines of code_
|
|
74
50
|
* * [threefive __Classes__](#classes) _threefive is OO, made to subclass_
|
|
75
51
|
* [__Cue__ Class](https://github.com/superkabuki/threefive/blob/main/cue.md) _this class you'll use often_
|
|
@@ -123,225 +99,17 @@ make install py3=python3.14
|
|
|
123
99
|
# [⇧](#-documentation-)
|
|
124
100
|
___
|
|
125
101
|
|
|
126
|
-
# [⇧](#-documentation-)
|
|
127
|
-
|
|
128
|
-
## [Quick Start]
|
|
129
|
-
<i>These examples show how to parse SCTE-35<BR>
|
|
130
|
-
from various SCTE-35 data formats, with both the cli and with the library.</i>
|
|
131
|
-
<details><summary>MPEGTS</summary>
|
|
132
|
-
|
|
133
|
-
* MPEGTS streams can be Files, Http(s), Multicast,SRT, UDP Unicast, or stdin.
|
|
134
|
-
* __cli__
|
|
135
|
-
|
|
136
|
-
```js
|
|
137
|
-
threefive https://example.com/video.ts
|
|
138
|
-
```
|
|
139
|
-
* wildcards work too.
|
|
140
|
-
```js
|
|
141
|
-
threefive /mpegts/*.ts
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
* __lib__
|
|
145
|
-
```py3
|
|
146
|
-
|
|
147
|
-
from threefive import Stream
|
|
148
|
-
stream = Stream('https://example.com/video.ts')
|
|
149
|
-
stream.decode()
|
|
150
|
-
|
|
151
|
-
```
|
|
152
|
-
</details>
|
|
153
|
-
<details><summary>Base64</summary>
|
|
154
|
-
|
|
155
|
-
* __cli__
|
|
156
|
-
```js
|
|
157
|
-
threefive '/DAsAAAAAyiYAP/wCgUAAAABf1+ZmQEBABECD0NVRUkAAAAAf4ABADUAAC2XQZU='
|
|
158
|
-
```
|
|
159
|
-
* __lib__
|
|
160
|
-
```py3
|
|
161
|
-
|
|
162
|
-
from threefive import Cue
|
|
163
|
-
data = '/DAsAAAAAyiYAP/wCgUAAAABf1+ZmQEBABECD0NVRUkAAAAAf4ABADUAAC2XQZU='
|
|
164
|
-
cue=Cue(data)
|
|
165
|
-
cue.show()
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
</details>
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
<details><summary>Bytes</summary>
|
|
172
|
-
|
|
173
|
-
* __cli__
|
|
174
|
-
* Bytes don't work on the cli
|
|
175
|
-
|
|
176
|
-
* __lib__
|
|
177
|
-
```py3
|
|
178
|
-
|
|
179
|
-
from threefive import Cue
|
|
180
|
-
data = b'\xfc0\x16\x00\x00\x00\x00\x00\x00\x00\xff\xf0\x05\x06\xfe\x00\xc0D\xa0\x00\x00\x00\xb5k\x88'
|
|
181
|
-
cue=Cue(data)
|
|
182
|
-
cue.show()
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
</details>
|
|
186
|
-
|
|
187
|
-
<details><summary>Hex</summary>
|
|
188
|
-
|
|
189
|
-
* Can be a hex literal or hex string or bytes.
|
|
190
|
-
|
|
191
|
-
* __cli__
|
|
192
|
-
```js
|
|
193
|
-
threefive 0xfc301600000000000000fff00506fed605225b0000b0b65f3b
|
|
194
|
-
```
|
|
195
|
-
* __lib__
|
|
196
|
-
```py3
|
|
197
|
-
|
|
198
|
-
from threefive import Cue
|
|
199
|
-
data = 0xfc301600000000000000fff00506fed605225b0000b0b65f3b
|
|
200
|
-
cue=Cue(data)
|
|
201
|
-
cue.show()
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
</details>
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
<details><summary>Int</summary>
|
|
208
|
-
|
|
209
|
-
* Can be a literal integer or string or bytes.
|
|
210
|
-
|
|
211
|
-
* __cli__
|
|
212
|
-
```js
|
|
213
|
-
threefive 1583008701074197245727019716796221243043855984942057168199483
|
|
214
|
-
```
|
|
215
|
-
* __lib__
|
|
216
|
-
```py3
|
|
217
|
-
|
|
218
|
-
from threefive import Cue
|
|
219
|
-
data = 1583008701074197245727019716796221243043855984942057168199483
|
|
220
|
-
cue=Cue(data)
|
|
221
|
-
cue.show()
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
</details>
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
<details><summary>JSON</summary>
|
|
229
|
-
|
|
230
|
-
* __cli__
|
|
231
|
-
* put JSON SCTE-35 in a file and redirect it into threefive
|
|
232
|
-
* cat files to threefive works too.
|
|
233
|
-
* echo JSON or type JSON on the command line.
|
|
234
|
-
|
|
235
|
-
```js
|
|
236
|
-
threefive < json.json
|
|
237
|
-
```
|
|
238
|
-
* __lib__
|
|
239
|
-
|
|
240
|
-
```py3
|
|
241
|
-
|
|
242
|
-
from threefive import Cue
|
|
243
|
-
data = '''{
|
|
244
|
-
"info_section": {
|
|
245
|
-
"table_id": "0xfc",
|
|
246
|
-
"section_syntax_indicator": false,
|
|
247
|
-
"private": false,
|
|
248
|
-
"sap_type": "0x03",
|
|
249
|
-
"sap_details": "No Sap Type",
|
|
250
|
-
"section_length": 22,
|
|
251
|
-
"protocol_version": 0,
|
|
252
|
-
"encrypted_packet": false,
|
|
253
|
-
"encryption_algorithm": 0,
|
|
254
|
-
"pts_adjustment": 0.0,
|
|
255
|
-
"cw_index": "0x00",
|
|
256
|
-
"tier": "0x0fff",
|
|
257
|
-
"splice_command_length": 5,
|
|
258
|
-
"splice_command_type": 6,
|
|
259
|
-
"descriptor_loop_length": 0,
|
|
260
|
-
"crc": "0xb56b88"
|
|
261
|
-
},
|
|
262
|
-
"command": {
|
|
263
|
-
"command_length": 5,
|
|
264
|
-
"command_type": 6,
|
|
265
|
-
"name": "Time Signal",
|
|
266
|
-
"time_specified_flag": true,
|
|
267
|
-
"pts_time": 140.005333
|
|
268
|
-
},
|
|
269
|
-
"descriptors": []
|
|
270
|
-
}
|
|
271
|
-
'''
|
|
272
|
-
cue=Cue(data)
|
|
273
|
-
cue.show()
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
</details>
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
<details><summary><u>Xml</u></summary>
|
|
280
|
-
|
|
281
|
-
* __cli__
|
|
282
|
-
* put xml SCTE-35 in a [file](xml.xml) and redirect it into threefive
|
|
283
|
-
* cat files to threefive works too.
|
|
284
|
-
* echo xml or type xml on the command line.
|
|
285
|
-
|
|
286
|
-
```js
|
|
287
|
-
threefive < xml.xml
|
|
288
|
-
```
|
|
289
|
-
* __lib__
|
|
290
|
-
```py3
|
|
291
|
-
from threefive import Cue
|
|
292
|
-
data = '''
|
|
293
|
-
<scte35:SpliceInfoSection xmlns:scte35="https://scte.org/schemas/35"
|
|
294
|
-
ptsAdjustment="0" protocolVersion="0" sapType="3" tier="4095">
|
|
295
|
-
<scte35:TimeSignal>
|
|
296
|
-
<scte35:SpliceTime ptsTime="12600480"/>
|
|
297
|
-
</scte35:TimeSignal>
|
|
298
|
-
</scte35:SpliceInfoSection>
|
|
299
|
-
'''
|
|
300
|
-
cue=Cue(data)
|
|
301
|
-
|
|
302
|
-
cue.show()
|
|
303
|
-
```
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
</details>
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
<details><summary>Xml+binary</summary>
|
|
311
|
-
|
|
312
|
-
* __cli__
|
|
313
|
-
* write xml+binary to a [file](xmlbin.xml) and redirect it to threefive
|
|
314
|
-
* cat files to threefive works too.
|
|
315
|
-
* echo xml+binary or type xml+binary on the command line.
|
|
316
|
-
```js
|
|
317
|
-
threefive < xmlbin.xml
|
|
318
|
-
```
|
|
319
|
-
* __lib__
|
|
320
|
-
```py3
|
|
321
|
-
|
|
322
|
-
from threefive import Cue
|
|
323
|
-
data = '''<scte35:Signal xmlns:scte35="https://scte.org/schemas/35">
|
|
324
|
-
<scte35:Binary>/DAWAAAAAAAAAP/wBQb+AMBEoAAAALVriA==</scte35:Binary>
|
|
325
|
-
</scte35:Signal>
|
|
326
|
-
'''
|
|
327
|
-
cue=Cue(data)
|
|
328
|
-
cue.show()
|
|
329
|
-
```
|
|
330
|
-
|
|
331
|
-
</details>
|
|
332
|
-
|
|
333
|
-
</samp>
|
|
334
|
-
|
|
335
|
-
___
|
|
336
|
-
|
|
337
|
-
# [⇧](#-documentation-)
|
|
338
|
-
|
|
339
102
|
### [CLI]
|
|
340
103
|
The threefive cli tool is able to parse SCTE-35 from MPEGTS Streams,Base64,Hex,Integers,JSON XML,and XMLBinary.
|
|
341
104
|
The format is auto-detected.
|
|
342
105
|
|
|
343
106
|
# [⇧](#-documentation-)
|
|
344
107
|
|
|
108
|
+
#### [ Parse SCTE-35 from HLS with threefive ]
|
|
109
|
+
```js
|
|
110
|
+
threefive https://example.com/master.m3u8
|
|
111
|
+
```
|
|
112
|
+
|
|
345
113
|
#### [ Parse SCTE-35 from MPEGTS ]
|
|
346
114
|
SCTE-35 can be parsed from MPEGTS over a variety of protocols.
|
|
347
115
|
* __SCTE-35 Input__: MPEGTS
|
|
@@ -464,19 +232,13 @@ gums is part of threefive.
|
|
|
464
232
|
|
|
465
233
|
# [⇧](#-documentation-)
|
|
466
234
|
|
|
467
|
-
####
|
|
235
|
+
#### HLS
|
|
468
236
|
|
|
469
237
|
* parse HLS for SCTE-35. Supports all HLS SCTE-35 tags.
|
|
470
238
|
|
|
471
239
|
```js
|
|
472
|
-
$
|
|
473
|
-
|
|
474
|
-
[ threefive hls ]
|
|
475
|
-
|
|
476
|
-
[ Help ]
|
|
477
|
-
|
|
478
|
-
To display this help:
|
|
479
|
-
scte35hls help
|
|
240
|
+
$ threefive hls help
|
|
241
|
+
```
|
|
480
242
|
|
|
481
243
|
[ Input ]
|
|
482
244
|
threefive hls takes an m3u8 URI as input.
|
|
@@ -1,56 +1,32 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
<img width="1000" height="748" alt="100_0033" src="https://github.com/user-attachments/assets/dc967211-35d4-4aa5-af75-ce6099207946" />
|
|
5
|
-
|
|
6
|
-
## https://github.com/superkabuki/threefive
|
|
7
|
-
|
|
8
|
-
## threefive is the only tool that supports SCTE-35-1 and SCTE-35-2
|
|
9
|
-
|
|
1
|
+
# threefive is the highest rated SCTE-35 tool. Ever.
|
|
10
2
|
* __Decodes SCTE-35__ from `MPEGTS`✔ `Base64`✔ `Bytes`✔ `DASH`✔ `Hex` ✔ `HLS`✔ `Integers`✔ `JSON`✔ `XML`✔ `XML+Binary`✔
|
|
11
3
|
* __Encodes SCTE-35__ to `MPEGTS`✔ `Base64`✔ `Bytes`✔ `Hex`✔ `Integers`✔ `JSON`✔ `XML`✔ `XML+Binary`✔
|
|
12
4
|
___
|
|
13
5
|
|
|
14
6
|
## [ News ]
|
|
15
|
-
|
|
16
|
-
*
|
|
7
|
+
* __threefive__ now has support for __SCTE-35-2. Event Descriptors__ and __Property types__ from the recently published __2026 SCTE-35-2 Specification__.
|
|
8
|
+
* __threefive v3.0.93__ now supports HLS autodetection in the cli.
|
|
17
9
|
___
|
|
18
10
|
|
|
19
|
-
## [ Latest version is v3.0.
|
|
11
|
+
## [ Latest threefive version is v3.0.93 ] _Released 06/11/2026_
|
|
20
12
|
___
|
|
21
|
-
## [ Examples ]
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
* [base64toxmlbin.py](base64toxmlbin.py) - __convert__ __base64__ encoded __SCTE-35__ to __xml+binary__ encoded SCTE-35 and back.
|
|
25
|
-
* [cue2vtt.py](cue2vtt.py) - display __SCTE-35__ in __WebVTT__ subtitles to __verify__ __SCTE-35__ __splice points__.
|
|
26
|
-
* [decodenext.py](decodenext.py) - parse __MPEGTS__ streams for __SCTE-35__ using __Stream.decode_next()__. _(__Updated__ 01/12/2026)_
|
|
27
|
-
* [dtmf.py](dtmf.py) - parse __base64__ __SCTE-35__ with a __DTMF__ descriptor and __re-encode__ to __SCTE-35__ in __Hex__ format.
|
|
28
|
-
* [edit_break_duration.py](edit_break_duration.py) - change the __SCTE-35__ __break duration__ and __re-encode__ __SCTE-35__.
|
|
29
|
-
* [event_descriptors.py](event_descriptors.py) - The __Event Descriptor__ examples from the __2026 SCTE-35 part 2 specification__. _(__New!__ 05/10/2026)_
|
|
30
|
-
* [encode_time_signal.py](encode_time_signal.py) - __encode__ a __SCTE-35__ __Cue__ with a __TimeSignal__ from scratch.
|
|
31
|
-
* [parsehlstags.py](parsehlstags.py) - use the __TagParser__ class to parse __HLS tags__ from a __m3u8__ file and group the tags by segment.
|
|
32
|
-
* [proxy.py](proxy.py) - how to use the __Stream.proxy()__ method for parsing __SCTE-35__ and __piping__ video.
|
|
33
|
-
* [quickstream.py](quickstream.py) - how to __add SCTE-35 parsing__ for __MPEGTS__ streams to __your application__.
|
|
34
|
-
* [spliceinsert.py](spliceinsert.py) - a __SCTE-35__ __Splice Insert__ example.
|
|
35
|
-
* [upid_custom_output.py](upid_custom_output.py) - __customizing Upid data output__ for a variety of __Upids__. _(__New!__ 01/11/2026)_
|
|
36
|
-
* [custom_upid_handling.py](custom_upid_handling.py) - Custom __user defined UPID__ handling example. _(__New!__ 01/11/2026)_
|
|
13
|
+
## [[ Examples ]](https://github.com/superkabuki/threefive_is_scte35/blob/main/examples)
|
|
14
|
+
___
|
|
15
|
+
## [ [ Tip of the Week ] ](totw.md)
|
|
37
16
|
___
|
|
38
|
-
|
|
39
|
-
|
|
40
17
|
# [ Documentation ]
|
|
41
18
|
#### Need to inject SCTE-35 into HLS? [X9k3.](https://github.com/superkabuki/x9k3)
|
|
42
19
|
* [__web based SCTE-35 tools__](#web) - threefive and friends over http.
|
|
43
20
|
* [__install__](#install)
|
|
44
|
-
* [__quick start__](
|
|
21
|
+
* [__quick start__](quickstart.md)
|
|
45
22
|
* __command line tools__
|
|
46
23
|
* [ __threefive__](#cli) _decode SCTE-35 on the command line_
|
|
47
24
|
* [__scte35bump__](#scte35bump) _adjust SCTE-35 PTS in MPEGTS streams_
|
|
48
25
|
* [__scte35fix__](#scte35fix) _ffmpeg changes scte-35 streams into bin data, scte35fix changes them back._
|
|
49
|
-
* [__scte35hls__](#scte35hls) _scte35hls parses hls and ABR hls for scte-35. All hls scte-35 tags are supported__
|
|
50
26
|
* [__scte35inject__](scte35inject.md) _scte35inject inject scte-35 into mpegts._
|
|
51
27
|
* [__gums__](#gums) _gums is a multicast sender(server) for video_
|
|
52
28
|
* __library__
|
|
53
|
-
* [__Using the threefive.Cue class__](
|
|
29
|
+
* [__Using the threefive.Cue class__](lib.md)
|
|
54
30
|
* [__Using the threefive library__](#using-the-library) _decode SCTE-35 with less than ten lines of code_
|
|
55
31
|
* * [threefive __Classes__](#classes) _threefive is OO, made to subclass_
|
|
56
32
|
* [__Cue__ Class](https://github.com/superkabuki/threefive/blob/main/cue.md) _this class you'll use often_
|
|
@@ -104,225 +80,17 @@ make install py3=python3.14
|
|
|
104
80
|
# [⇧](#-documentation-)
|
|
105
81
|
___
|
|
106
82
|
|
|
107
|
-
# [⇧](#-documentation-)
|
|
108
|
-
|
|
109
|
-
## [Quick Start]
|
|
110
|
-
<i>These examples show how to parse SCTE-35<BR>
|
|
111
|
-
from various SCTE-35 data formats, with both the cli and with the library.</i>
|
|
112
|
-
<details><summary>MPEGTS</summary>
|
|
113
|
-
|
|
114
|
-
* MPEGTS streams can be Files, Http(s), Multicast,SRT, UDP Unicast, or stdin.
|
|
115
|
-
* __cli__
|
|
116
|
-
|
|
117
|
-
```js
|
|
118
|
-
threefive https://example.com/video.ts
|
|
119
|
-
```
|
|
120
|
-
* wildcards work too.
|
|
121
|
-
```js
|
|
122
|
-
threefive /mpegts/*.ts
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
* __lib__
|
|
126
|
-
```py3
|
|
127
|
-
|
|
128
|
-
from threefive import Stream
|
|
129
|
-
stream = Stream('https://example.com/video.ts')
|
|
130
|
-
stream.decode()
|
|
131
|
-
|
|
132
|
-
```
|
|
133
|
-
</details>
|
|
134
|
-
<details><summary>Base64</summary>
|
|
135
|
-
|
|
136
|
-
* __cli__
|
|
137
|
-
```js
|
|
138
|
-
threefive '/DAsAAAAAyiYAP/wCgUAAAABf1+ZmQEBABECD0NVRUkAAAAAf4ABADUAAC2XQZU='
|
|
139
|
-
```
|
|
140
|
-
* __lib__
|
|
141
|
-
```py3
|
|
142
|
-
|
|
143
|
-
from threefive import Cue
|
|
144
|
-
data = '/DAsAAAAAyiYAP/wCgUAAAABf1+ZmQEBABECD0NVRUkAAAAAf4ABADUAAC2XQZU='
|
|
145
|
-
cue=Cue(data)
|
|
146
|
-
cue.show()
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
</details>
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
<details><summary>Bytes</summary>
|
|
153
|
-
|
|
154
|
-
* __cli__
|
|
155
|
-
* Bytes don't work on the cli
|
|
156
|
-
|
|
157
|
-
* __lib__
|
|
158
|
-
```py3
|
|
159
|
-
|
|
160
|
-
from threefive import Cue
|
|
161
|
-
data = b'\xfc0\x16\x00\x00\x00\x00\x00\x00\x00\xff\xf0\x05\x06\xfe\x00\xc0D\xa0\x00\x00\x00\xb5k\x88'
|
|
162
|
-
cue=Cue(data)
|
|
163
|
-
cue.show()
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
</details>
|
|
167
|
-
|
|
168
|
-
<details><summary>Hex</summary>
|
|
169
|
-
|
|
170
|
-
* Can be a hex literal or hex string or bytes.
|
|
171
|
-
|
|
172
|
-
* __cli__
|
|
173
|
-
```js
|
|
174
|
-
threefive 0xfc301600000000000000fff00506fed605225b0000b0b65f3b
|
|
175
|
-
```
|
|
176
|
-
* __lib__
|
|
177
|
-
```py3
|
|
178
|
-
|
|
179
|
-
from threefive import Cue
|
|
180
|
-
data = 0xfc301600000000000000fff00506fed605225b0000b0b65f3b
|
|
181
|
-
cue=Cue(data)
|
|
182
|
-
cue.show()
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
</details>
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
<details><summary>Int</summary>
|
|
189
|
-
|
|
190
|
-
* Can be a literal integer or string or bytes.
|
|
191
|
-
|
|
192
|
-
* __cli__
|
|
193
|
-
```js
|
|
194
|
-
threefive 1583008701074197245727019716796221243043855984942057168199483
|
|
195
|
-
```
|
|
196
|
-
* __lib__
|
|
197
|
-
```py3
|
|
198
|
-
|
|
199
|
-
from threefive import Cue
|
|
200
|
-
data = 1583008701074197245727019716796221243043855984942057168199483
|
|
201
|
-
cue=Cue(data)
|
|
202
|
-
cue.show()
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
</details>
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
<details><summary>JSON</summary>
|
|
210
|
-
|
|
211
|
-
* __cli__
|
|
212
|
-
* put JSON SCTE-35 in a file and redirect it into threefive
|
|
213
|
-
* cat files to threefive works too.
|
|
214
|
-
* echo JSON or type JSON on the command line.
|
|
215
|
-
|
|
216
|
-
```js
|
|
217
|
-
threefive < json.json
|
|
218
|
-
```
|
|
219
|
-
* __lib__
|
|
220
|
-
|
|
221
|
-
```py3
|
|
222
|
-
|
|
223
|
-
from threefive import Cue
|
|
224
|
-
data = '''{
|
|
225
|
-
"info_section": {
|
|
226
|
-
"table_id": "0xfc",
|
|
227
|
-
"section_syntax_indicator": false,
|
|
228
|
-
"private": false,
|
|
229
|
-
"sap_type": "0x03",
|
|
230
|
-
"sap_details": "No Sap Type",
|
|
231
|
-
"section_length": 22,
|
|
232
|
-
"protocol_version": 0,
|
|
233
|
-
"encrypted_packet": false,
|
|
234
|
-
"encryption_algorithm": 0,
|
|
235
|
-
"pts_adjustment": 0.0,
|
|
236
|
-
"cw_index": "0x00",
|
|
237
|
-
"tier": "0x0fff",
|
|
238
|
-
"splice_command_length": 5,
|
|
239
|
-
"splice_command_type": 6,
|
|
240
|
-
"descriptor_loop_length": 0,
|
|
241
|
-
"crc": "0xb56b88"
|
|
242
|
-
},
|
|
243
|
-
"command": {
|
|
244
|
-
"command_length": 5,
|
|
245
|
-
"command_type": 6,
|
|
246
|
-
"name": "Time Signal",
|
|
247
|
-
"time_specified_flag": true,
|
|
248
|
-
"pts_time": 140.005333
|
|
249
|
-
},
|
|
250
|
-
"descriptors": []
|
|
251
|
-
}
|
|
252
|
-
'''
|
|
253
|
-
cue=Cue(data)
|
|
254
|
-
cue.show()
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
</details>
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
<details><summary><u>Xml</u></summary>
|
|
261
|
-
|
|
262
|
-
* __cli__
|
|
263
|
-
* put xml SCTE-35 in a [file](xml.xml) and redirect it into threefive
|
|
264
|
-
* cat files to threefive works too.
|
|
265
|
-
* echo xml or type xml on the command line.
|
|
266
|
-
|
|
267
|
-
```js
|
|
268
|
-
threefive < xml.xml
|
|
269
|
-
```
|
|
270
|
-
* __lib__
|
|
271
|
-
```py3
|
|
272
|
-
from threefive import Cue
|
|
273
|
-
data = '''
|
|
274
|
-
<scte35:SpliceInfoSection xmlns:scte35="https://scte.org/schemas/35"
|
|
275
|
-
ptsAdjustment="0" protocolVersion="0" sapType="3" tier="4095">
|
|
276
|
-
<scte35:TimeSignal>
|
|
277
|
-
<scte35:SpliceTime ptsTime="12600480"/>
|
|
278
|
-
</scte35:TimeSignal>
|
|
279
|
-
</scte35:SpliceInfoSection>
|
|
280
|
-
'''
|
|
281
|
-
cue=Cue(data)
|
|
282
|
-
|
|
283
|
-
cue.show()
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
</details>
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
<details><summary>Xml+binary</summary>
|
|
292
|
-
|
|
293
|
-
* __cli__
|
|
294
|
-
* write xml+binary to a [file](xmlbin.xml) and redirect it to threefive
|
|
295
|
-
* cat files to threefive works too.
|
|
296
|
-
* echo xml+binary or type xml+binary on the command line.
|
|
297
|
-
```js
|
|
298
|
-
threefive < xmlbin.xml
|
|
299
|
-
```
|
|
300
|
-
* __lib__
|
|
301
|
-
```py3
|
|
302
|
-
|
|
303
|
-
from threefive import Cue
|
|
304
|
-
data = '''<scte35:Signal xmlns:scte35="https://scte.org/schemas/35">
|
|
305
|
-
<scte35:Binary>/DAWAAAAAAAAAP/wBQb+AMBEoAAAALVriA==</scte35:Binary>
|
|
306
|
-
</scte35:Signal>
|
|
307
|
-
'''
|
|
308
|
-
cue=Cue(data)
|
|
309
|
-
cue.show()
|
|
310
|
-
```
|
|
311
|
-
|
|
312
|
-
</details>
|
|
313
|
-
|
|
314
|
-
</samp>
|
|
315
|
-
|
|
316
|
-
___
|
|
317
|
-
|
|
318
|
-
# [⇧](#-documentation-)
|
|
319
|
-
|
|
320
83
|
### [CLI]
|
|
321
84
|
The threefive cli tool is able to parse SCTE-35 from MPEGTS Streams,Base64,Hex,Integers,JSON XML,and XMLBinary.
|
|
322
85
|
The format is auto-detected.
|
|
323
86
|
|
|
324
87
|
# [⇧](#-documentation-)
|
|
325
88
|
|
|
89
|
+
#### [ Parse SCTE-35 from HLS with threefive ]
|
|
90
|
+
```js
|
|
91
|
+
threefive https://example.com/master.m3u8
|
|
92
|
+
```
|
|
93
|
+
|
|
326
94
|
#### [ Parse SCTE-35 from MPEGTS ]
|
|
327
95
|
SCTE-35 can be parsed from MPEGTS over a variety of protocols.
|
|
328
96
|
* __SCTE-35 Input__: MPEGTS
|
|
@@ -445,19 +213,13 @@ gums is part of threefive.
|
|
|
445
213
|
|
|
446
214
|
# [⇧](#-documentation-)
|
|
447
215
|
|
|
448
|
-
####
|
|
216
|
+
#### HLS
|
|
449
217
|
|
|
450
218
|
* parse HLS for SCTE-35. Supports all HLS SCTE-35 tags.
|
|
451
219
|
|
|
452
220
|
```js
|
|
453
|
-
$
|
|
454
|
-
|
|
455
|
-
[ threefive hls ]
|
|
456
|
-
|
|
457
|
-
[ Help ]
|
|
458
|
-
|
|
459
|
-
To display this help:
|
|
460
|
-
scte35hls help
|
|
221
|
+
$ threefive hls help
|
|
222
|
+
```
|
|
461
223
|
|
|
462
224
|
[ Input ]
|
|
463
225
|
threefive hls takes an m3u8 URI as input.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
[project]
|
|
3
3
|
name = "threefive"
|
|
4
|
-
version = "3.0.
|
|
4
|
+
version = "3.0.93"
|
|
5
5
|
authors = [
|
|
6
6
|
{ name="AdrianofDoom", email="spam@iodisco.com" },
|
|
7
7
|
]
|
|
@@ -31,7 +31,6 @@ Issues = "https://github.com/superkabuki/threefive/issues"
|
|
|
31
31
|
[project.scripts]
|
|
32
32
|
scte35bump = "threefive.bump:cli"
|
|
33
33
|
gums = "threefive.gums:cli"
|
|
34
|
-
scte35hls = "threefive.hls:cli"
|
|
35
34
|
scte35fix = "threefive.sixfix:cli"
|
|
36
35
|
scte35inject = "threefive.superkabuki:cli"
|
|
37
36
|
threefive = "threefive.cli:threefivecli"
|
|
@@ -82,7 +82,7 @@ def done():
|
|
|
82
82
|
done prints the threefive version, interpreter version,
|
|
83
83
|
and calls sys.exit()
|
|
84
84
|
"""
|
|
85
|
-
|
|
85
|
+
print2(f"# threefive: {version} on python: {sys.version}")
|
|
86
86
|
sys.exit()
|
|
87
87
|
|
|
88
88
|
|
|
@@ -441,6 +441,22 @@ def dashdashhelp():
|
|
|
441
441
|
sys.argv[idx] = "--help"
|
|
442
442
|
|
|
443
443
|
|
|
444
|
+
def chk_hls():
|
|
445
|
+
"""
|
|
446
|
+
chk_hls check if an m3u8 has
|
|
447
|
+
been passed on the command line
|
|
448
|
+
and call the hlscli if it is an m3u8
|
|
449
|
+
"""
|
|
450
|
+
try:
|
|
451
|
+
this = sys.argv[1]
|
|
452
|
+
packet = reader(this).read(188)
|
|
453
|
+
if b"#EXTM3U" in packet :
|
|
454
|
+
hlscli()
|
|
455
|
+
done()
|
|
456
|
+
except:
|
|
457
|
+
pass
|
|
458
|
+
|
|
459
|
+
|
|
444
460
|
def threefivecli():
|
|
445
461
|
"""
|
|
446
462
|
threefivecli check all the maps
|
|
@@ -453,6 +469,7 @@ def threefivecli():
|
|
|
453
469
|
|
|
454
470
|
"""
|
|
455
471
|
dashdashhelp()
|
|
472
|
+
chk_hls()
|
|
456
473
|
chk_print_map()
|
|
457
474
|
chk_mpegts_map()
|
|
458
475
|
chk_funk_map()
|