threefive3 3.0.19__tar.gz → 3.0.21__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 (37) hide show
  1. {threefive3-3.0.19/threefive3.egg-info → threefive3-3.0.21}/PKG-INFO +54 -44
  2. {threefive3-3.0.19 → threefive3-3.0.21}/README.md +53 -43
  3. {threefive3-3.0.19 → threefive3-3.0.21}/bin/threefive3 +10 -7
  4. {threefive3-3.0.19 → threefive3-3.0.21}/threefive3/__init__.py +4 -3
  5. {threefive3-3.0.19 → threefive3-3.0.21}/threefive3/base.py +2 -6
  6. {threefive3-3.0.19 → threefive3-3.0.21}/threefive3/bitn.py +7 -8
  7. {threefive3-3.0.19 → threefive3-3.0.21}/threefive3/commands.py +3 -5
  8. {threefive3-3.0.19 → threefive3-3.0.21}/threefive3/cue.py +46 -49
  9. {threefive3-3.0.19 → threefive3-3.0.21}/threefive3/descriptors.py +4 -5
  10. threefive3-3.0.21/threefive3/encode.py +114 -0
  11. {threefive3-3.0.19 → threefive3-3.0.21}/threefive3/hls.py +36 -43
  12. {threefive3-3.0.19 → threefive3-3.0.21}/threefive3/section.py +12 -13
  13. {threefive3-3.0.19 → threefive3-3.0.21}/threefive3/sixfix.py +3 -3
  14. {threefive3-3.0.19 → threefive3-3.0.21}/threefive3/stream.py +23 -20
  15. {threefive3-3.0.19 → threefive3-3.0.21}/threefive3/stuff.py +19 -7
  16. threefive3-3.0.21/threefive3/superkabuki.py +315 -0
  17. {threefive3-3.0.19 → threefive3-3.0.21}/threefive3/version.py +1 -1
  18. {threefive3-3.0.19 → threefive3-3.0.21/threefive3.egg-info}/PKG-INFO +54 -44
  19. {threefive3-3.0.19 → threefive3-3.0.21}/threefive3.egg-info/SOURCES.txt +2 -0
  20. {threefive3-3.0.19 → threefive3-3.0.21}/LICENSE +0 -0
  21. {threefive3-3.0.19 → threefive3-3.0.21}/setup.cfg +0 -0
  22. {threefive3-3.0.19 → threefive3-3.0.21}/setup.py +0 -0
  23. {threefive3-3.0.19 → threefive3-3.0.21}/threefive3/crc.py +0 -0
  24. {threefive3-3.0.19 → threefive3-3.0.21}/threefive3/hlstags.py +0 -0
  25. {threefive3-3.0.19 → threefive3-3.0.21}/threefive3/iframes.py +0 -0
  26. {threefive3-3.0.19 → threefive3-3.0.21}/threefive3/new_reader.py +0 -0
  27. {threefive3-3.0.19 → threefive3-3.0.21}/threefive3/packetdata.py +0 -0
  28. {threefive3-3.0.19 → threefive3-3.0.21}/threefive3/segment.py +0 -0
  29. {threefive3-3.0.19 → threefive3-3.0.21}/threefive3/segmentation.py +0 -0
  30. {threefive3-3.0.19 → threefive3-3.0.21}/threefive3/streamtypes.py +0 -0
  31. {threefive3-3.0.19 → threefive3-3.0.21}/threefive3/sxp.py +0 -0
  32. {threefive3-3.0.19 → threefive3-3.0.21}/threefive3/upids.py +0 -0
  33. {threefive3-3.0.19 → threefive3-3.0.21}/threefive3/x2c.py +0 -0
  34. {threefive3-3.0.19 → threefive3-3.0.21}/threefive3/xml.py +0 -0
  35. {threefive3-3.0.19 → threefive3-3.0.21}/threefive3.egg-info/dependency_links.txt +0 -0
  36. {threefive3-3.0.19 → threefive3-3.0.21}/threefive3.egg-info/requires.txt +0 -0
  37. {threefive3-3.0.19 → threefive3-3.0.21}/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.19
3
+ Version: 3.0.21
4
4
  Summary: threefive continued.
5
5
  Home-page: https://github.com/superkabuki/scte35
6
6
  Author: Adrian of Doom
@@ -19,8 +19,10 @@ Requires-Python: >=3.6
19
19
  Description-Content-Type: text/markdown
20
20
  License-File: LICENSE
21
21
 
22
+ [Install threefive3](#install) |[SCTE-35 Cli](#the-cli-tool) |[SCTE-35 Xml ](https://github.com/superkabuki/threefive3/blob/main/xml.md) | [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) | [FFmpeg SCTE35](https://github.com/superkabuki/FFmpeg_SCTE35)
22
23
 
23
24
  # threefive3 SCTE-35 cli super tool and python3 library.
25
+ > Brought to you by the fine folks at fu-corp _( Adrian and the two blonde Chinese girls. )_
24
26
 
25
27
  ✅ SCTE-35 Parser ✅ SCTE-35 Encoder ✅ SCTE-35 HLS ✅ SCTE-35 Xml ✅ SCTE-35 Cli ✅ SCTE-35 library
26
28
 
@@ -30,8 +32,8 @@ License-File: LICENSE
30
32
  * Built-in network support for HTTP(S), UDP, and Multicast.
31
33
  * Automatic AES decryption for HLS.
32
34
  * All HLS SCTE-35 Tags are Supported.
33
- ___
34
- # Latest release is v3.0.19
35
+
36
+ ### Latest release is v3.0.21
35
37
  > Stay up to date, only the latest release is supported.
36
38
  ___
37
39
  ### MPEGTS streams can be parsed for SCTE-35 with three lines of code.
@@ -48,30 +50,30 @@ Type "help", "copyright", "credits" or "license" for more information.
48
50
 
49
51
  >>>> strm.decode()
50
52
  ```
51
- # Heads Up!
52
53
 
53
- > threefive3 is a lot to do by myself, in my spare time. I'm going to impose on y'all a little.
54
+ # `Documentation`
55
+
54
56
 
55
- > I am currently working on error reporting. I am trying to aggregate the errors into each object, so if you have multiple errors, you can get them all at once, rather than one at a time. I need to try some stuff so I can see how it works and how it fails.
56
- > If I have to do this alone, it will take much longer than if y'all help me.
57
- > I will probably push a couple releases this week, I need you to use then.
58
- > Be a good citizen and get involved. That's what makes open source work.
57
+ * [Install](#install)
59
58
 
60
-
61
- # Documentation
59
+ #### Cli
62
60
 
63
- * [Install](#install)
64
- * [SCTE-35 Cli](#the-cli-tool)
65
- * [SCTE-35 Xml ](https://github.com/superkabuki/threefive3/blob/main/xml.md)
66
- * [Cue Class](https://github.com/superkabuki/threefive3/blob/main/cue.md)
67
- * [Stream Class](https://github.com/superkabuki/threefive3/blob/main/stream.md)
68
- * [Online SCTE-35 Parser](https://iodisco.com/scte35)
69
- * [Encode SCTE-35](https://github.com/superkabuki/threefive3/blob/main/encode.md)
70
- * [FFmpeg SCTE35](https://github.com/superkabuki/FFmpeg_SCTE35)
61
+ * [SCTE-35 Cli Super Tool](#the-cli-tool) Encodes, Decodes, and Recodes. This is pretty cool, it does SCTE-35 seven different ways.
62
+ * The cli tool comes with builtin documentation just type `threefive3 help`
71
63
 
72
- * _The cli tool comes with builtin documentation just type_ `threefive3 help`
64
+ ### HLS
65
+ * [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 and more.
73
66
 
74
- * _The python built in help is always the most up to date._
67
+
68
+ #### Xml
69
+
70
+ * [SCTE-35 Xml ](https://github.com/superkabuki/threefive3/blob/main/xml.md) The people wanted it so I finally did Xml.
71
+ * I feel cheap and dirty.
72
+ ___
73
+
74
+ #### `Classes`
75
+
76
+ * The python built in help is always the most up to date docs for the library.
75
77
 
76
78
  ```rebol
77
79
  a@fu:~/build7/threefive3$ pypy3
@@ -82,10 +84,23 @@ Type "help", "copyright", "credits" or "license" for more information.
82
84
  >>>> help(Stream)
83
85
  ```
84
86
 
87
+ * [Cue Class](https://github.com/superkabuki/threefive3/blob/main/cue.md) Cue is the main SCTE-35 class to use.
88
+ * [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.
85
89
  ___
86
90
 
91
+ #### `| more`
92
+
93
+ * [Online SCTE-35 Parser](https://iodisco.com/scte35) Supporte Base64, Bytes,Hex,Int, Json, Xml, and Xml+binary.
94
+ * __Damn__.
87
95
 
88
- # `Install`
96
+ * [Encode SCTE-35](https://github.com/superkabuki/threefive3/blob/main/encode.md) Some encoding code examples.
97
+
98
+ * [FFmpeg SCTE35](https://github.com/superkabuki/FFmpeg_SCTE35) FFmpeg with the SuperKabui SCTE-35 Patch applied.
99
+ * __Hell Yes.__
100
+
101
+ ___
102
+
103
+ ### `Install`
89
104
  * python3 via pip
90
105
  ```rebol
91
106
  python3 -mpip install threefive3
@@ -103,10 +118,10 @@ make install
103
118
  ___
104
119
 
105
120
 
106
- # `The Cli tool`
121
+ ### `The Cli tool`
107
122
 
108
123
 
109
- ### The cli tool installs automatically with pip or the Makefile.
124
+ #### The cli tool installs automatically with pip or the Makefile.
110
125
 
111
126
  * [__SCTE-35 Inputs__](#inputs)
112
127
  * [__SCTE-35 Outputs__](#outputs)
@@ -116,7 +131,7 @@ ___
116
131
  * [Display raw __SCTE-35 packets__ from __video streams__](#packets)
117
132
  * [__Repair SCTE-35 streams__ changed to __bin data__ by __ffmpeg__](#sixfix)
118
133
 
119
- # `Inputs`
134
+ #### `Inputs`
120
135
 
121
136
  * Most __inputs__ are __auto-detected.__
122
137
  * __stdin__ is __auto selected__ and __auto detected.__
@@ -126,7 +141,7 @@ ___
126
141
  ```rebol
127
142
  threefive3 udp://@235.2.5.35:3535
128
143
  ```
129
- * If a file comtains a SCTE-35 Cue as a string( base64,hex,int,json,xml or xml+bin), redirect the file contents.
144
+ * If a file comtains a SCTE-35 cue as a string( base64,hex,int,json,xml or xml+bin), redirect the file contents.
130
145
  ```rebol
131
146
 
132
147
  threefive3 < json.json
@@ -167,7 +182,7 @@ threefive3 '/DAWAAAAAAAAAP/wBQb+ztd7owAAdIbbmw=='
167
182
  | | |
168
183
 
169
184
 
170
- ### Outputs
185
+ #### Outputs
171
186
  * output type is determined by the key words __base64, bytes, hex, int, json, xml, and xmlbin__.
172
187
  * __json is the default__.
173
188
  * __Any input (except HLS,) can be returned as any output__
@@ -184,55 +199,55 @@ threefive3 '/DAWAAAAAAAAAP/wBQb+ztd7owAAdIbbmw=='
184
199
  | Xml | `threefive3 '/DAsAAAAAyiYAP/wCgUAAAABf1+ZmQEBABECD0NVRUkAAAAAf4ABADUAAC2XQZU=' xml ` ` |
185
200
  | Xml+bin | `threefive3 0xfc301600000000000000fff00506fed605225b0000b0b65f3b xmlbin ` |`
186
201
 
187
- ### `hls`
202
+ #### `hls`
188
203
  * parse hls manifests and segments for SCTE-35
189
204
  ```smalltalk
190
205
  threefive3 hls https://example.com/master.m3u8
191
206
  ```
192
207
  ___
193
- ### `Iframes`
208
+ #### `Iframes`
194
209
  * Show iframes PTS in an MPEGTS video
195
210
 
196
211
  ```smalltalk
197
212
  threefive3 iframes https://example.com/video.ts
198
213
  ```
199
214
  ___
200
- ### `packets`
215
+ #### `packets`
201
216
  * Print raw SCTE-35 packets from multicast mpegts video
202
217
 
203
218
  ```smalltalk
204
219
  threefive3 packets udp://@235.35.3.5:3535
205
220
  ```
206
221
  ___
207
- ### `proxy`
222
+ #### `proxy`
208
223
  * Parse a https stream and write raw video to stdout
209
224
 
210
225
  ```smalltalk
211
226
  threefive3 proxy video.ts
212
227
  ```
213
228
  ___
214
- ### `pts`
229
+ #### `pts`
215
230
  * Print PTS from mpegts video
216
231
 
217
232
  ```smalltalk
218
233
  threefive3 pts video.ts
219
234
  ```
220
235
  ___
221
- ### `sidecar`
236
+ #### `sidecar`
222
237
  * Parse a stream, write pts,write SCTE-35 Cues to sidecar.txt
223
238
 
224
239
  ```smalltalk
225
240
  threefive3 sidecar video.ts
226
241
  ```
227
242
  ___
228
- ### `sixfix`
243
+ #### `sixfix`
229
244
  * Fix SCTE-35 data mangled by ffmpeg
230
245
 
231
246
  ```smalltalk
232
247
  threefive3 sixfix video.ts
233
248
  ```
234
249
  ___
235
- ### `show`
250
+ #### `show`
236
251
 
237
252
  * Probe mpegts video _( kind of like ffprobe )_
238
253
 
@@ -240,32 +255,27 @@ ___
240
255
  threefive3 show video.ts
241
256
  ```
242
257
  ___
243
- ### `version`
258
+ #### `version`
244
259
  * Show version
245
260
 
246
261
  ```smalltalk
247
262
  threefive3 version
248
263
  ```
249
264
  ___
250
- ### `help`
265
+ #### `help`
251
266
  * Help
252
267
  ```rebol
253
268
  threefive3 help
254
269
  ```
255
270
  ___
256
271
 
257
- ![image](https://github.com/user-attachments/assets/91fd37c2-746c-498d-8c6c-80c6e7760c0e)
258
272
 
259
- ___
260
273
 
261
- ## [iodisco.com/scte35](https://iodisco.com/scte35)
274
+ ### [iodisco.com/scte35](https://iodisco.com/scte35)
262
275
  ![image](https://github.com/user-attachments/assets/4df85c44-a078-4da0-97e2-5daefcf2509d)
263
276
 
264
277
 
265
278
 
266
279
  ___
267
280
 
268
- [Install](#install) |[SCTE-35 Cli](#the-cli-tool) |[SCTE-35 Xml ](https://github.com/superkabuki/threefive3/blob/main/xml.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) [FFmpeg SCTE35](https://github.com/superkabuki/FFmpeg_SCTE35)
269
-
270
-
271
-
281
+ [Install threefive3](#install) |[SCTE-35 Cli](#the-cli-tool) |[SCTE-35 Xml ](https://github.com/superkabuki/threefive3/blob/main/xml.md) | [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) | [FFmpeg SCTE35](https://github.com/superkabuki/FFmpeg_SCTE35)
@@ -1,5 +1,7 @@
1
+ [Install threefive3](#install) |[SCTE-35 Cli](#the-cli-tool) |[SCTE-35 Xml ](https://github.com/superkabuki/threefive3/blob/main/xml.md) | [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) | [FFmpeg SCTE35](https://github.com/superkabuki/FFmpeg_SCTE35)
1
2
 
2
3
  # threefive3 SCTE-35 cli super tool and python3 library.
4
+ > Brought to you by the fine folks at fu-corp _( Adrian and the two blonde Chinese girls. )_
3
5
 
4
6
  ✅ SCTE-35 Parser ✅ SCTE-35 Encoder ✅ SCTE-35 HLS ✅ SCTE-35 Xml ✅ SCTE-35 Cli ✅ SCTE-35 library
5
7
 
@@ -9,8 +11,8 @@
9
11
  * Built-in network support for HTTP(S), UDP, and Multicast.
10
12
  * Automatic AES decryption for HLS.
11
13
  * All HLS SCTE-35 Tags are Supported.
12
- ___
13
- # Latest release is v3.0.19
14
+
15
+ ### Latest release is v3.0.21
14
16
  > Stay up to date, only the latest release is supported.
15
17
  ___
16
18
  ### MPEGTS streams can be parsed for SCTE-35 with three lines of code.
@@ -27,30 +29,30 @@ Type "help", "copyright", "credits" or "license" for more information.
27
29
 
28
30
  >>>> strm.decode()
29
31
  ```
30
- # Heads Up!
31
32
 
32
- > threefive3 is a lot to do by myself, in my spare time. I'm going to impose on y'all a little.
33
+ # `Documentation`
34
+
33
35
 
34
- > I am currently working on error reporting. I am trying to aggregate the errors into each object, so if you have multiple errors, you can get them all at once, rather than one at a time. I need to try some stuff so I can see how it works and how it fails.
35
- > If I have to do this alone, it will take much longer than if y'all help me.
36
- > I will probably push a couple releases this week, I need you to use then.
37
- > Be a good citizen and get involved. That's what makes open source work.
36
+ * [Install](#install)
38
37
 
39
-
40
- # Documentation
38
+ #### Cli
41
39
 
42
- * [Install](#install)
43
- * [SCTE-35 Cli](#the-cli-tool)
44
- * [SCTE-35 Xml ](https://github.com/superkabuki/threefive3/blob/main/xml.md)
45
- * [Cue Class](https://github.com/superkabuki/threefive3/blob/main/cue.md)
46
- * [Stream Class](https://github.com/superkabuki/threefive3/blob/main/stream.md)
47
- * [Online SCTE-35 Parser](https://iodisco.com/scte35)
48
- * [Encode SCTE-35](https://github.com/superkabuki/threefive3/blob/main/encode.md)
49
- * [FFmpeg SCTE35](https://github.com/superkabuki/FFmpeg_SCTE35)
40
+ * [SCTE-35 Cli Super Tool](#the-cli-tool) Encodes, Decodes, and Recodes. This is pretty cool, it does SCTE-35 seven different ways.
41
+ * The cli tool comes with builtin documentation just type `threefive3 help`
50
42
 
51
- * _The cli tool comes with builtin documentation just type_ `threefive3 help`
43
+ ### HLS
44
+ * [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 and more.
52
45
 
53
- * _The python built in help is always the most up to date._
46
+
47
+ #### Xml
48
+
49
+ * [SCTE-35 Xml ](https://github.com/superkabuki/threefive3/blob/main/xml.md) The people wanted it so I finally did Xml.
50
+ * I feel cheap and dirty.
51
+ ___
52
+
53
+ #### `Classes`
54
+
55
+ * The python built in help is always the most up to date docs for the library.
54
56
 
55
57
  ```rebol
56
58
  a@fu:~/build7/threefive3$ pypy3
@@ -61,10 +63,23 @@ Type "help", "copyright", "credits" or "license" for more information.
61
63
  >>>> help(Stream)
62
64
  ```
63
65
 
66
+ * [Cue Class](https://github.com/superkabuki/threefive3/blob/main/cue.md) Cue is the main SCTE-35 class to use.
67
+ * [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.
64
68
  ___
65
69
 
70
+ #### `| more`
71
+
72
+ * [Online SCTE-35 Parser](https://iodisco.com/scte35) Supporte Base64, Bytes,Hex,Int, Json, Xml, and Xml+binary.
73
+ * __Damn__.
66
74
 
67
- # `Install`
75
+ * [Encode SCTE-35](https://github.com/superkabuki/threefive3/blob/main/encode.md) Some encoding code examples.
76
+
77
+ * [FFmpeg SCTE35](https://github.com/superkabuki/FFmpeg_SCTE35) FFmpeg with the SuperKabui SCTE-35 Patch applied.
78
+ * __Hell Yes.__
79
+
80
+ ___
81
+
82
+ ### `Install`
68
83
  * python3 via pip
69
84
  ```rebol
70
85
  python3 -mpip install threefive3
@@ -82,10 +97,10 @@ make install
82
97
  ___
83
98
 
84
99
 
85
- # `The Cli tool`
100
+ ### `The Cli tool`
86
101
 
87
102
 
88
- ### The cli tool installs automatically with pip or the Makefile.
103
+ #### The cli tool installs automatically with pip or the Makefile.
89
104
 
90
105
  * [__SCTE-35 Inputs__](#inputs)
91
106
  * [__SCTE-35 Outputs__](#outputs)
@@ -95,7 +110,7 @@ ___
95
110
  * [Display raw __SCTE-35 packets__ from __video streams__](#packets)
96
111
  * [__Repair SCTE-35 streams__ changed to __bin data__ by __ffmpeg__](#sixfix)
97
112
 
98
- # `Inputs`
113
+ #### `Inputs`
99
114
 
100
115
  * Most __inputs__ are __auto-detected.__
101
116
  * __stdin__ is __auto selected__ and __auto detected.__
@@ -105,7 +120,7 @@ ___
105
120
  ```rebol
106
121
  threefive3 udp://@235.2.5.35:3535
107
122
  ```
108
- * If a file comtains a SCTE-35 Cue as a string( base64,hex,int,json,xml or xml+bin), redirect the file contents.
123
+ * If a file comtains a SCTE-35 cue as a string( base64,hex,int,json,xml or xml+bin), redirect the file contents.
109
124
  ```rebol
110
125
 
111
126
  threefive3 < json.json
@@ -146,7 +161,7 @@ threefive3 '/DAWAAAAAAAAAP/wBQb+ztd7owAAdIbbmw=='
146
161
  | | |
147
162
 
148
163
 
149
- ### Outputs
164
+ #### Outputs
150
165
  * output type is determined by the key words __base64, bytes, hex, int, json, xml, and xmlbin__.
151
166
  * __json is the default__.
152
167
  * __Any input (except HLS,) can be returned as any output__
@@ -163,55 +178,55 @@ threefive3 '/DAWAAAAAAAAAP/wBQb+ztd7owAAdIbbmw=='
163
178
  | Xml | `threefive3 '/DAsAAAAAyiYAP/wCgUAAAABf1+ZmQEBABECD0NVRUkAAAAAf4ABADUAAC2XQZU=' xml ` ` |
164
179
  | Xml+bin | `threefive3 0xfc301600000000000000fff00506fed605225b0000b0b65f3b xmlbin ` |`
165
180
 
166
- ### `hls`
181
+ #### `hls`
167
182
  * parse hls manifests and segments for SCTE-35
168
183
  ```smalltalk
169
184
  threefive3 hls https://example.com/master.m3u8
170
185
  ```
171
186
  ___
172
- ### `Iframes`
187
+ #### `Iframes`
173
188
  * Show iframes PTS in an MPEGTS video
174
189
 
175
190
  ```smalltalk
176
191
  threefive3 iframes https://example.com/video.ts
177
192
  ```
178
193
  ___
179
- ### `packets`
194
+ #### `packets`
180
195
  * Print raw SCTE-35 packets from multicast mpegts video
181
196
 
182
197
  ```smalltalk
183
198
  threefive3 packets udp://@235.35.3.5:3535
184
199
  ```
185
200
  ___
186
- ### `proxy`
201
+ #### `proxy`
187
202
  * Parse a https stream and write raw video to stdout
188
203
 
189
204
  ```smalltalk
190
205
  threefive3 proxy video.ts
191
206
  ```
192
207
  ___
193
- ### `pts`
208
+ #### `pts`
194
209
  * Print PTS from mpegts video
195
210
 
196
211
  ```smalltalk
197
212
  threefive3 pts video.ts
198
213
  ```
199
214
  ___
200
- ### `sidecar`
215
+ #### `sidecar`
201
216
  * Parse a stream, write pts,write SCTE-35 Cues to sidecar.txt
202
217
 
203
218
  ```smalltalk
204
219
  threefive3 sidecar video.ts
205
220
  ```
206
221
  ___
207
- ### `sixfix`
222
+ #### `sixfix`
208
223
  * Fix SCTE-35 data mangled by ffmpeg
209
224
 
210
225
  ```smalltalk
211
226
  threefive3 sixfix video.ts
212
227
  ```
213
228
  ___
214
- ### `show`
229
+ #### `show`
215
230
 
216
231
  * Probe mpegts video _( kind of like ffprobe )_
217
232
 
@@ -219,32 +234,27 @@ ___
219
234
  threefive3 show video.ts
220
235
  ```
221
236
  ___
222
- ### `version`
237
+ #### `version`
223
238
  * Show version
224
239
 
225
240
  ```smalltalk
226
241
  threefive3 version
227
242
  ```
228
243
  ___
229
- ### `help`
244
+ #### `help`
230
245
  * Help
231
246
  ```rebol
232
247
  threefive3 help
233
248
  ```
234
249
  ___
235
250
 
236
- ![image](https://github.com/user-attachments/assets/91fd37c2-746c-498d-8c6c-80c6e7760c0e)
237
251
 
238
- ___
239
252
 
240
- ## [iodisco.com/scte35](https://iodisco.com/scte35)
253
+ ### [iodisco.com/scte35](https://iodisco.com/scte35)
241
254
  ![image](https://github.com/user-attachments/assets/4df85c44-a078-4da0-97e2-5daefcf2509d)
242
255
 
243
256
 
244
257
 
245
258
  ___
246
259
 
247
- [Install](#install) |[SCTE-35 Cli](#the-cli-tool) |[SCTE-35 Xml ](https://github.com/superkabuki/threefive3/blob/main/xml.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) [FFmpeg SCTE35](https://github.com/superkabuki/FFmpeg_SCTE35)
248
-
249
-
250
-
260
+ [Install threefive3](#install) |[SCTE-35 Cli](#the-cli-tool) |[SCTE-35 Xml ](https://github.com/superkabuki/threefive3/blob/main/xml.md) | [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) | [FFmpeg SCTE35](https://github.com/superkabuki/FFmpeg_SCTE35)
@@ -1,4 +1,4 @@
1
- #!/usr/bin/python3
1
+ #!/usr/bin/env python3
2
2
 
3
3
  """
4
4
  scte35 command line SCTE35 decoder.
@@ -10,10 +10,10 @@ import select
10
10
  import sys
11
11
  from threefive3.iframes import IFramer
12
12
  from threefive3.new_reader import reader
13
- from threefive3 import Cue, Stream, print2, version
13
+ from threefive3 import Cue, Stream, print2,blue, version, red
14
14
  from threefive3.hls import cli as hlscli
15
15
  from threefive3.sixfix import sixfix
16
-
16
+ import cProfile
17
17
  # from sideways import cli as sidecli
18
18
 
19
19
  REV = "\033[7;1m"
@@ -30,13 +30,12 @@ class SupaStream(Stream):
30
30
  SupaStream is subclass of Stream used
31
31
  to print raw SCTE-35 packets.
32
32
  """
33
-
34
33
  def _parse_scte35(self, pkt, pid):
35
34
  print2(pkt)
36
35
  print2("")
37
36
  super()._parse_scte35(pkt, pid)
38
37
 
39
-
38
+
40
39
  def mk_sidecar(cue):
41
40
  """
42
41
  mk_sidecar generates a sidecar file with the SCTE-35 Cues
@@ -323,7 +322,7 @@ def to_funk(this):
323
322
  cue.bites = cue._mk_bits(this)
324
323
  cue.decode()
325
324
  except:
326
- print2(f"Bad Data:\n{cue.errs()}")
325
+ print2("Bad Data:\n")
327
326
  sys.exit()
328
327
  if cue:
329
328
  funk()(cue) # func works here too.
@@ -361,9 +360,13 @@ def chk_funk_map():
361
360
  sys.exit()
362
361
 
363
362
 
364
- if __name__ == "__main__":
363
+ def go():
365
364
  if len(sys.argv) < 2:
366
365
  sys.argv.append("json")
367
366
  chk_print_map()
368
367
  chk_mpegts_map()
369
368
  chk_funk_map()
369
+
370
+
371
+ if __name__ == "__main__":
372
+ go()
@@ -1,15 +1,16 @@
1
1
  """
2
- scte35.__init__.py
2
+ threefive3.__init__.py
3
3
  """
4
4
 
5
-
6
5
  from .cue import Cue
6
+ from .encode import mk_splice_null, mk_time_signal, mk_splice_insert
7
7
  from .hls import HlsParser
8
8
  from .hlstags import TagParser
9
9
  from .section import SpliceInfoSection
10
10
  from .segment import Segment
11
11
  from .stream import Stream
12
- from .stuff import print2, iso8601, atohif
12
+ from .stuff import print2, iso8601, atohif ,red, blue
13
+ from .superkabuki import SuperKabuki
13
14
  from .version import version
14
15
 
15
16
  from .commands import (
@@ -5,7 +5,7 @@ the class SCTE35Base.
5
5
 
6
6
  import json
7
7
  from .bitn import NBin
8
- from .stuff import print2
8
+ from .stuff import print2, red
9
9
  from .xml import Node
10
10
 
11
11
 
@@ -17,9 +17,6 @@ class SCTE35Base:
17
17
 
18
18
  ROLLOVER = 8589934591
19
19
 
20
- def __init__(self):
21
- self.errors = []
22
-
23
20
  def __repr__(self):
24
21
  return str(self.__dict__)
25
22
 
@@ -32,8 +29,7 @@ class SCTE35Base:
32
29
  def _err2(self, var_name, var_value, bit_count, var_type):
33
30
  var_type = str(var_type).split("'")[1]
34
31
  err_mesg = f"{var_name} is {var_value} , it should be type {var_type}, {bit_count} bit(s) long."
35
- self.errors.append(err_mesg)
36
- print2(err_mesg)
32
+ red(err_mesg)
37
33
 
38
34
  def _bool_int(self, var_name, var_value, bit_count, var_type):
39
35
  if var_type == int:
@@ -2,7 +2,7 @@
2
2
  The bitn.Bitn and bitn.NBin classes
3
3
  """
4
4
 
5
- from .stuff import print2
5
+ from .stuff import red
6
6
 
7
7
 
8
8
  class Bitn:
@@ -16,12 +16,11 @@ class Bitn:
16
16
  def __init__(self, bites):
17
17
  # self.bites = bites
18
18
  self.bitsize = self.idx = len(bites) << 3
19
- if isinstance(bites,bytes):
19
+ if isinstance(bites, bytes):
20
20
  self.bits = int.from_bytes(bites, byteorder="big")
21
- if isinstance(bites,int):
22
- self.bits=bites
21
+ if isinstance(bites, int):
22
+ self.bits = bites
23
23
 
24
-
25
24
  def __repr__(self):
26
25
  return str(vars(self))
27
26
 
@@ -93,8 +92,8 @@ class Bitn:
93
92
  negative_shift is called instead of
94
93
  throwing a negative shift count error.
95
94
  """
96
- print2(f"{num_bits} bits requested, but only {self.idx} bits left.")
97
- print2(f"\n bytes remaining: {self.as_bytes(self.idx)} ")
95
+ red(f"{num_bits} bits requested, but only {self.idx} bits left.")
96
+ red(f"\n bytes remaining: {self.as_bytes(self.idx)} ")
98
97
 
99
98
 
100
99
  class NBin:
@@ -161,7 +160,7 @@ class NBin:
161
160
  if isinstance(hex_str, str):
162
161
  dehexed = int(hex_str, 16)
163
162
  # just in case hex_str is an int....
164
- if isinstance(hex_str,int):
163
+ if isinstance(hex_str, int):
165
164
  dehexed = hex_str
166
165
  self.add_int(dehexed, bit_len)
167
166
 
@@ -4,6 +4,7 @@ SCTE35 Splice Commands
4
4
 
5
5
  from .bitn import Bitn
6
6
  from .base import SCTE35Base
7
+ from .stuff import red
7
8
  from .xml import Node
8
9
 
9
10
 
@@ -13,7 +14,6 @@ class SpliceCommand(SCTE35Base):
13
14
  """
14
15
 
15
16
  def __init__(self, bites=None):
16
- super().__init__()
17
17
  self.command_length = 0
18
18
  self.command_type = None
19
19
  self.name = None
@@ -165,9 +165,7 @@ class TimeSignal(SpliceCommand):
165
165
  if self.time_specified_flag:
166
166
  nbin.reserve(6)
167
167
  if not isinstance(self.pts_time, float):
168
- raise ValueError(
169
- "\033[7mA float for pts_time for the splice command is required.\033[27m"
170
- )
168
+ red(" A float for pts_time for the splice command is required. ")
171
169
  self.pts_time = round(self.pts_time, 6)
172
170
  nbin.add_int(int(self.as_ticks(self.pts_time)), 33)
173
171
  else:
@@ -297,7 +295,7 @@ class SpliceInsert(TimeSignal):
297
295
  }
298
296
  for k, v in si_attrs.items():
299
297
  if v is None:
300
- raise ValueError(f"\033[7mSpliceInsert.{k} needs to be set\033[27m")
298
+ red(f"SpliceInsert.{k} needs to be set")
301
299
  si = Node("SpliceInsert", attrs=si_attrs, ns=ns)
302
300
  if self.pts_time:
303
301
  prgm = Node("Program", ns=ns)