threefive 3.0.87__tar.gz → 3.0.91__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.87 → threefive-3.0.91}/PKG-INFO +298 -272
- {threefive-3.0.87 → threefive-3.0.91}/README.md +297 -271
- {threefive-3.0.87 → threefive-3.0.91}/pyproject.toml +1 -1
- {threefive-3.0.87 → threefive-3.0.91}/threefive/bump.py +3 -3
- {threefive-3.0.87 → threefive-3.0.91}/threefive/cli.py +17 -95
- {threefive-3.0.87 → threefive-3.0.91}/threefive/cue.py +0 -1
- {threefive-3.0.87 → threefive-3.0.91}/threefive/descriptors.py +71 -44
- {threefive-3.0.87 → threefive-3.0.91}/threefive/encode.py +1 -1
- {threefive-3.0.87 → threefive-3.0.91}/threefive/gums.py +2 -3
- {threefive-3.0.87 → threefive-3.0.91}/threefive/hls.py +7 -7
- {threefive-3.0.87 → threefive-3.0.91}/threefive/new_reader.py +8 -6
- {threefive-3.0.87 → threefive-3.0.91}/threefive/segment.py +5 -4
- {threefive-3.0.87 → threefive-3.0.91}/threefive/sixfix.py +11 -10
- {threefive-3.0.87 → threefive-3.0.91}/threefive/stream.py +66 -87
- {threefive-3.0.87 → threefive-3.0.91}/threefive/stuff.py +1 -1
- {threefive-3.0.87 → threefive-3.0.91}/threefive/superkabuki.py +3 -1
- {threefive-3.0.87 → threefive-3.0.91}/threefive/throttle.py +31 -11
- {threefive-3.0.87 → threefive-3.0.91}/threefive/upids.py +1 -1
- {threefive-3.0.87 → threefive-3.0.91}/threefive/version.py +1 -1
- {threefive-3.0.87 → threefive-3.0.91}/threefive.egg-info/PKG-INFO +298 -272
- {threefive-3.0.87 → threefive-3.0.91}/LICENSE +0 -0
- {threefive-3.0.87 → threefive-3.0.91}/setup.cfg +0 -0
- {threefive-3.0.87 → threefive-3.0.91}/threefive/__init__.py +0 -0
- {threefive-3.0.87 → threefive-3.0.91}/threefive/aac.py +0 -0
- {threefive-3.0.87 → threefive-3.0.91}/threefive/base.py +0 -0
- {threefive-3.0.87 → threefive-3.0.91}/threefive/bitn.py +0 -0
- {threefive-3.0.87 → threefive-3.0.91}/threefive/commands.py +0 -0
- {threefive-3.0.87 → threefive-3.0.91}/threefive/crc.py +0 -0
- {threefive-3.0.87 → threefive-3.0.91}/threefive/crctable.py +0 -0
- {threefive-3.0.87 → threefive-3.0.91}/threefive/hlsprofile.py +0 -0
- {threefive-3.0.87 → threefive-3.0.91}/threefive/hlstags.py +0 -0
- {threefive-3.0.87 → threefive-3.0.91}/threefive/iframes.py +0 -0
- {threefive-3.0.87 → threefive-3.0.91}/threefive/packetdata.py +0 -0
- {threefive-3.0.87 → threefive-3.0.91}/threefive/pmt.py +0 -0
- {threefive-3.0.87 → threefive-3.0.91}/threefive/section.py +0 -0
- {threefive-3.0.87 → threefive-3.0.91}/threefive/segmentation.py +0 -0
- {threefive-3.0.87 → threefive-3.0.91}/threefive/speedo.py +0 -0
- {threefive-3.0.87 → threefive-3.0.91}/threefive/streamtypes.py +0 -0
- {threefive-3.0.87 → threefive-3.0.91}/threefive/udp.py +0 -0
- {threefive-3.0.87 → threefive-3.0.91}/threefive/uxp.py +0 -0
- {threefive-3.0.87 → threefive-3.0.91}/threefive/xml.py +0 -0
- {threefive-3.0.87 → threefive-3.0.91}/threefive.egg-info/SOURCES.txt +0 -0
- {threefive-3.0.87 → threefive-3.0.91}/threefive.egg-info/dependency_links.txt +0 -0
- {threefive-3.0.87 → threefive-3.0.91}/threefive.egg-info/entry_points.txt +0 -0
- {threefive-3.0.87 → threefive-3.0.91}/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.91
|
|
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
|
|
@@ -19,95 +19,31 @@ Dynamic: license-file
|
|
|
19
19
|
|
|
20
20
|
# [ threefive ]
|
|
21
21
|
|
|
22
|
-
## https://github.com/superkabuki/threefive
|
|
23
|
-
### threefive is the industry leading SCTE-35 tool.
|
|
24
|
-
|
|
25
|
-
* In case you were wondering ....
|
|
26
|
-
|
|
27
|
-
<img width="672" height="586" alt="image" src="https://github.com/user-attachments/assets/0c327200-e1f0-4055-825f-349fe89c32d6" />
|
|
28
22
|
|
|
23
|
+
<img width="1000" height="748" alt="100_0033" src="https://github.com/user-attachments/assets/dc967211-35d4-4aa5-af75-ce6099207946" />
|
|
29
24
|
|
|
25
|
+
## https://github.com/superkabuki/threefive
|
|
30
26
|
|
|
31
|
-
|
|
27
|
+
## threefive is the only tool that supports SCTE-35-1 and SCTE-35-2
|
|
32
28
|
|
|
33
|
-
* __Decodes SCTE-35__ from `MPEGTS`✔ `Base64`✔ `Bytes`✔ `DASH`✔ `Hex` ✔ `HLS`✔ `Integers`✔ `JSON`✔ `XML`✔ `XML+Binary`✔
|
|
34
|
-
|
|
29
|
+
* __Decodes SCTE-35__ from `MPEGTS`✔ `Base64`✔ `Bytes`✔ `DASH`✔ `Hex` ✔ `HLS`✔ `Integers`✔ `JSON`✔ `XML`✔ `XML+Binary`✔
|
|
35
30
|
* __Encodes SCTE-35__ to `MPEGTS`✔ `Base64`✔ `Bytes`✔ `Hex`✔ `Integers`✔ `JSON`✔ `XML`✔ `XML+Binary`✔
|
|
36
31
|
___
|
|
37
32
|
|
|
38
|
-
|
|
39
33
|
## [ News ]
|
|
40
|
-
* __threefive.Stream.decode()__ now does __interpreter detection__ and uses __multiprocessing__ for __python3.11__ and __python3.14__ for a __serious speedup__.
|
|
41
|
-
* __Event Descriptors__ and __Property__ types from __the recently published 2026 SCTE-35 Specification part 2__ have been added.
|
|
42
|
-
* __threefive no longer uses setuptools for packaging__ and I know you don't care.
|
|
43
|
-
* __threefive now supports__ [__Secure Reliable Transport__](https://github.com/superkabuki/threefive_is_scte35/blob/main/README.md#threefive-now-supports-srt) (watch the cool video)
|
|
44
|
-
___
|
|
45
|
-
|
|
46
|
-
## [ Latest version is v3.0.87 ]
|
|
47
|
-
|
|
48
|
-
* threefive cyclomatic complexity score is 1.9337094499294782 _( that's better than the Python standard library)_ .
|
|
49
|
-
* __threefive now has NO External Dependencies__
|
|
50
|
-
* SRT and AES support is now optional
|
|
51
|
-
* __threefive is fully python v3.14 compliant__
|
|
52
|
-
* __No more setup tools!__ threefive now uses a __toml file and a Makefile__ to generate packages,
|
|
53
|
-
* I'm just trying to fit in with the cool python kids.
|
|
54
|
-
* __New__ the threefive cli tool has spun off several new cli tools. I had to split the cli up, the help was just way too long.
|
|
55
|
-
* In addition to the __threefive__ cli you also get:
|
|
56
|
-
* __scte35bump__ _adjust scte-35 pts in mpegts streams_
|
|
57
|
-
* __scte35fix__ _change bin data streams back to scte-35_
|
|
58
|
-
* __scte35hls__ _parse scte-35 from hls tags and segments_
|
|
59
|
-
* __scte35inject__ _inject scte-35 packets into mpegts streams_
|
|
60
|
-
* __gums__ _(the Grande Unified unicast and Multicast Server)_
|
|
61
|
-
___
|
|
62
|
-
|
|
63
|
-
### If you parse the output from the threefive cli....
|
|
64
|
-
* Comments, errors, and warnings, even printed comments, errors, and warnings, that are not the output, start with an octothorpe '#' and can be stripped, if needed, with sed.
|
|
65
|
-
```sed
|
|
66
|
-
threefive video.ts 2>&1 | sed -n '/^\#/!p' -
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
### [ Speed Test ]
|
|
70
|
-
#### pypy3 vs. python3.11 vs. python3.14 running threefive 3.0.0x840c (_pre-release_)
|
|
71
|
-
|
|
72
|
-
* Using multiprocessing cuts parsing time in half for python 3.11 even more for python3.14
|
|
73
|
-
|
|
74
|
-
* single process pypy3 is still faster though.
|
|
75
|
-
|
|
76
|
-
* The test is to parse a 3.7 GB file for 286 SCTE-35 Cues.
|
|
77
|
-
|
|
78
|
-
* Results
|
|
79
|
-
|
|
80
|
-
| interpreter| time |
|
|
81
|
-
|------------|----------|
|
|
82
|
-
|__pypy3__ |__3.532 secs__|
|
|
83
|
-
|python3.11 |5.520 secs|
|
|
84
|
-
|python3.14 |5.521 secs|
|
|
85
|
-
|
|
86
|
-
* When I did the same test for threefive v3.0.83, pypy3 was 4.1 seconds, python3.11 was 10 seconds, and python3.14 was over 14 secs
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
## [ Try these in your browser ]
|
|
90
|
-
#### Parse SCTE-35 in MPEGTS over HTTP, in your browser with[ Go, Wasm and Super Karate Death Car](https://bigcorp.ltd/gowasm)
|
|
91
|
-
|
|
92
|
-
#### Parse, edit, and convert SCTE-35 Cues in your browser with [fastcgi, python3, threefive, and nstuff](https://iodisco.com/scte35)
|
|
93
|
-
|
|
94
|
-
#### Parse SCTE-35 in MPEGTS over HTTP, in your browser with[ threefive.js,javascript, and a little sed](https://bigcorp.ltd/bread) just to keep things interesting.
|
|
95
|
-
|
|
96
|
-
#### Decode SCTE-35 data via Http request in a browser, with curl, or whatever with [Sassy](https://github.com/superkabuki/threefive_is_scte35/blob/main/sassy.md) , SCTE-35 as a Service.
|
|
97
34
|
|
|
35
|
+
* threefive now has support for SCTE-35-2. __Event Descriptors__ and __Property__ types from __the recently published 2026 SCTE-35 Specification can be decoded, modified, and encoded with threefive.
|
|
98
36
|
___
|
|
99
|
-
# [__[ Examples ]__](https://github.com/superkabuki/threefive/tree/main/examples)
|
|
100
37
|
|
|
38
|
+
## [ Latest version is v3.0.91 ]
|
|
39
|
+
___
|
|
101
40
|
|
|
102
41
|
|
|
103
42
|
# [ Documentation ]
|
|
104
|
-
|
|
105
|
-
*
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
* [SCTE-35 __As a Service__](sassy.md) _if you can make an http request, you can parse SCTE-35, no install needed._
|
|
109
|
-
|
|
110
|
-
* [__install__](#install)
|
|
43
|
+
#### Need to inject SCTE-35 into HLS? [X9k3.](https://github.com/superkabuki/x9k3)
|
|
44
|
+
* [__web based SCTE-35 tools__](#web) - threefive and friends over http.
|
|
45
|
+
* [__install__](#install)
|
|
46
|
+
* [__quick start__](https://github.com/superkabuki/threefive_is_scte35/blob/main/README.md#quick-start)
|
|
111
47
|
* __command line tools__
|
|
112
48
|
* [ __threefive__](#cli) _decode SCTE-35 on the command line_
|
|
113
49
|
* [__scte35bump__](#scte35bump) _adjust SCTE-35 PTS in MPEGTS streams_
|
|
@@ -121,7 +57,6 @@ ___
|
|
|
121
57
|
* * [threefive __Classes__](#classes) _threefive is OO, made to subclass_
|
|
122
58
|
* [__Cue__ Class](https://github.com/superkabuki/threefive/blob/main/cue.md) _this class you'll use often_
|
|
123
59
|
* [__Stream__ Class](https://github.com/superkabuki/threefive/blob/main/stream.md) _this is the class for parsing MPEGTS_
|
|
124
|
-
|
|
125
60
|
* [SCTE-35 __Sidecar Files__](https://github.com/superkabuki/SCTE-35_Sidecar_Files) _threefive supports SCTE-35 sidecar files_
|
|
126
61
|
* [SCTE-35 __HLS__](https://github.com/superkabuki/threefive/blob/main/hls.md) _parse SCTE-35 in HLS__
|
|
127
62
|
* [SCTE-35 __XML__ ](https://github.com/superkabuki/SCTE-35/blob/main/xml.md) and [More __XML__](node.md) _threefive can parse and encode SCTE-35 xml_
|
|
@@ -168,17 +103,230 @@ make install py3=python3.14
|
|
|
168
103
|
# works for any python in your path or use a full path if needed.
|
|
169
104
|
|
|
170
105
|
```
|
|
171
|
-
|
|
106
|
+
# [⇧](#-documentation-)
|
|
172
107
|
___
|
|
173
108
|
|
|
109
|
+
# [⇧](#-documentation-)
|
|
174
110
|
|
|
175
111
|
## [Quick Start]
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
112
|
+
<i>These examples show how to parse SCTE-35<BR>
|
|
113
|
+
from various SCTE-35 data formats, with both the cli and with the library.</i>
|
|
114
|
+
<details><summary>MPEGTS</summary>
|
|
115
|
+
|
|
116
|
+
* MPEGTS streams can be Files, Http(s), Multicast,SRT, UDP Unicast, or stdin.
|
|
117
|
+
* __cli__
|
|
118
|
+
|
|
119
|
+
```js
|
|
120
|
+
threefive https://example.com/video.ts
|
|
121
|
+
```
|
|
122
|
+
* wildcards work too.
|
|
123
|
+
```js
|
|
124
|
+
threefive /mpegts/*.ts
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
* __lib__
|
|
128
|
+
```py3
|
|
129
|
+
|
|
130
|
+
from threefive import Stream
|
|
131
|
+
stream = Stream('https://example.com/video.ts')
|
|
132
|
+
stream.decode()
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
</details>
|
|
136
|
+
<details><summary>Base64</summary>
|
|
137
|
+
|
|
138
|
+
* __cli__
|
|
139
|
+
```js
|
|
140
|
+
threefive '/DAsAAAAAyiYAP/wCgUAAAABf1+ZmQEBABECD0NVRUkAAAAAf4ABADUAAC2XQZU='
|
|
141
|
+
```
|
|
142
|
+
* __lib__
|
|
143
|
+
```py3
|
|
144
|
+
|
|
145
|
+
from threefive import Cue
|
|
146
|
+
data = '/DAsAAAAAyiYAP/wCgUAAAABf1+ZmQEBABECD0NVRUkAAAAAf4ABADUAAC2XQZU='
|
|
147
|
+
cue=Cue(data)
|
|
148
|
+
cue.show()
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
</details>
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
<details><summary>Bytes</summary>
|
|
155
|
+
|
|
156
|
+
* __cli__
|
|
157
|
+
* Bytes don't work on the cli
|
|
158
|
+
|
|
159
|
+
* __lib__
|
|
160
|
+
```py3
|
|
161
|
+
|
|
162
|
+
from threefive import Cue
|
|
163
|
+
data = b'\xfc0\x16\x00\x00\x00\x00\x00\x00\x00\xff\xf0\x05\x06\xfe\x00\xc0D\xa0\x00\x00\x00\xb5k\x88'
|
|
164
|
+
cue=Cue(data)
|
|
165
|
+
cue.show()
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
</details>
|
|
169
|
+
|
|
170
|
+
<details><summary>Hex</summary>
|
|
171
|
+
|
|
172
|
+
* Can be a hex literal or hex string or bytes.
|
|
173
|
+
|
|
174
|
+
* __cli__
|
|
175
|
+
```js
|
|
176
|
+
threefive 0xfc301600000000000000fff00506fed605225b0000b0b65f3b
|
|
177
|
+
```
|
|
178
|
+
* __lib__
|
|
179
|
+
```py3
|
|
180
|
+
|
|
181
|
+
from threefive import Cue
|
|
182
|
+
data = 0xfc301600000000000000fff00506fed605225b0000b0b65f3b
|
|
183
|
+
cue=Cue(data)
|
|
184
|
+
cue.show()
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
</details>
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
<details><summary>Int</summary>
|
|
191
|
+
|
|
192
|
+
* Can be a literal integer or string or bytes.
|
|
193
|
+
|
|
194
|
+
* __cli__
|
|
195
|
+
```js
|
|
196
|
+
threefive 1583008701074197245727019716796221243043855984942057168199483
|
|
197
|
+
```
|
|
198
|
+
* __lib__
|
|
199
|
+
```py3
|
|
200
|
+
|
|
201
|
+
from threefive import Cue
|
|
202
|
+
data = 1583008701074197245727019716796221243043855984942057168199483
|
|
203
|
+
cue=Cue(data)
|
|
204
|
+
cue.show()
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
</details>
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
<details><summary>JSON</summary>
|
|
212
|
+
|
|
213
|
+
* __cli__
|
|
214
|
+
* put JSON SCTE-35 in a file and redirect it into threefive
|
|
215
|
+
* cat files to threefive works too.
|
|
216
|
+
* echo JSON or type JSON on the command line.
|
|
217
|
+
|
|
218
|
+
```js
|
|
219
|
+
threefive < json.json
|
|
220
|
+
```
|
|
221
|
+
* __lib__
|
|
222
|
+
|
|
223
|
+
```py3
|
|
224
|
+
|
|
225
|
+
from threefive import Cue
|
|
226
|
+
data = '''{
|
|
227
|
+
"info_section": {
|
|
228
|
+
"table_id": "0xfc",
|
|
229
|
+
"section_syntax_indicator": false,
|
|
230
|
+
"private": false,
|
|
231
|
+
"sap_type": "0x03",
|
|
232
|
+
"sap_details": "No Sap Type",
|
|
233
|
+
"section_length": 22,
|
|
234
|
+
"protocol_version": 0,
|
|
235
|
+
"encrypted_packet": false,
|
|
236
|
+
"encryption_algorithm": 0,
|
|
237
|
+
"pts_adjustment": 0.0,
|
|
238
|
+
"cw_index": "0x00",
|
|
239
|
+
"tier": "0x0fff",
|
|
240
|
+
"splice_command_length": 5,
|
|
241
|
+
"splice_command_type": 6,
|
|
242
|
+
"descriptor_loop_length": 0,
|
|
243
|
+
"crc": "0xb56b88"
|
|
244
|
+
},
|
|
245
|
+
"command": {
|
|
246
|
+
"command_length": 5,
|
|
247
|
+
"command_type": 6,
|
|
248
|
+
"name": "Time Signal",
|
|
249
|
+
"time_specified_flag": true,
|
|
250
|
+
"pts_time": 140.005333
|
|
251
|
+
},
|
|
252
|
+
"descriptors": []
|
|
253
|
+
}
|
|
254
|
+
'''
|
|
255
|
+
cue=Cue(data)
|
|
256
|
+
cue.show()
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
</details>
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
<details><summary><u>Xml</u></summary>
|
|
263
|
+
|
|
264
|
+
* __cli__
|
|
265
|
+
* put xml SCTE-35 in a [file](xml.xml) and redirect it into threefive
|
|
266
|
+
* cat files to threefive works too.
|
|
267
|
+
* echo xml or type xml on the command line.
|
|
268
|
+
|
|
269
|
+
```js
|
|
270
|
+
threefive < xml.xml
|
|
271
|
+
```
|
|
272
|
+
* __lib__
|
|
273
|
+
```py3
|
|
274
|
+
from threefive import Cue
|
|
275
|
+
data = '''
|
|
276
|
+
<scte35:SpliceInfoSection xmlns:scte35="https://scte.org/schemas/35"
|
|
277
|
+
ptsAdjustment="0" protocolVersion="0" sapType="3" tier="4095">
|
|
278
|
+
<scte35:TimeSignal>
|
|
279
|
+
<scte35:SpliceTime ptsTime="12600480"/>
|
|
280
|
+
</scte35:TimeSignal>
|
|
281
|
+
</scte35:SpliceInfoSection>
|
|
282
|
+
'''
|
|
283
|
+
cue=Cue(data)
|
|
284
|
+
|
|
285
|
+
cue.show()
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
</details>
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
<details><summary>Xml+binary</summary>
|
|
294
|
+
|
|
295
|
+
* __cli__
|
|
296
|
+
* write xml+binary to a [file](xmlbin.xml) and redirect it to threefive
|
|
297
|
+
* cat files to threefive works too.
|
|
298
|
+
* echo xml+binary or type xml+binary on the command line.
|
|
299
|
+
```js
|
|
300
|
+
threefive < xmlbin.xml
|
|
301
|
+
```
|
|
302
|
+
* __lib__
|
|
303
|
+
```py3
|
|
304
|
+
|
|
305
|
+
from threefive import Cue
|
|
306
|
+
data = '''<scte35:Signal xmlns:scte35="https://scte.org/schemas/35">
|
|
307
|
+
<scte35:Binary>/DAWAAAAAAAAAP/wBQb+AMBEoAAAALVriA==</scte35:Binary>
|
|
308
|
+
</scte35:Signal>
|
|
309
|
+
'''
|
|
310
|
+
cue=Cue(data)
|
|
311
|
+
cue.show()
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
</details>
|
|
315
|
+
|
|
316
|
+
</samp>
|
|
317
|
+
|
|
318
|
+
___
|
|
319
|
+
|
|
320
|
+
# [⇧](#-documentation-)
|
|
179
321
|
|
|
180
|
-
|
|
181
|
-
|
|
322
|
+
### [CLI]
|
|
323
|
+
The threefive cli tool is able to parse SCTE-35 from MPEGTS Streams,Base64,Hex,Integers,JSON XML,and XMLBinary.
|
|
324
|
+
The format is auto-detected.
|
|
325
|
+
|
|
326
|
+
# [⇧](#-documentation-)
|
|
327
|
+
|
|
328
|
+
#### [ Parse SCTE-35 from MPEGTS ]
|
|
329
|
+
SCTE-35 can be parsed from MPEGTS over a variety of protocols.
|
|
182
330
|
* __SCTE-35 Input__: MPEGTS
|
|
183
331
|
* __Protocols__: pipes, files, stdin, http(s), multicast,SRT and UDP.
|
|
184
332
|
* __SCTE-35 Output__: JSON _(default)_ base64, bytes, hex, int, xml, and xmlbin.
|
|
@@ -192,8 +340,12 @@ ___
|
|
|
192
340
|
|__.__|UDP|__int__ | __threefive__ udp://10.10.10.10:1011 __int__ |
|
|
193
341
|
|__.__|Pipe|__xml__| cat video.ts \| __threefive__ __xml__ |
|
|
194
342
|
|__.__|stdin|__xml+bin__| __threefive__ __xmlbin__ < video.ts|
|
|
343
|
+
|
|
195
344
|
___
|
|
196
|
-
|
|
345
|
+
|
|
346
|
+
# [⇧](#-documentation-)
|
|
347
|
+
|
|
348
|
+
#### [ Parse SCTE-35 Cues ]
|
|
197
349
|
|
|
198
350
|
* The __default output__ is JSON
|
|
199
351
|
* __SCTE-35 Inputs:__ base64, hex, int, JSON,int,xml,and xmlbin.
|
|
@@ -221,8 +373,11 @@ ___
|
|
|
221
373
|
|__xml__ |__JSON__ | __threefive__ < xml.xml |
|
|
222
374
|
|__xmlbin__|__int__ | __threefive__ < xmlbin.xml __int__ |
|
|
223
375
|
|
|
224
|
-
|
|
225
|
-
|
|
376
|
+
___
|
|
377
|
+
|
|
378
|
+
# [⇧](#-documentation-)
|
|
379
|
+
|
|
380
|
+
#### [__Additional functionality__]
|
|
226
381
|
* threefive has several additional features, mostly related to MPEGTS streams.
|
|
227
382
|
* threefive has built in help, just type `threefive help`
|
|
228
383
|
* This table shows how to use them.
|
|
@@ -239,11 +394,15 @@ ___
|
|
|
239
394
|
|__Proxy__ the __mpegts__ stream to stdout |threefive __proxy__ https://wexample.com/video.ts |
|
|
240
395
|
| | |
|
|
241
396
|
| | |
|
|
242
|
-
---
|
|
243
397
|
|
|
244
|
-
|
|
398
|
+
___
|
|
399
|
+
|
|
400
|
+
# [⇧](#-documentation-)
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
### Other tools
|
|
245
404
|
threefive also comes with:
|
|
246
|
-
|
|
405
|
+
#### scte35bump
|
|
247
406
|
|
|
248
407
|
* bump adjusts SCTE-35 PTS in an MPEGTS stream
|
|
249
408
|
|
|
@@ -262,10 +421,11 @@ options:
|
|
|
262
421
|
|
|
263
422
|
scte35bump is part of threefive.
|
|
264
423
|
```
|
|
424
|
+
___
|
|
265
425
|
|
|
266
|
-
|
|
426
|
+
# [⇧](#-documentation-)
|
|
267
427
|
|
|
268
|
-
|
|
428
|
+
#### gums
|
|
269
429
|
* the Grande Udp Multicast Server
|
|
270
430
|
|
|
271
431
|
```js
|
|
@@ -284,7 +444,10 @@ options:
|
|
|
284
444
|
|
|
285
445
|
gums is part of threefive.
|
|
286
446
|
```
|
|
287
|
-
|
|
447
|
+
|
|
448
|
+
# [⇧](#-documentation-)
|
|
449
|
+
|
|
450
|
+
#### scte35hls
|
|
288
451
|
|
|
289
452
|
* parse HLS for SCTE-35. Supports all HLS SCTE-35 tags.
|
|
290
453
|
|
|
@@ -315,7 +478,9 @@ $ scte35hls -h
|
|
|
315
478
|
* mpeg2, aac, ac3, mp3
|
|
316
479
|
```
|
|
317
480
|
|
|
318
|
-
|
|
481
|
+
# [⇧](#-documentation-)
|
|
482
|
+
|
|
483
|
+
#### __scte35fix__
|
|
319
484
|
* when ffmpeg changes a SCTE-35 stream to bin data stream, scte35fix changes it back.
|
|
320
485
|
|
|
321
486
|
```js
|
|
@@ -338,66 +503,11 @@ $ scte35fix -h
|
|
|
338
503
|
scte35fix srt://10.10.10.13:4201
|
|
339
504
|
scte35fix is part of threefive.
|
|
340
505
|
```
|
|
341
|
-
|
|
342
|
-
## [XML]
|
|
343
|
-
* [XML](https://github.com/superkabuki/SCTE-35/blob/main/xml.md) __New__! _updated 05/01/2025_
|
|
344
|
-
|
|
345
|
-
## [HLS]
|
|
346
|
-
* [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?
|
|
347
|
-
## [SCTE-35 As a Service]
|
|
348
|
-
* Decode SCTE-35 without installing anything. If you can make an https request, you can use [__Sassy__](sassy.md) to decode SCTE-35. .
|
|
349
|
-
## [Classes]
|
|
350
|
-
* The python built in help is always the most up to date docs for the library.
|
|
351
|
-
|
|
352
|
-
```py3
|
|
353
|
-
|
|
354
|
-
a@fu:~/build7/threefive$ pypy3
|
|
355
|
-
|
|
356
|
-
>>>> from threefive import Stream
|
|
357
|
-
>>>> help(Stream)
|
|
358
|
-
|
|
359
|
-
```
|
|
360
|
-
|
|
361
|
-
* [Class Structure](https://github.com/superkabuki/threefive/blob/main/classes.md)
|
|
362
|
-
* [Cue Class](https://github.com/superkabuki/threefive/blob/main/cue.md) Cue is the main SCTE-35 class to use.
|
|
363
|
-
* [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.
|
|
364
|
-
|
|
365
506
|
___
|
|
366
507
|
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
* _( You have to unmute the audio )_
|
|
370
|
-
|
|
371
|
-
https://github.com/user-attachments/assets/a323ea90-867f-480f-a55f-e9339263e511
|
|
372
|
-
|
|
373
|
-
<BR>
|
|
374
|
-
|
|
375
|
-
* [more SRT and threefive info](srt.md)
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
* _checkout [SRTfu](https://github.com/superkabuki/srtfu)_
|
|
379
|
-
|
|
380
|
-
___
|
|
381
|
-
|
|
382
|
-
## [more]
|
|
383
|
-
|
|
384
|
-
* [Online SCTE-35 Parser](https://iodisco.com/scte35) Supporte Base64, Bytes,Hex,Int, Json, Xml, and Xml+binary.
|
|
385
|
-
|
|
386
|
-
* [Encode SCTE-35](https://github.com/superkabuki/threefive/blob/main/encode.md) Some encoding code examples.
|
|
387
|
-
___
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
## __Python3 vs Pypy3 running threefive__
|
|
391
|
-
|
|
392
|
-
* __( You have to unmute the audio )__
|
|
393
|
-
|
|
394
|
-
https://github.com/user-attachments/assets/9e88fb38-6ad0-487a-a801-90faba9d72c6
|
|
395
|
-
|
|
508
|
+
# [⇧](#-documentation-)
|
|
396
509
|
|
|
397
|
-
|
|
398
|
-
___
|
|
399
|
-
|
|
400
|
-
# Using the library
|
|
510
|
+
### [Using the library]
|
|
401
511
|
* Let me show you how easy threefive is to use.
|
|
402
512
|
|
|
403
513
|
* reading SCTE-35 xml from a file
|
|
@@ -632,153 +742,69 @@ Type "help", "copyright", "credits" or "license" for more information.
|
|
|
632
742
|
<scte35:AvailDescriptor providerAvailId="16"/>
|
|
633
743
|
</scte35:SpliceInfoSection>
|
|
634
744
|
```
|
|
745
|
+
___
|
|
635
746
|
|
|
747
|
+
# [⇧](#-documentation-)
|
|
636
748
|
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
* [
|
|
642
|
-
* [
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
* [Display raw __SCTE-35 packets__ from __video streams__](#packets)
|
|
749
|
+
### [web]
|
|
750
|
+
* [threefive SCTE-35 __Online Parser__](https://iodisco.com/scte35) __hosted on my server iodisco.com__
|
|
751
|
+
* Parse SCTE-35 in MPEGTS over HTTP, in your browser with[ Go, Wasm and Super Karate Death Car](https://bigcorp.ltd/gowasm) __hosted om my server bigcorp.ltd__
|
|
752
|
+
* Parse SCTE-35 in MPEGTS over HTTP, in your browser with[ threefive.js,javascript, and a little sed](https://bigcorp.ltd/bread) just to keep things interesting. __hosted om my server bigcorp.ltd__
|
|
753
|
+
* [ SCTE-35 __Online Parser__ powered by threefive](http://www.domus1938.com/scte35parser) _another online parser powered by threefive_ not hosted on my servers.
|
|
754
|
+
* [SCTE-35 __As a Service__](sassy.md) _if you can make an http request, you can parse SCTE-35, no install needed._
|
|
755
|
+
__hosted on my server iodisco.com__
|
|
756
|
+
___
|
|
646
757
|
|
|
647
|
-
|
|
758
|
+
# [⇧](#-documentation-)
|
|
648
759
|
|
|
649
|
-
|
|
650
|
-
*
|
|
651
|
-
* __SCTE-35 data is printed to stderr__
|
|
652
|
-
* __stdout is used when piping video__
|
|
653
|
-
* mpegts can be specified by file name or URI.
|
|
654
|
-
```rebol
|
|
655
|
-
threefive udp://@235.2.5.35:3535
|
|
656
|
-
```
|
|
657
|
-
* If a file comtains a SCTE-35 cue as a string( base64,hex,int,json,or xml+bin), redirect the file contents.
|
|
658
|
-
```rebol
|
|
760
|
+
### [XML]
|
|
761
|
+
* [XML](https://github.com/superkabuki/SCTE-35/blob/main/xml.md) __New__! _updated 05/01/2025_
|
|
659
762
|
|
|
660
|
-
|
|
763
|
+
### [HLS]
|
|
764
|
+
* [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?
|
|
661
765
|
|
|
662
|
-
|
|
766
|
+
# [⇧](#-documentation-)
|
|
767
|
+
|
|
768
|
+
### [Classes]
|
|
769
|
+
* The python built in help is always the most up to date docs for the library.
|
|
663
770
|
|
|
664
|
-
|
|
771
|
+
```py3
|
|
665
772
|
|
|
666
|
-
|
|
773
|
+
a@fu:~/build7/threefive$ pypy3
|
|
667
774
|
|
|
668
|
-
threefive
|
|
775
|
+
>>>> from threefive import Stream
|
|
776
|
+
>>>> help(Stream)
|
|
669
777
|
|
|
670
778
|
```
|
|
671
779
|
|
|
780
|
+
* [Class Structure](https://github.com/superkabuki/threefive/blob/main/classes.md)
|
|
781
|
+
* [Cue Class](https://github.com/superkabuki/threefive/blob/main/cue.md) Cue is the main SCTE-35 class to use.
|
|
782
|
+
* [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.
|
|
672
783
|
|
|
673
|
-
| Input Type | Cli Example |
|
|
674
|
-
|------------|-------------------------------------------------------------------------------------------------------------|
|
|
675
|
-
| __Base64__ | `threefive '/DAsAAAAAyiYAP/wCgUAAAABf1+ZmQEBABECD0NVRUkAAAAAf4ABADUAAC2XQZU='`
|
|
676
|
-
| __Hex__ |`threefive 0xfc301600000000000000fff00506fed605225b0000b0b65f3b`|
|
|
677
|
-
| __HLS__ |`threefive hls https://example.com/master.m3u8` |
|
|
678
|
-
| __JSON__ |`threefive < json.json` |
|
|
679
|
-
| __Xmlbin__ | `js threefive < xmlbin.xml` |
|
|
680
|
-
|
|
681
|
-
# `Streams`
|
|
682
|
-
|
|
683
|
-
|Protocol | Cli Example |
|
|
684
|
-
|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
685
|
-
| __File__ | `threefive video.ts` |
|
|
686
|
-
| __Http(s)__ | `threefive https://example.com/video.ts` |
|
|
687
|
-
| __Stdin__ | `threefive < video.ts` |
|
|
688
|
-
| __UDP Multicast__| `threefive udp://@235.35.3.5:9999` |
|
|
689
|
-
| __UDP Unicast__ | `threefive udp://10.0.0.7:5555` |
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
#### Outputs
|
|
693
|
-
* output type is determined by the key words __base64, bytes, hex, int, json, and xmlbin__.
|
|
694
|
-
* __json is the default__.
|
|
695
|
-
* __Any input can be returned as any output__
|
|
696
|
-
* examples __Base64 to Hex__ etc...)
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
| Output Type | Cli Example |
|
|
700
|
-
|-------------|----------------------------------------------------------|
|
|
701
|
-
|__Base 64__ | `threefive 0xfc301600000000000000fff00506fed605225b0000b0b65f3b base64 ` |
|
|
702
|
-
| __Bytes__ | `threefive 0xfc301600000000000000fff00506fed605225b0000b0b65f3b bytes` |
|
|
703
|
-
| __Hex__ | `threefive '/DAsAAAAAyiYAP/wCgUAAAABf1+ZmQEBABECD0NVRUkAAAAAf4ABADUAAC2XQZU=' hex` |
|
|
704
|
-
| __Integer__ | `threefive '/DAsAAAAAyiYAP/wCgUAAAABf1+ZmQEBABECD0NVRUkAAAAAf4ABADUAAC2XQZU=' int` |
|
|
705
|
-
| __JSON__ | `threefive 0xfc301600000000000000fff00506fed605225b0000b0b65f3b json ` |
|
|
706
|
-
| __Xml+bin__ | `threefive 0xfc301600000000000000fff00506fed605225b0000b0b65f3b xmlbin ` |`
|
|
707
|
-
___
|
|
708
|
-
#### `Iframes`
|
|
709
|
-
* Show iframes PTS in an MPEGTS video
|
|
710
|
-
|
|
711
|
-
```smalltalk
|
|
712
|
-
threefive iframes https://example.com/video.ts
|
|
713
|
-
```
|
|
714
784
|
___
|
|
715
785
|
|
|
716
|
-
|
|
717
|
-
* Print raw SCTE-35 packets from multicast mpegts video
|
|
786
|
+
# [⇧](#-documentation-)
|
|
718
787
|
|
|
719
|
-
|
|
720
|
-
threefive packets udp://@235.35.3.5:3535
|
|
721
|
-
```
|
|
722
|
-
___
|
|
723
|
-
#### `proxy`
|
|
724
|
-
* Parse a https stream and write raw video to stdout
|
|
788
|
+
### [threefive now supports SRT]
|
|
725
789
|
|
|
726
|
-
|
|
727
|
-
threefive proxy video.ts
|
|
728
|
-
```
|
|
729
|
-
___
|
|
730
|
-
#### `pts`
|
|
731
|
-
* Print PTS from mpegts video
|
|
790
|
+
* _( You have to unmute the audio )_
|
|
732
791
|
|
|
733
|
-
|
|
734
|
-
threefive pts video.ts
|
|
735
|
-
```
|
|
736
|
-
___
|
|
737
|
-
#### `sidecar`
|
|
738
|
-
* Parse a stream, write pts,write SCTE-35 Cues to sidecar.txt
|
|
792
|
+
https://github.com/user-attachments/assets/a323ea90-867f-480f-a55f-e9339263e511
|
|
739
793
|
|
|
740
|
-
|
|
741
|
-
threefive sidecar video.ts
|
|
742
|
-
```
|
|
743
|
-
___
|
|
794
|
+
<BR>
|
|
744
795
|
|
|
745
|
-
|
|
796
|
+
* [more SRT and threefive info](srt.md)
|
|
746
797
|
|
|
747
|
-
* Probe mpegts video _( kind of like ffprobe )_
|
|
748
798
|
|
|
749
|
-
|
|
750
|
-
threefive show video.ts
|
|
751
|
-
```
|
|
752
|
-
___
|
|
753
|
-
#### `version`
|
|
754
|
-
* Show version
|
|
799
|
+
* _checkout [SRTfu](https://github.com/superkabuki/srtfu)_
|
|
755
800
|
|
|
756
|
-
```smalltalk
|
|
757
|
-
threefive version
|
|
758
|
-
```
|
|
759
|
-
___
|
|
760
|
-
#### `help`
|
|
761
|
-
* Help
|
|
762
|
-
```rebol
|
|
763
|
-
threefive help
|
|
764
|
-
```
|
|
765
801
|
___
|
|
766
802
|
|
|
803
|
+
# [⇧](#-documentation-)
|
|
767
804
|
|
|
805
|
+
### [more]
|
|
768
806
|
|
|
769
|
-
|
|
770
|
-
## [iodisco.com/scte35](https://iodisco.com/scte35)
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
<svg width="100" height="100">
|
|
777
|
-
<circle cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill="yellow" />
|
|
778
|
-
</svg>
|
|
779
|
-
|
|
780
|
-
<img width="258" height="256" alt="image" src="https://github.com/user-attachments/assets/642cb803-9465-408e-bb6e-03549eb22d78" />
|
|
781
|
-
|
|
807
|
+
* [Encode SCTE-35](https://github.com/superkabuki/threefive/blob/main/encode.md) Some encoding code examples.
|
|
782
808
|
___
|
|
783
|
-
|
|
784
|
-
|
|
809
|
+
|
|
810
|
+
# [⇧](#-documentation-)
|