threefive3 3.0.33__tar.gz → 3.0.37__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.
Files changed (45) hide show
  1. threefive3-3.0.37/PKG-INFO +553 -0
  2. threefive3-3.0.37/README.md +532 -0
  3. {threefive3-3.0.33 → threefive3-3.0.37}/bin/threefive3 +35 -33
  4. {threefive3-3.0.33 → threefive3-3.0.37}/threefive3/__init__.py +1 -1
  5. {threefive3-3.0.33 → threefive3-3.0.37}/threefive3/aac.py +33 -9
  6. {threefive3-3.0.33 → threefive3-3.0.37}/threefive3/base.py +10 -5
  7. {threefive3-3.0.33 → threefive3-3.0.37}/threefive3/bitn.py +1 -2
  8. {threefive3-3.0.33 → threefive3-3.0.37}/threefive3/commands.py +73 -4
  9. {threefive3-3.0.33 → threefive3-3.0.37}/threefive3/cue.py +90 -66
  10. {threefive3-3.0.33 → threefive3-3.0.37}/threefive3/descriptors.py +111 -33
  11. {threefive3-3.0.33 → threefive3-3.0.37}/threefive3/gums.py +7 -5
  12. {threefive3-3.0.33 → threefive3-3.0.37}/threefive3/hls.py +45 -23
  13. {threefive3-3.0.33 → threefive3-3.0.37}/threefive3/hlstags.py +60 -30
  14. {threefive3-3.0.33 → threefive3-3.0.37}/threefive3/new_reader.py +7 -6
  15. {threefive3-3.0.33 → threefive3-3.0.37}/threefive3/packetdata.py +3 -2
  16. threefive3-3.0.37/threefive3/pmt.py +160 -0
  17. {threefive3-3.0.33 → threefive3-3.0.37}/threefive3/section.py +17 -2
  18. {threefive3-3.0.33 → threefive3-3.0.37}/threefive3/segment.py +2 -1
  19. threefive3-3.0.37/threefive3/sixfix.py +245 -0
  20. {threefive3-3.0.33 → threefive3-3.0.37}/threefive3/stream.py +140 -117
  21. threefive3-3.0.37/threefive3/stuff.py +139 -0
  22. {threefive3-3.0.33 → threefive3-3.0.37}/threefive3/superkabuki.py +21 -17
  23. {threefive3-3.0.33 → threefive3-3.0.37}/threefive3/upids.py +62 -8
  24. threefive3-3.0.37/threefive3/uxp.py +336 -0
  25. {threefive3-3.0.33 → threefive3-3.0.37}/threefive3/version.py +1 -1
  26. {threefive3-3.0.33 → threefive3-3.0.37}/threefive3/words.py +17 -6
  27. threefive3-3.0.37/threefive3/xml.py +356 -0
  28. threefive3-3.0.37/threefive3.egg-info/PKG-INFO +553 -0
  29. {threefive3-3.0.33 → threefive3-3.0.37}/threefive3.egg-info/SOURCES.txt +3 -0
  30. threefive3-3.0.33/PKG-INFO +0 -313
  31. threefive3-3.0.33/README.md +0 -292
  32. threefive3-3.0.33/threefive3/sixfix.py +0 -210
  33. threefive3-3.0.33/threefive3/stuff.py +0 -72
  34. threefive3-3.0.33/threefive3.egg-info/PKG-INFO +0 -313
  35. {threefive3-3.0.33 → threefive3-3.0.37}/LICENSE +0 -0
  36. {threefive3-3.0.33 → threefive3-3.0.37}/setup.cfg +0 -0
  37. {threefive3-3.0.33 → threefive3-3.0.37}/setup.py +0 -0
  38. {threefive3-3.0.33 → threefive3-3.0.37}/threefive3/crc.py +0 -0
  39. {threefive3-3.0.33 → threefive3-3.0.37}/threefive3/encode.py +0 -0
  40. {threefive3-3.0.33 → threefive3-3.0.37}/threefive3/iframes.py +0 -0
  41. {threefive3-3.0.33 → threefive3-3.0.37}/threefive3/segmentation.py +0 -0
  42. {threefive3-3.0.33 → threefive3-3.0.37}/threefive3/streamtypes.py +0 -0
  43. {threefive3-3.0.33 → threefive3-3.0.37}/threefive3.egg-info/dependency_links.txt +0 -0
  44. {threefive3-3.0.33 → threefive3-3.0.37}/threefive3.egg-info/requires.txt +0 -0
  45. {threefive3-3.0.33 → threefive3-3.0.37}/threefive3.egg-info/top_level.txt +0 -0
@@ -0,0 +1,553 @@
1
+ Metadata-Version: 2.1
2
+ Name: threefive3
3
+ Version: 3.0.37
4
+ Summary: SCTE-35 decoder and encoder with MPEGTS and HLS and XML support.
5
+ Home-page: https://github.com/superkabuki/threefive3
6
+ Author: Adrian of Doom
7
+ Author-email: spam@iodisco.com
8
+ Classifier: License :: OSI Approved :: Sleepycat License
9
+ Classifier: Environment :: Console
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Operating System :: POSIX :: BSD :: OpenBSD
12
+ Classifier: Operating System :: POSIX :: BSD :: NetBSD
13
+ Classifier: Operating System :: POSIX :: Linux
14
+ Classifier: Topic :: Multimedia :: Video
15
+ Classifier: Programming Language :: Python :: 3.6
16
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
17
+ Classifier: Programming Language :: Python :: Implementation :: CPython
18
+ Requires-Python: >=3.6
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+
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)
24
+
25
+ # threefive3 is better than you.
26
+ ✅ SCTE-35 __Parser__ ✅ SCTE-35 __Encoder__ ✅ SCTE-35 __HLS__ ✅ SCTE-35 __Xml+binary__ ✅ SCTE-35 __Cli__ ✅ SCTE-35 __library__
27
+
28
+
29
+ * Parses __SCTE-35__ from MPEGTS, HLS, XML+Binary, Base64, Bytes, Hex, Integers, or JSON.
30
+ * Encode __SCTE-35__ to Base64, Bytes, Hex, Int, JSON,XML, or Xml+binary.
31
+ * Built-in network support for HTTP(S), UDP, and Multicast.
32
+ * Automatic AES decryption for HLS.
33
+ * All HLS __SCTE-35__ Tags are Supported.
34
+
35
+ # Latest release is v3.0.37
36
+ _Released Thursday April 18th, 2025
37
+ > Stay up to date, only the latest release is supported.
38
+
39
+ ## MPEGTS streams can be parsed for SCTE-35 with three lines of code.
40
+
41
+ ```py3
42
+ a@fu:~/build5/scte35/scte35$ pypy3
43
+
44
+ >>>> from threefive3 import Stream
45
+ >>>> strm=Stream('https://futzu.com/xaa.ts')
46
+ >>>> strm.decode()
47
+ ```
48
+
49
+ # Checkout the Super Cool SCTE-35 [__Examples__](https://github.com/superkabuki/threefive3/tree/main/examples)
50
+ <br>
51
+
52
+ # threefive3 v3.0.37 is ready
53
+
54
+ * Xml is back and better than ever. __The new Ultra Xml Parser Supreme__ replaces the Super Xml Parser.
55
+
56
+ # [XML](https://github.com/superkabuki/SCTE-35/blob/main/xml.md)
57
+
58
+ # `Documentation`
59
+
60
+ * [Install](#install)
61
+
62
+ ### Cli
63
+
64
+ * [SCTE-35 Cli Super Tool](#the-cli-tool) Encodes, Decodes, and Recodes. This is pretty cool, it does SCTE-35 seven different ways.
65
+ * The cli tool comes with builtin documentation just type `threefive3 help`
66
+
67
+ ### HLS
68
+ * [Advanced Parsing of SCTE-35 in HLS with threefive3](https://github.com/superkabuki/threefive3/blob/main/hls.md) All HLS SCTE-35 tags, Sidecar Files, AAC ID3 Header Timestamps, SCTE-35 filters... Who loves you baby?
69
+
70
+
71
+ ### `Classes`
72
+ * The python built in help is always the most up to date docs for the library.
73
+
74
+ ```py3
75
+
76
+ a@fu:~/build7/threefive3$ pypy3
77
+
78
+ >>>> from threefive import Stream
79
+ >>>> help(Stream)
80
+
81
+ ```
82
+
83
+ * [Class Structure](https://github.com/superkabuki/threefive3/blob/main/classes.md)
84
+ * [Cue Class](https://github.com/superkabuki/threefive3/blob/main/cue.md) Cue is the main SCTE-35 class to use.
85
+ * [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.
86
+ ___
87
+
88
+ ### `| more`
89
+
90
+ * [Online SCTE-35 Parser](https://iodisco.com/scte35) Supporte Base64, Bytes,Hex,Int, Json, Xml, and Xml+binary.
91
+
92
+ * [Encode SCTE-35](https://github.com/superkabuki/threefive3/blob/main/encode.md) Some encoding code examples.
93
+
94
+
95
+ ___
96
+
97
+ ### `Install`
98
+ * python3 via pip
99
+ ```rebol
100
+ python3 -mpip install threefive3
101
+ ```
102
+ * pypy3
103
+ ```rebol
104
+ pypy3 -mpip install threefive3
105
+ ```
106
+ * from the git repo
107
+ ```rebol
108
+ git clone https://github.com/superkabuki/scte35.git
109
+ cd threefive3
110
+ make install
111
+ ```
112
+ ___
113
+
114
+ ### `Using the library`
115
+ * Let me show you how easy threefive3 is to use.
116
+ * well start off reading SCTE-35 xml from a file
117
+ ```py3
118
+ a@fu:~/threefive3$ pypy3
119
+ Python 3.9.16 (7.3.11+dfsg-2+deb12u3, Dec 30 2024, 22:36:23)
120
+ [PyPy 7.3.11 with GCC 12.2.0] on linux
121
+ Type "help", "copyright", "credits" or "license" for more information.
122
+ >>>> from threefive3 import reader
123
+ >>>> from threefive3 import Cue
124
+ >>>> data =reader('/home/a/xml.xml').read()
125
+ * load it into a threefive3.Cue instance
126
+ ```py3
127
+ >>>> cue = Cue(data)
128
+ ```
129
+ * Show the data as JSON
130
+ ```py3
131
+ >>>> cue.show()
132
+ {
133
+ "info_section": {
134
+ "table_id": "0xfc",
135
+ "section_syntax_indicator": false,
136
+ "private": false,
137
+ "sap_type": "0x03",
138
+ "sap_details": "No Sap Type",
139
+ "section_length": 92,
140
+ "protocol_version": 0,
141
+ "encrypted_packet": false,
142
+ "encryption_algorithm": 0,
143
+ "pts_adjustment": 0.0,
144
+ "cw_index": "0x00",
145
+ "tier": "0x0fff",
146
+ "splice_command_length": 15,
147
+ "splice_command_type": 5,
148
+ "descriptor_loop_length": 60,
149
+ "crc": "0x7632935"
150
+ },
151
+ "command": {
152
+ "command_length": 15,
153
+ "command_type": 5,
154
+ "name": "Splice Insert",
155
+ "break_auto_return": false,
156
+ "break_duration": 180.0,
157
+ "splice_event_id": 1073743095,
158
+ "splice_event_cancel_indicator": false,
159
+ "out_of_network_indicator": true,
160
+ "program_splice_flag": false,
161
+ "duration_flag": true,
162
+ "splice_immediate_flag": false,
163
+ "event_id_compliance_flag": true,
164
+ "unique_program_id": 1,
165
+ "avail_num": 12,
166
+ "avails_expected": 5
167
+ },
168
+ "descriptors": [
169
+ {
170
+ "tag": 0,
171
+ "identifier": "CUEI",
172
+ "name": "Avail Descriptor",
173
+ "provider_avail_id": 12,
174
+ "descriptor_length": 8
175
+ },
176
+ {
177
+ "tag": 0,
178
+ "identifier": "CUEI",
179
+ "name": "Avail Descriptor",
180
+ "provider_avail_id": 13,
181
+ "descriptor_length": 8
182
+ },
183
+ {
184
+ "tag": 0,
185
+ "identifier": "CUEI",
186
+ "name": "Avail Descriptor",
187
+ "provider_avail_id": 14,
188
+ "descriptor_length": 8
189
+ },
190
+ {
191
+ "tag": 0,
192
+ "identifier": "CUEI",
193
+ "name": "Avail Descriptor",
194
+ "provider_avail_id": 15,
195
+ "descriptor_length": 8
196
+ },
197
+ {
198
+ "tag": 0,
199
+ "identifier": "CUEI",
200
+ "name": "Avail Descriptor",
201
+ "provider_avail_id": 16,
202
+ "descriptor_length": 8
203
+ },
204
+ {
205
+ "tag": 0,
206
+ "identifier": "CUEI",
207
+ "name": "Avail Descriptor",
208
+ "provider_avail_id": 17,
209
+ "descriptor_length": 8
210
+ }
211
+ ]
212
+ }
213
+ ```
214
+ * convert the data back to xml
215
+ ```py3
216
+ >>>> print(cue.xml())
217
+ <scte35:SpliceInfoSection xmlns:scte35="https://scte.org/schemas/35" ptsAdjustment="0" protocolVersion="0" sapType="3" tier="4095">
218
+ <scte35:SpliceInsert spliceEventId="1073743095" spliceEventCancelIndicator="false" spliceImmediateFlag="false" eventIdComplianceFlag="true" availNum="12" availsExpected="5" outOfNetworkIndicator="true" uniqueProgramId="1">
219
+ <scte35:BreakDuration autoReturn="false" duration="16200000"/>
220
+ </scte35:SpliceInsert>
221
+ <scte35:AvailDescriptor providerAvailId="12"/>
222
+ <scte35:AvailDescriptor providerAvailId="13"/>
223
+ <scte35:AvailDescriptor providerAvailId="14"/>
224
+ <scte35:AvailDescriptor providerAvailId="15"/>
225
+ <scte35:AvailDescriptor providerAvailId="16"/>
226
+ <scte35:AvailDescriptor providerAvailId="17"/>
227
+ </scte35:SpliceInfoSection>
228
+ ```
229
+ * convert to xml+binary
230
+ ```py3
231
+ >>>> print(cue.xmlbin())
232
+ <scte35:Signal xmlns:scte35="https://scte.org/schemas/35">
233
+ <scte35:Binary>/DBcAAAAAAAAAP/wDwVAAAT3f69+APcxQAABDAUAPAAIQ1VFSQAAAAwACENVRUkAAAANAAhDVUVJAAAADgAIQ1VFSQAAAA8ACENVRUkAAAAQAAhDVUVJAAAAEQdjKTU=</scte35:Binary>
234
+ </scte35:Signal>
235
+ ```
236
+ * convert to base64
237
+ ```py3
238
+ >>>> print(cue.base64())
239
+ /DBcAAAAAAAAAP/wDwVAAAT3f69+APcxQAABDAUAPAAIQ1VFSQAAAAwACENVRUkAAAANAAhDVUVJAAAADgAIQ1VFSQAAAA8ACENVRUkAAAAQAAhDVUVJAAAAEQdjKTU=
240
+ ```
241
+ * convert to hex
242
+ ```py3
243
+ >>>> print(cue.hex())
244
+ 0xfc305c00000000000000fff00f05400004f77faf7e00f7314000010c05003c0008435545490000000c0008435545490000000d0008435545490000000e0008435545490000000f000843554549000000100008435545490000001107632935
245
+ ```
246
+ * show just the splice command
247
+ ```py3
248
+ >>>> cue.command.show()
249
+ {
250
+ "command_length": 15,
251
+ "command_type": 5,
252
+ "name": "Splice Insert",
253
+ "break_auto_return": false,
254
+ "break_duration": 180.0,
255
+ "splice_event_id": 1073743095,
256
+ "splice_event_cancel_indicator": false,
257
+ "out_of_network_indicator": true,
258
+ "program_splice_flag": false,
259
+ "duration_flag": true,
260
+ "splice_immediate_flag": false,
261
+ "event_id_compliance_flag": true,
262
+ "unique_program_id": 1,
263
+ "avail_num": 12,
264
+ "avails_expected": 5
265
+ }
266
+ ```
267
+ * edit the break duration
268
+ ```py3
269
+ >>>> cue.command.break_duration=30
270
+ >>>> cue.command.show()
271
+ {
272
+ "command_length": 15,
273
+ "command_type": 5,
274
+ "name": "Splice Insert",
275
+ "break_auto_return": false,
276
+ "break_duration": 30,
277
+ "splice_event_id": 1073743095,
278
+ "splice_event_cancel_indicator": false,
279
+ "out_of_network_indicator": true,
280
+ "program_splice_flag": false,
281
+ "duration_flag": true,
282
+ "splice_immediate_flag": false,
283
+ "event_id_compliance_flag": true,
284
+ "unique_program_id": 1,
285
+ "avail_num": 12,
286
+ "avails_expected": 5
287
+ }
288
+ ```
289
+ * re-encode to base64 with the new duration
290
+ ```py3
291
+ >>>> cue.base64()
292
+ '/DBcAAAAAAAAAP/wDwVAAAT3f69+ACky4AABDAUAPAAIQ1VFSQAAAAwACENVRUkAAAANAAhDVUVJAAAADgAIQ1VFSQAAAA8ACENVRUkAAAAQAAhDVUVJAAAAEe1FB6g='
293
+ ```
294
+ * re-encode to xml with the new duration
295
+ ```py3
296
+ >>>> print(cue.xml())
297
+ <scte35:SpliceInfoSection xmlns:scte35="https://scte.org/schemas/35" ptsAdjustment="0" protocolVersion="0" sapType="3" tier="4095">
298
+ <scte35:SpliceInsert spliceEventId="1073743095" spliceEventCancelIndicator="false" spliceImmediateFlag="false" eventIdComplianceFlag="true" availNum="12" availsExpected="5" outOfNetworkIndicator="true" uniqueProgramId="1">
299
+ <scte35:BreakDuration autoReturn="false" duration="2700000"/>
300
+ </scte35:SpliceInsert>
301
+ <scte35:AvailDescriptor providerAvailId="12"/>
302
+ <scte35:AvailDescriptor providerAvailId="13"/>
303
+ <scte35:AvailDescriptor providerAvailId="14"/>
304
+ <scte35:AvailDescriptor providerAvailId="15"/>
305
+ <scte35:AvailDescriptor providerAvailId="16"/>
306
+ <scte35:AvailDescriptor providerAvailId="17"/>
307
+ </scte35:SpliceInfoSection>
308
+ ```
309
+ * show just the descriptors
310
+ ```py3
311
+ >>>> _ = [d.show() for d in cue.descriptors]
312
+ {
313
+ "tag": 0,
314
+ "identifier": "CUEI",
315
+ "name": "Avail Descriptor",
316
+ "provider_avail_id": 12,
317
+ "descriptor_length": 8
318
+ }
319
+ {
320
+ "tag": 0,
321
+ "identifier": "CUEI",
322
+ "name": "Avail Descriptor",
323
+ "provider_avail_id": 13,
324
+ "descriptor_length": 8
325
+ }
326
+ {
327
+ "tag": 0,
328
+ "identifier": "CUEI",
329
+ "name": "Avail Descriptor",
330
+ "provider_avail_id": 14,
331
+ "descriptor_length": 8
332
+ }
333
+ {
334
+ "tag": 0,
335
+ "identifier": "CUEI",
336
+ "name": "Avail Descriptor",
337
+ "provider_avail_id": 15,
338
+ "descriptor_length": 8
339
+ }
340
+ {
341
+ "tag": 0,
342
+ "identifier": "CUEI",
343
+ "name": "Avail Descriptor",
344
+ "provider_avail_id": 16,
345
+ "descriptor_length": 8
346
+ }
347
+ {
348
+ "tag": 0,
349
+ "identifier": "CUEI",
350
+ "name": "Avail Descriptor",
351
+ "provider_avail_id": 17,
352
+ "descriptor_length": 8
353
+ }
354
+ ```
355
+ * pop off the last descriptor and re-encode to xml
356
+ ```py3
357
+
358
+ >>>> cue.descriptors.pop()
359
+ {'tag': 0, 'identifier': 'CUEI', 'name': 'Avail Descriptor', 'private_data': None, 'provider_avail_id': 17, 'descriptor_length': 8}
360
+ >>>> print(cue.xml())
361
+ <scte35:SpliceInfoSection xmlns:scte35="https://scte.org/schemas/35" ptsAdjustment="0" protocolVersion="0" sapType="3" tier="4095">
362
+ <scte35:SpliceInsert spliceEventId="1073743095" spliceEventCancelIndicator="false" spliceImmediateFlag="false" eventIdComplianceFlag="true" availNum="12" availsExpected="5" outOfNetworkIndicator="true" uniqueProgramId="1">
363
+ <scte35:BreakDuration autoReturn="false" duration="2700000"/>
364
+ </scte35:SpliceInsert>
365
+ <scte35:AvailDescriptor providerAvailId="12"/>
366
+ <scte35:AvailDescriptor providerAvailId="13"/>
367
+ <scte35:AvailDescriptor providerAvailId="14"/>
368
+ <scte35:AvailDescriptor providerAvailId="15"/>
369
+ <scte35:AvailDescriptor providerAvailId="16"/>
370
+ </scte35:SpliceInfoSection>
371
+ ```
372
+
373
+
374
+ ### `The Cli tool`
375
+
376
+ #### The cli tool installs automatically with pip or the Makefile.
377
+
378
+ * [__SCTE-35 Inputs__](#inputs)
379
+ * [__SCTE-35 Outputs__](#outputs)
380
+ * [Parse __MPEGTS__ streams for __SCTE-35__](#streams)
381
+ * [Parse __SCTE-35__ in __hls__](#hls)
382
+ * [Display __MPEGTS__ __iframes__](#iframes)
383
+ * [Display raw __SCTE-35 packets__ from __video streams__](#packets)
384
+ * [__Repair SCTE-35 streams__ changed to __bin data__ by __ffmpeg__](#sixfix)
385
+
386
+ #### `Inputs`
387
+
388
+ * Most __inputs__ are __auto-detected.__
389
+ * __stdin__ is __auto selected__ and __auto detected.__
390
+ * __SCTE-35 data is printed to stderr__
391
+ * __stdout is used when piping video__
392
+ * mpegts can be specified by file name or URI.
393
+ ```rebol
394
+ threefive3 udp://@235.2.5.35:3535
395
+ ```
396
+ * If a file comtains a SCTE-35 cue as a string( base64,hex,int,json,or xml+bin), redirect the file contents.
397
+ ```rebol
398
+
399
+ threefive3 < json.json
400
+
401
+ ```
402
+
403
+ * quoted strings(( base64,hex,int,json or xml+bin), can be passed directly on the command line as well.
404
+
405
+ ```awk
406
+
407
+ threefive3 '/DAWAAAAAAAAAP/wBQb+ztd7owAAdIbbmw=='
408
+
409
+ ```
410
+
411
+
412
+ | Input Type | Cli Example |
413
+ |------------|-------------------------------------------------------------------------------------------------------------|
414
+ | __Base64__ | `threefive3 '/DAsAAAAAyiYAP/wCgUAAAABf1+ZmQEBABECD0NVRUkAAAAAf4ABADUAAC2XQZU='`
415
+ | __Hex__ |`threefive3 0xfc301600000000000000fff00506fed605225b0000b0b65f3b`|
416
+ | __HLS__ |`threefive3 hls https://example.com/master.m3u8` |
417
+ | __JSON__ |`threefive3 < json.json` |
418
+ | __Xmlbin__ | `js threefive3 < xmlbin.xml` |
419
+
420
+ # `Streams`
421
+
422
+ |Protocol | Cli Example |
423
+ |---------------|----------------------------------------------------------------------------------------------------------------------------------------------------|
424
+ | File | `threefive3 video.ts` |
425
+ | Http(s) | `threefive3 https://example.com/video.ts` |
426
+ | Stdin | `threefive3 < video.ts` |
427
+ | UDP Multicast| `threefive3 udp://@235.35.3.5:9999` |
428
+ | UDP Unicast | `threefive3 udp://10.0.0.7:5555` |
429
+ | HLS | `threefive3 hls https://example.com/master.m3u8`|
430
+ | | |
431
+
432
+
433
+ #### Outputs
434
+ * output type is determined by the key words __base64, bytes, hex, int, json, and xmlbin__.
435
+ * __json is the default__.
436
+ * __Any input (except HLS,) can be returned as any output__
437
+ * examples __Base64 to Hex__ etc...)
438
+
439
+
440
+ | Output Type | Cli Example |
441
+ |-------------|----------------------------------------------------------|
442
+ |__Base 64__ | `threefive3 0xfc301600000000000000fff00506fed605225b0000b0b65f3b base64 ` |
443
+ | __Bytes__ | `threefive3 0xfc301600000000000000fff00506fed605225b0000b0b65f3b bytes` |
444
+ | __Hex__ | `threefive3 '/DAsAAAAAyiYAP/wCgUAAAABf1+ZmQEBABECD0NVRUkAAAAAf4ABADUAAC2XQZU=' hex` |
445
+ | __Integer__ | `threefive3 '/DAsAAAAAyiYAP/wCgUAAAABf1+ZmQEBABECD0NVRUkAAAAAf4ABADUAAC2XQZU=' int` |
446
+ | __JSON__ | `threefive3 0xfc301600000000000000fff00506fed605225b0000b0b65f3b json ` |
447
+ | __Xml+bin__ | `threefive3 0xfc301600000000000000fff00506fed605225b0000b0b65f3b xmlbin ` |`
448
+
449
+ #### `hls`
450
+ * parse hls manifests and segments for SCTE-35
451
+ ```smalltalk
452
+ threefive3 hls https://example.com/master.m3u8
453
+ ```
454
+ ___
455
+ #### `Iframes`
456
+ * Show iframes PTS in an MPEGTS video
457
+
458
+ ```smalltalk
459
+ threefive3 iframes https://example.com/video.ts
460
+ ```
461
+ ___
462
+ #### `packets`
463
+ * Print raw SCTE-35 packets from multicast mpegts video
464
+
465
+ ```smalltalk
466
+ threefive3 packets udp://@235.35.3.5:3535
467
+ ```
468
+ ___
469
+ #### `proxy`
470
+ * Parse a https stream and write raw video to stdout
471
+
472
+ ```smalltalk
473
+ threefive3 proxy video.ts
474
+ ```
475
+ ___
476
+ #### `pts`
477
+ * Print PTS from mpegts video
478
+
479
+ ```smalltalk
480
+ threefive3 pts video.ts
481
+ ```
482
+ ___
483
+ #### `sidecar`
484
+ * Parse a stream, write pts,write SCTE-35 Cues to sidecar.txt
485
+
486
+ ```smalltalk
487
+ threefive3 sidecar video.ts
488
+ ```
489
+ ___
490
+ #### `sixfix`
491
+ * Fix SCTE-35 data mangled by ffmpeg
492
+
493
+ ```smalltalk
494
+ threefive3 sixfix video.ts
495
+ ```
496
+ ___
497
+ #### `show`
498
+
499
+ * Probe mpegts video _( kind of like ffprobe )_
500
+
501
+ ```smalltalk
502
+ threefive3 show video.ts
503
+ ```
504
+ ___
505
+ #### `version`
506
+ * Show version
507
+
508
+ ```smalltalk
509
+ threefive3 version
510
+ ```
511
+ ___
512
+ #### `help`
513
+ * Help
514
+ ```rebol
515
+ threefive3 help
516
+ ```
517
+ ___
518
+
519
+
520
+ ### Stream Multicast with the threefive cli, it's easy.
521
+
522
+ * The threefive3 cli has long been a Multicast Receiver( client )
523
+ * The cli now comes with a builtin Multicast Sender( server).
524
+ * It's optimized for MPEGTS (1316 byte Datagrams) but you can send any video or file.
525
+ * The defaults will work in most situations, you don't even have to set the address.
526
+ * threefive3 cli also supports UDP Unicast Streaming.
527
+
528
+ ![image](https://github.com/user-attachments/assets/6042b8e0-5d6b-4de0-b6b0-9556cecc184f)
529
+
530
+ ```js
531
+ a@fu:~$ threefive3 mcast help
532
+ usage: threefive3 mcast [-h] [-i INPUT] [-a ADDR] [-b BIND_ADDR] [-t TTL]
533
+
534
+ optional arguments:
535
+ -h, --help show this help message and exit
536
+ -i INPUT, --input INPUT
537
+ like "/home/a/vid.ts" or "udp://@235.35.3.5:3535" or
538
+ "https://futzu.com/xaa.ts"
539
+ [default:sys.stdin.buffer]
540
+ -a ADDR, --addr ADDR Destination IP:Port [default:235.35.3.5:3535]
541
+ -b BIND_ADDR, --bind_addr BIND_ADDR
542
+ Local IP to bind [default:0.0.0.0]
543
+ -t TTL, --ttl TTL Multicast TTL (1 - 255) [default:32]
544
+ a@fu:~$
545
+ ```
546
+
547
+
548
+ ### [iodisco.com/scte35](https://iodisco.com/scte35)
549
+
550
+
551
+ ___
552
+
553
+ [Install threefive3](#install) | [SCTE-35 HLS](https://github.com/superkabuki/threefive3/blob/main/hls.md) | [Cue Class](https://github.com/superkabuki/threefive3/blob/main/cue.md) | [Stream Class](https://github.com/superkabuki/threefive3/blob/main/stream.md) | [Online SCTE-35 Parser](https://iodisco.com/scte35) | [Encode SCTE-35](https://github.com/superkabuki/threefive3/blob/main/encode.md)