threefive3 3.0.35__tar.gz → 3.0.41__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.
- {threefive3-3.0.35 → threefive3-3.0.41}/PKG-INFO +303 -41
- {threefive3-3.0.35 → threefive3-3.0.41}/README.md +301 -39
- {threefive3-3.0.35 → threefive3-3.0.41}/bin/threefive3 +78 -35
- {threefive3-3.0.35 → threefive3-3.0.41}/setup.py +1 -1
- {threefive3-3.0.35 → threefive3-3.0.41}/threefive3/__init__.py +1 -1
- {threefive3-3.0.35 → threefive3-3.0.41}/threefive3/aac.py +33 -9
- {threefive3-3.0.35 → threefive3-3.0.41}/threefive3/base.py +6 -2
- {threefive3-3.0.35 → threefive3-3.0.41}/threefive3/bitn.py +2 -1
- {threefive3-3.0.35 → threefive3-3.0.41}/threefive3/commands.py +72 -4
- {threefive3-3.0.35 → threefive3-3.0.41}/threefive3/cue.py +78 -58
- {threefive3-3.0.35 → threefive3-3.0.41}/threefive3/descriptors.py +108 -1
- {threefive3-3.0.35 → threefive3-3.0.41}/threefive3/gums.py +5 -7
- {threefive3-3.0.35 → threefive3-3.0.41}/threefive3/hls.py +10 -6
- {threefive3-3.0.35 → threefive3-3.0.41}/threefive3/hlstags.py +48 -30
- {threefive3-3.0.35 → threefive3-3.0.41}/threefive3/new_reader.py +6 -5
- {threefive3-3.0.35 → threefive3-3.0.41}/threefive3/packetdata.py +3 -2
- threefive3-3.0.41/threefive3/pmt.py +177 -0
- {threefive3-3.0.35 → threefive3-3.0.41}/threefive3/section.py +15 -0
- {threefive3-3.0.35 → threefive3-3.0.41}/threefive3/segment.py +2 -1
- threefive3-3.0.41/threefive3/sixfix.py +247 -0
- {threefive3-3.0.35 → threefive3-3.0.41}/threefive3/stream.py +165 -118
- {threefive3-3.0.35 → threefive3-3.0.41}/threefive3/stuff.py +53 -0
- {threefive3-3.0.35 → threefive3-3.0.41}/threefive3/superkabuki.py +58 -153
- {threefive3-3.0.35 → threefive3-3.0.41}/threefive3/upids.py +62 -8
- threefive3-3.0.41/threefive3/uxp.py +337 -0
- {threefive3-3.0.35 → threefive3-3.0.41}/threefive3/version.py +1 -1
- threefive3-3.0.41/threefive3/xml.py +355 -0
- {threefive3-3.0.35 → threefive3-3.0.41}/threefive3.egg-info/PKG-INFO +303 -41
- {threefive3-3.0.35 → threefive3-3.0.41}/threefive3.egg-info/SOURCES.txt +3 -0
- threefive3-3.0.35/threefive3/sixfix.py +0 -210
- {threefive3-3.0.35 → threefive3-3.0.41}/LICENSE +0 -0
- {threefive3-3.0.35 → threefive3-3.0.41}/setup.cfg +0 -0
- {threefive3-3.0.35 → threefive3-3.0.41}/threefive3/crc.py +0 -0
- {threefive3-3.0.35 → threefive3-3.0.41}/threefive3/encode.py +0 -0
- {threefive3-3.0.35 → threefive3-3.0.41}/threefive3/iframes.py +0 -0
- {threefive3-3.0.35 → threefive3-3.0.41}/threefive3/segmentation.py +0 -0
- {threefive3-3.0.35 → threefive3-3.0.41}/threefive3/streamtypes.py +0 -0
- {threefive3-3.0.35 → threefive3-3.0.41}/threefive3/words.py +0 -0
- {threefive3-3.0.35 → threefive3-3.0.41}/threefive3.egg-info/dependency_links.txt +0 -0
- {threefive3-3.0.35 → threefive3-3.0.41}/threefive3.egg-info/requires.txt +0 -0
- {threefive3-3.0.35 → threefive3-3.0.41}/threefive3.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: threefive3
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.41
|
|
4
4
|
Summary: SCTE-35 decoder and encoder with MPEGTS and HLS and XML support.
|
|
5
5
|
Home-page: https://github.com/superkabuki/threefive3
|
|
6
6
|
Author: Adrian of Doom
|
|
@@ -12,65 +12,72 @@ Classifier: Operating System :: POSIX :: BSD :: OpenBSD
|
|
|
12
12
|
Classifier: Operating System :: POSIX :: BSD :: NetBSD
|
|
13
13
|
Classifier: Operating System :: POSIX :: Linux
|
|
14
14
|
Classifier: Topic :: Multimedia :: Video
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.6
|
|
16
16
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
17
17
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
18
18
|
Requires-Python: >=3.6
|
|
19
19
|
Description-Content-Type: text/markdown
|
|
20
20
|
License-File: LICENSE
|
|
21
21
|
|
|
22
|
-
[__Install__](#install) |[
|
|
23
|
-
|
|
24
|
-
Myself and several others spent five years developing threefive,
|
|
25
|
-
and then I got F2A'ed out of the github account.
|
|
26
|
-
threefive3 is the next step.
|
|
27
|
-
|
|
28
|
-
Welcome to the show.
|
|
29
|
-
|
|
30
|
-
Adrian
|
|
31
|
-
|
|
32
|
-
</pre>
|
|
33
|
-
|
|
34
|
-
# The threefive3 SCTE-35 Cli Super Tool
|
|
35
|
-
# and python3 library.
|
|
22
|
+
[__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)
|
|
23
|
+
| [__SCTE-35 XML__](https://github.com/superkabuki/SCTE-35/blob/main/xml.md)
|
|
36
24
|
|
|
25
|
+
# threefive3 is better than you.
|
|
37
26
|
✅ SCTE-35 __Parser__ ✅ SCTE-35 __Encoder__ ✅ SCTE-35 __HLS__ ✅ SCTE-35 __Xml+binary__ ✅ SCTE-35 __Cli__ ✅ SCTE-35 __library__
|
|
38
27
|
|
|
39
28
|
|
|
40
29
|
* Parses __SCTE-35__ from MPEGTS, HLS, XML+Binary, Base64, Bytes, Hex, Integers, or JSON.
|
|
41
|
-
* Encode __SCTE-35__ to Base64, Bytes, Hex, Int, JSON, or Xml+binary.
|
|
30
|
+
* Encode __SCTE-35__ to Base64, Bytes, Hex, Int, JSON,XML, or Xml+binary.
|
|
42
31
|
* Built-in network support for HTTP(S), UDP, and Multicast.
|
|
43
32
|
* Automatic AES decryption for HLS.
|
|
44
33
|
* All HLS __SCTE-35__ Tags are Supported.
|
|
45
34
|
|
|
46
|
-
#
|
|
47
|
-
|
|
35
|
+
# Heads up.
|
|
36
|
+
<pre>
|
|
37
|
+
The Super Kabuki MPEGTS SCTE-35 Packet Injection Engine is working really really well.
|
|
38
|
+
I've tested the SuperKabuki output with ffmpeg and tsduck and everything works.
|
|
39
|
+
I was going to wait until I finished The Sideways HLS tag Injector,
|
|
40
|
+
but I'm thinking I'm going to go ahead and do a new build with
|
|
41
|
+
Super Kabuki, probably tomorrow.
|
|
42
|
+
|
|
43
|
+
It's workinng perfectly for me,
|
|
44
|
+
so I want to get it out there and see if y'all break it. :)
|
|
45
|
+
</pre>
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
# Latest release is v3.0.39
|
|
49
|
+
_Released Thursday April 18th, 2025
|
|
50
|
+
* just 4300 lines of code.
|
|
51
|
+
* cyclomatic complexity __2.05__
|
|
48
52
|
> Stay up to date, only the latest release is supported.
|
|
49
53
|
|
|
50
|
-
|
|
54
|
+
|
|
51
55
|
|
|
52
56
|
## MPEGTS streams can be parsed for SCTE-35 with three lines of code.
|
|
53
57
|
|
|
54
58
|
```py3
|
|
55
59
|
a@fu:~/build5/scte35/scte35$ pypy3
|
|
56
|
-
Python 3.9.16 (7.3.11+dfsg-2+deb12u3, Dec 30 2024, 22:36:23)
|
|
57
|
-
[PyPy 7.3.11 with GCC 12.2.0] on linux
|
|
58
|
-
Type "help", "copyright", "credits" or "license" for more information.
|
|
59
60
|
|
|
60
61
|
>>>> from threefive3 import Stream
|
|
61
|
-
|
|
62
62
|
>>>> strm=Stream('https://futzu.com/xaa.ts')
|
|
63
|
-
|
|
64
63
|
>>>> strm.decode()
|
|
65
64
|
```
|
|
66
65
|
|
|
66
|
+
# Checkout the Super Cool SCTE-35 [__Examples__](https://github.com/superkabuki/threefive3/tree/main/examples)
|
|
67
|
+
<br>
|
|
68
|
+
|
|
69
|
+
# threefive3 v3.0.39 is ready
|
|
70
|
+
|
|
71
|
+
* Xml is back and better than ever. __The new Ultra Xml Parser Supreme__ replaces the Super Xml Parser.
|
|
67
72
|
|
|
68
73
|
|
|
69
74
|
# `Documentation`
|
|
70
75
|
|
|
71
|
-
|
|
72
76
|
* [Install](#install)
|
|
73
77
|
|
|
78
|
+
* [XML](https://github.com/superkabuki/SCTE-35/blob/main/xml.md) __New__!
|
|
79
|
+
|
|
80
|
+
|
|
74
81
|
### Cli
|
|
75
82
|
|
|
76
83
|
* [SCTE-35 Cli Super Tool](#the-cli-tool) Encodes, Decodes, and Recodes. This is pretty cool, it does SCTE-35 seven different ways.
|
|
@@ -81,20 +88,18 @@ Type "help", "copyright", "credits" or "license" for more information.
|
|
|
81
88
|
|
|
82
89
|
|
|
83
90
|
### `Classes`
|
|
84
|
-
|
|
85
|
-
* [Class Structure](https://github.com/superkabuki/threefive3/blob/main/classes.md)
|
|
86
|
-
*
|
|
87
91
|
* The python built in help is always the most up to date docs for the library.
|
|
88
92
|
|
|
89
|
-
```
|
|
93
|
+
```py3
|
|
94
|
+
|
|
90
95
|
a@fu:~/build7/threefive3$ pypy3
|
|
91
|
-
|
|
92
|
-
[PyPy 7.3.11 with GCC 12.2.0] on linux
|
|
93
|
-
Type "help", "copyright", "credits" or "license" for more information.
|
|
96
|
+
|
|
94
97
|
>>>> from threefive import Stream
|
|
95
98
|
>>>> help(Stream)
|
|
99
|
+
|
|
96
100
|
```
|
|
97
101
|
|
|
102
|
+
* [Class Structure](https://github.com/superkabuki/threefive3/blob/main/classes.md)
|
|
98
103
|
* [Cue Class](https://github.com/superkabuki/threefive3/blob/main/cue.md) Cue is the main SCTE-35 class to use.
|
|
99
104
|
* [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.
|
|
100
105
|
___
|
|
@@ -125,6 +130,266 @@ make install
|
|
|
125
130
|
```
|
|
126
131
|
___
|
|
127
132
|
|
|
133
|
+
### `Using the library`
|
|
134
|
+
* Let me show you how easy threefive3 is to use.
|
|
135
|
+
* well start off reading SCTE-35 xml from a file
|
|
136
|
+
```py3
|
|
137
|
+
a@fu:~/threefive3$ pypy3
|
|
138
|
+
Python 3.9.16 (7.3.11+dfsg-2+deb12u3, Dec 30 2024, 22:36:23)
|
|
139
|
+
[PyPy 7.3.11 with GCC 12.2.0] on linux
|
|
140
|
+
Type "help", "copyright", "credits" or "license" for more information.
|
|
141
|
+
>>>> from threefive3 import reader
|
|
142
|
+
>>>> from threefive3 import Cue
|
|
143
|
+
>>>> data =reader('/home/a/xml.xml').read()
|
|
144
|
+
* load it into a threefive3.Cue instance
|
|
145
|
+
```py3
|
|
146
|
+
>>>> cue = Cue(data)
|
|
147
|
+
```
|
|
148
|
+
* Show the data as JSON
|
|
149
|
+
```py3
|
|
150
|
+
>>>> cue.show()
|
|
151
|
+
{
|
|
152
|
+
"info_section": {
|
|
153
|
+
"table_id": "0xfc",
|
|
154
|
+
"section_syntax_indicator": false,
|
|
155
|
+
"private": false,
|
|
156
|
+
"sap_type": "0x03",
|
|
157
|
+
"sap_details": "No Sap Type",
|
|
158
|
+
"section_length": 92,
|
|
159
|
+
"protocol_version": 0,
|
|
160
|
+
"encrypted_packet": false,
|
|
161
|
+
"encryption_algorithm": 0,
|
|
162
|
+
"pts_adjustment": 0.0,
|
|
163
|
+
"cw_index": "0x00",
|
|
164
|
+
"tier": "0x0fff",
|
|
165
|
+
"splice_command_length": 15,
|
|
166
|
+
"splice_command_type": 5,
|
|
167
|
+
"descriptor_loop_length": 60,
|
|
168
|
+
"crc": "0x7632935"
|
|
169
|
+
},
|
|
170
|
+
"command": {
|
|
171
|
+
"command_length": 15,
|
|
172
|
+
"command_type": 5,
|
|
173
|
+
"name": "Splice Insert",
|
|
174
|
+
"break_auto_return": false,
|
|
175
|
+
"break_duration": 180.0,
|
|
176
|
+
"splice_event_id": 1073743095,
|
|
177
|
+
"splice_event_cancel_indicator": false,
|
|
178
|
+
"out_of_network_indicator": true,
|
|
179
|
+
"program_splice_flag": false,
|
|
180
|
+
"duration_flag": true,
|
|
181
|
+
"splice_immediate_flag": false,
|
|
182
|
+
"event_id_compliance_flag": true,
|
|
183
|
+
"unique_program_id": 1,
|
|
184
|
+
"avail_num": 12,
|
|
185
|
+
"avails_expected": 5
|
|
186
|
+
},
|
|
187
|
+
"descriptors": [
|
|
188
|
+
{
|
|
189
|
+
"tag": 0,
|
|
190
|
+
"identifier": "CUEI",
|
|
191
|
+
"name": "Avail Descriptor",
|
|
192
|
+
"provider_avail_id": 12,
|
|
193
|
+
"descriptor_length": 8
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"tag": 0,
|
|
197
|
+
"identifier": "CUEI",
|
|
198
|
+
"name": "Avail Descriptor",
|
|
199
|
+
"provider_avail_id": 13,
|
|
200
|
+
"descriptor_length": 8
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"tag": 0,
|
|
204
|
+
"identifier": "CUEI",
|
|
205
|
+
"name": "Avail Descriptor",
|
|
206
|
+
"provider_avail_id": 14,
|
|
207
|
+
"descriptor_length": 8
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"tag": 0,
|
|
211
|
+
"identifier": "CUEI",
|
|
212
|
+
"name": "Avail Descriptor",
|
|
213
|
+
"provider_avail_id": 15,
|
|
214
|
+
"descriptor_length": 8
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"tag": 0,
|
|
218
|
+
"identifier": "CUEI",
|
|
219
|
+
"name": "Avail Descriptor",
|
|
220
|
+
"provider_avail_id": 16,
|
|
221
|
+
"descriptor_length": 8
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"tag": 0,
|
|
225
|
+
"identifier": "CUEI",
|
|
226
|
+
"name": "Avail Descriptor",
|
|
227
|
+
"provider_avail_id": 17,
|
|
228
|
+
"descriptor_length": 8
|
|
229
|
+
}
|
|
230
|
+
]
|
|
231
|
+
}
|
|
232
|
+
```
|
|
233
|
+
* convert the data back to xml
|
|
234
|
+
```py3
|
|
235
|
+
>>>> print(cue.xml())
|
|
236
|
+
<scte35:SpliceInfoSection xmlns:scte35="https://scte.org/schemas/35" ptsAdjustment="0" protocolVersion="0" sapType="3" tier="4095">
|
|
237
|
+
<scte35:SpliceInsert spliceEventId="1073743095" spliceEventCancelIndicator="false" spliceImmediateFlag="false" eventIdComplianceFlag="true" availNum="12" availsExpected="5" outOfNetworkIndicator="true" uniqueProgramId="1">
|
|
238
|
+
<scte35:BreakDuration autoReturn="false" duration="16200000"/>
|
|
239
|
+
</scte35:SpliceInsert>
|
|
240
|
+
<scte35:AvailDescriptor providerAvailId="12"/>
|
|
241
|
+
<scte35:AvailDescriptor providerAvailId="13"/>
|
|
242
|
+
<scte35:AvailDescriptor providerAvailId="14"/>
|
|
243
|
+
<scte35:AvailDescriptor providerAvailId="15"/>
|
|
244
|
+
<scte35:AvailDescriptor providerAvailId="16"/>
|
|
245
|
+
<scte35:AvailDescriptor providerAvailId="17"/>
|
|
246
|
+
</scte35:SpliceInfoSection>
|
|
247
|
+
```
|
|
248
|
+
* convert to xml+binary
|
|
249
|
+
```py3
|
|
250
|
+
>>>> print(cue.xmlbin())
|
|
251
|
+
<scte35:Signal xmlns:scte35="https://scte.org/schemas/35">
|
|
252
|
+
<scte35:Binary>/DBcAAAAAAAAAP/wDwVAAAT3f69+APcxQAABDAUAPAAIQ1VFSQAAAAwACENVRUkAAAANAAhDVUVJAAAADgAIQ1VFSQAAAA8ACENVRUkAAAAQAAhDVUVJAAAAEQdjKTU=</scte35:Binary>
|
|
253
|
+
</scte35:Signal>
|
|
254
|
+
```
|
|
255
|
+
* convert to base64
|
|
256
|
+
```py3
|
|
257
|
+
>>>> print(cue.base64())
|
|
258
|
+
/DBcAAAAAAAAAP/wDwVAAAT3f69+APcxQAABDAUAPAAIQ1VFSQAAAAwACENVRUkAAAANAAhDVUVJAAAADgAIQ1VFSQAAAA8ACENVRUkAAAAQAAhDVUVJAAAAEQdjKTU=
|
|
259
|
+
```
|
|
260
|
+
* convert to hex
|
|
261
|
+
```py3
|
|
262
|
+
>>>> print(cue.hex())
|
|
263
|
+
0xfc305c00000000000000fff00f05400004f77faf7e00f7314000010c05003c0008435545490000000c0008435545490000000d0008435545490000000e0008435545490000000f000843554549000000100008435545490000001107632935
|
|
264
|
+
```
|
|
265
|
+
* show just the splice command
|
|
266
|
+
```py3
|
|
267
|
+
>>>> cue.command.show()
|
|
268
|
+
{
|
|
269
|
+
"command_length": 15,
|
|
270
|
+
"command_type": 5,
|
|
271
|
+
"name": "Splice Insert",
|
|
272
|
+
"break_auto_return": false,
|
|
273
|
+
"break_duration": 180.0,
|
|
274
|
+
"splice_event_id": 1073743095,
|
|
275
|
+
"splice_event_cancel_indicator": false,
|
|
276
|
+
"out_of_network_indicator": true,
|
|
277
|
+
"program_splice_flag": false,
|
|
278
|
+
"duration_flag": true,
|
|
279
|
+
"splice_immediate_flag": false,
|
|
280
|
+
"event_id_compliance_flag": true,
|
|
281
|
+
"unique_program_id": 1,
|
|
282
|
+
"avail_num": 12,
|
|
283
|
+
"avails_expected": 5
|
|
284
|
+
}
|
|
285
|
+
```
|
|
286
|
+
* edit the break duration
|
|
287
|
+
```py3
|
|
288
|
+
>>>> cue.command.break_duration=30
|
|
289
|
+
>>>> cue.command.show()
|
|
290
|
+
{
|
|
291
|
+
"command_length": 15,
|
|
292
|
+
"command_type": 5,
|
|
293
|
+
"name": "Splice Insert",
|
|
294
|
+
"break_auto_return": false,
|
|
295
|
+
"break_duration": 30,
|
|
296
|
+
"splice_event_id": 1073743095,
|
|
297
|
+
"splice_event_cancel_indicator": false,
|
|
298
|
+
"out_of_network_indicator": true,
|
|
299
|
+
"program_splice_flag": false,
|
|
300
|
+
"duration_flag": true,
|
|
301
|
+
"splice_immediate_flag": false,
|
|
302
|
+
"event_id_compliance_flag": true,
|
|
303
|
+
"unique_program_id": 1,
|
|
304
|
+
"avail_num": 12,
|
|
305
|
+
"avails_expected": 5
|
|
306
|
+
}
|
|
307
|
+
```
|
|
308
|
+
* re-encode to base64 with the new duration
|
|
309
|
+
```py3
|
|
310
|
+
>>>> cue.base64()
|
|
311
|
+
'/DBcAAAAAAAAAP/wDwVAAAT3f69+ACky4AABDAUAPAAIQ1VFSQAAAAwACENVRUkAAAANAAhDVUVJAAAADgAIQ1VFSQAAAA8ACENVRUkAAAAQAAhDVUVJAAAAEe1FB6g='
|
|
312
|
+
```
|
|
313
|
+
* re-encode to xml with the new duration
|
|
314
|
+
```py3
|
|
315
|
+
>>>> print(cue.xml())
|
|
316
|
+
<scte35:SpliceInfoSection xmlns:scte35="https://scte.org/schemas/35" ptsAdjustment="0" protocolVersion="0" sapType="3" tier="4095">
|
|
317
|
+
<scte35:SpliceInsert spliceEventId="1073743095" spliceEventCancelIndicator="false" spliceImmediateFlag="false" eventIdComplianceFlag="true" availNum="12" availsExpected="5" outOfNetworkIndicator="true" uniqueProgramId="1">
|
|
318
|
+
<scte35:BreakDuration autoReturn="false" duration="2700000"/>
|
|
319
|
+
</scte35:SpliceInsert>
|
|
320
|
+
<scte35:AvailDescriptor providerAvailId="12"/>
|
|
321
|
+
<scte35:AvailDescriptor providerAvailId="13"/>
|
|
322
|
+
<scte35:AvailDescriptor providerAvailId="14"/>
|
|
323
|
+
<scte35:AvailDescriptor providerAvailId="15"/>
|
|
324
|
+
<scte35:AvailDescriptor providerAvailId="16"/>
|
|
325
|
+
<scte35:AvailDescriptor providerAvailId="17"/>
|
|
326
|
+
</scte35:SpliceInfoSection>
|
|
327
|
+
```
|
|
328
|
+
* show just the descriptors
|
|
329
|
+
```py3
|
|
330
|
+
>>>> _ = [d.show() for d in cue.descriptors]
|
|
331
|
+
{
|
|
332
|
+
"tag": 0,
|
|
333
|
+
"identifier": "CUEI",
|
|
334
|
+
"name": "Avail Descriptor",
|
|
335
|
+
"provider_avail_id": 12,
|
|
336
|
+
"descriptor_length": 8
|
|
337
|
+
}
|
|
338
|
+
{
|
|
339
|
+
"tag": 0,
|
|
340
|
+
"identifier": "CUEI",
|
|
341
|
+
"name": "Avail Descriptor",
|
|
342
|
+
"provider_avail_id": 13,
|
|
343
|
+
"descriptor_length": 8
|
|
344
|
+
}
|
|
345
|
+
{
|
|
346
|
+
"tag": 0,
|
|
347
|
+
"identifier": "CUEI",
|
|
348
|
+
"name": "Avail Descriptor",
|
|
349
|
+
"provider_avail_id": 14,
|
|
350
|
+
"descriptor_length": 8
|
|
351
|
+
}
|
|
352
|
+
{
|
|
353
|
+
"tag": 0,
|
|
354
|
+
"identifier": "CUEI",
|
|
355
|
+
"name": "Avail Descriptor",
|
|
356
|
+
"provider_avail_id": 15,
|
|
357
|
+
"descriptor_length": 8
|
|
358
|
+
}
|
|
359
|
+
{
|
|
360
|
+
"tag": 0,
|
|
361
|
+
"identifier": "CUEI",
|
|
362
|
+
"name": "Avail Descriptor",
|
|
363
|
+
"provider_avail_id": 16,
|
|
364
|
+
"descriptor_length": 8
|
|
365
|
+
}
|
|
366
|
+
{
|
|
367
|
+
"tag": 0,
|
|
368
|
+
"identifier": "CUEI",
|
|
369
|
+
"name": "Avail Descriptor",
|
|
370
|
+
"provider_avail_id": 17,
|
|
371
|
+
"descriptor_length": 8
|
|
372
|
+
}
|
|
373
|
+
```
|
|
374
|
+
* pop off the last descriptor and re-encode to xml
|
|
375
|
+
```py3
|
|
376
|
+
|
|
377
|
+
>>>> cue.descriptors.pop()
|
|
378
|
+
{'tag': 0, 'identifier': 'CUEI', 'name': 'Avail Descriptor', 'private_data': None, 'provider_avail_id': 17, 'descriptor_length': 8}
|
|
379
|
+
>>>> print(cue.xml())
|
|
380
|
+
<scte35:SpliceInfoSection xmlns:scte35="https://scte.org/schemas/35" ptsAdjustment="0" protocolVersion="0" sapType="3" tier="4095">
|
|
381
|
+
<scte35:SpliceInsert spliceEventId="1073743095" spliceEventCancelIndicator="false" spliceImmediateFlag="false" eventIdComplianceFlag="true" availNum="12" availsExpected="5" outOfNetworkIndicator="true" uniqueProgramId="1">
|
|
382
|
+
<scte35:BreakDuration autoReturn="false" duration="2700000"/>
|
|
383
|
+
</scte35:SpliceInsert>
|
|
384
|
+
<scte35:AvailDescriptor providerAvailId="12"/>
|
|
385
|
+
<scte35:AvailDescriptor providerAvailId="13"/>
|
|
386
|
+
<scte35:AvailDescriptor providerAvailId="14"/>
|
|
387
|
+
<scte35:AvailDescriptor providerAvailId="15"/>
|
|
388
|
+
<scte35:AvailDescriptor providerAvailId="16"/>
|
|
389
|
+
</scte35:SpliceInfoSection>
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
|
|
128
393
|
### `The Cli tool`
|
|
129
394
|
|
|
130
395
|
#### The cli tool installs automatically with pip or the Makefile.
|
|
@@ -195,10 +460,10 @@ threefive3 '/DAWAAAAAAAAAP/wBQb+ztd7owAAdIbbmw=='
|
|
|
195
460
|
|-------------|----------------------------------------------------------|
|
|
196
461
|
|__Base 64__ | `threefive3 0xfc301600000000000000fff00506fed605225b0000b0b65f3b base64 ` |
|
|
197
462
|
| __Bytes__ | `threefive3 0xfc301600000000000000fff00506fed605225b0000b0b65f3b bytes` |
|
|
198
|
-
|
|
|
199
|
-
|
|
|
200
|
-
|
|
|
201
|
-
|
|
|
463
|
+
| __Hex__ | `threefive3 '/DAsAAAAAyiYAP/wCgUAAAABf1+ZmQEBABECD0NVRUkAAAAAf4ABADUAAC2XQZU=' hex` |
|
|
464
|
+
| __Integer__ | `threefive3 '/DAsAAAAAyiYAP/wCgUAAAABf1+ZmQEBABECD0NVRUkAAAAAf4ABADUAAC2XQZU=' int` |
|
|
465
|
+
| __JSON__ | `threefive3 0xfc301600000000000000fff00506fed605225b0000b0b65f3b json ` |
|
|
466
|
+
| __Xml+bin__ | `threefive3 0xfc301600000000000000fff00506fed605225b0000b0b65f3b xmlbin ` |`
|
|
202
467
|
|
|
203
468
|
#### `hls`
|
|
204
469
|
* parse hls manifests and segments for SCTE-35
|
|
@@ -275,7 +540,7 @@ ___
|
|
|
275
540
|
|
|
276
541
|
* The threefive3 cli has long been a Multicast Receiver( client )
|
|
277
542
|
* The cli now comes with a builtin Multicast Sender( server).
|
|
278
|
-
* It's optimized for MPEGTS (1316 Datagrams) but you can send any video or file.
|
|
543
|
+
* It's optimized for MPEGTS (1316 byte Datagrams) but you can send any video or file.
|
|
279
544
|
* The defaults will work in most situations, you don't even have to set the address.
|
|
280
545
|
* threefive3 cli also supports UDP Unicast Streaming.
|
|
281
546
|
|
|
@@ -299,10 +564,7 @@ a@fu:~$
|
|
|
299
564
|
```
|
|
300
565
|
|
|
301
566
|
|
|
302
|
-
|
|
303
|
-
|
|
304
567
|
### [iodisco.com/scte35](https://iodisco.com/scte35)
|
|
305
|
-

|
|
306
568
|
|
|
307
569
|
|
|
308
570
|
___
|