threefive3 3.0.19__tar.gz → 3.0.23__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.19/threefive3.egg-info → threefive3-3.0.23}/PKG-INFO +99 -46
- {threefive3-3.0.19 → threefive3-3.0.23}/README.md +96 -43
- {threefive3-3.0.19 → threefive3-3.0.23}/bin/threefive3 +52 -8
- {threefive3-3.0.19 → threefive3-3.0.23}/setup.py +2 -3
- {threefive3-3.0.19 → threefive3-3.0.23}/threefive3/__init__.py +3 -3
- {threefive3-3.0.19 → threefive3-3.0.23}/threefive3/base.py +2 -6
- {threefive3-3.0.19 → threefive3-3.0.23}/threefive3/bitn.py +7 -8
- {threefive3-3.0.19 → threefive3-3.0.23}/threefive3/commands.py +3 -5
- threefive3-3.0.23/threefive3/crc.py +44 -0
- {threefive3-3.0.19 → threefive3-3.0.23}/threefive3/cue.py +74 -66
- {threefive3-3.0.19 → threefive3-3.0.23}/threefive3/descriptors.py +4 -4
- threefive3-3.0.23/threefive3/encode.py +114 -0
- threefive3-3.0.23/threefive3/gums.py +198 -0
- {threefive3-3.0.19 → threefive3-3.0.23}/threefive3/hls.py +45 -48
- {threefive3-3.0.19 → threefive3-3.0.23}/threefive3/hlstags.py +34 -24
- {threefive3-3.0.19 → threefive3-3.0.23}/threefive3/iframes.py +10 -4
- {threefive3-3.0.19 → threefive3-3.0.23}/threefive3/new_reader.py +33 -37
- {threefive3-3.0.19 → threefive3-3.0.23}/threefive3/packetdata.py +1 -1
- {threefive3-3.0.19 → threefive3-3.0.23}/threefive3/section.py +12 -13
- {threefive3-3.0.19 → threefive3-3.0.23}/threefive3/sixfix.py +3 -3
- {threefive3-3.0.19 → threefive3-3.0.23}/threefive3/stream.py +29 -26
- threefive3-3.0.23/threefive3/stuff.py +64 -0
- threefive3-3.0.23/threefive3/superkabuki.py +415 -0
- {threefive3-3.0.19 → threefive3-3.0.23}/threefive3/sxp.py +11 -9
- {threefive3-3.0.19 → threefive3-3.0.23}/threefive3/version.py +1 -1
- threefive3-3.0.23/threefive3/words.py +43 -0
- {threefive3-3.0.19 → threefive3-3.0.23/threefive3.egg-info}/PKG-INFO +99 -46
- {threefive3-3.0.19 → threefive3-3.0.23}/threefive3.egg-info/SOURCES.txt +4 -0
- threefive3-3.0.19/threefive3/crc.py +0 -49
- threefive3-3.0.19/threefive3/stuff.py +0 -47
- {threefive3-3.0.19 → threefive3-3.0.23}/LICENSE +0 -0
- {threefive3-3.0.19 → threefive3-3.0.23}/setup.cfg +0 -0
- {threefive3-3.0.19 → threefive3-3.0.23}/threefive3/segment.py +0 -0
- {threefive3-3.0.19 → threefive3-3.0.23}/threefive3/segmentation.py +0 -0
- {threefive3-3.0.19 → threefive3-3.0.23}/threefive3/streamtypes.py +0 -0
- {threefive3-3.0.19 → threefive3-3.0.23}/threefive3/upids.py +0 -0
- {threefive3-3.0.19 → threefive3-3.0.23}/threefive3/x2c.py +0 -0
- {threefive3-3.0.19 → threefive3-3.0.23}/threefive3/xml.py +0 -0
- {threefive3-3.0.19 → threefive3-3.0.23}/threefive3.egg-info/dependency_links.txt +0 -0
- {threefive3-3.0.19 → threefive3-3.0.23}/threefive3.egg-info/requires.txt +0 -0
- {threefive3-3.0.19 → threefive3-3.0.23}/threefive3.egg-info/top_level.txt +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: threefive3
|
|
3
|
-
Version: 3.0.
|
|
4
|
-
Summary:
|
|
5
|
-
Home-page: https://github.com/superkabuki/
|
|
3
|
+
Version: 3.0.23
|
|
4
|
+
Summary: SCTE-35 decoder and encoder with MPEGTS and HLS and XML support.
|
|
5
|
+
Home-page: https://github.com/superkabuki/threefive3
|
|
6
6
|
Author: Adrian of Doom
|
|
7
7
|
Author-email: spam@iodisco.com
|
|
8
8
|
Classifier: License :: OSI Approved :: Sleepycat License
|
|
@@ -19,8 +19,15 @@ Requires-Python: >=3.6
|
|
|
19
19
|
Description-Content-Type: text/markdown
|
|
20
20
|
License-File: LICENSE
|
|
21
21
|
|
|
22
|
+
Canada has a virtual monopoly on the World's mustard seed supply and they will use it to manipulate financial markets. We must act.
|
|
23
|
+
## Nuke Canada Now!
|
|
24
|
+
|
|
25
|
+
[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)
|
|
26
|
+
|
|
27
|
+
|
|
22
28
|
|
|
23
29
|
# threefive3 SCTE-35 cli super tool and python3 library.
|
|
30
|
+
> Brought to you by the fine folks at fu-corp _( Adrian and the two blonde Chinese girls. )_
|
|
24
31
|
|
|
25
32
|
✅ SCTE-35 Parser ✅ SCTE-35 Encoder ✅ SCTE-35 HLS ✅ SCTE-35 Xml ✅ SCTE-35 Cli ✅ SCTE-35 library
|
|
26
33
|
|
|
@@ -30,8 +37,8 @@ License-File: LICENSE
|
|
|
30
37
|
* Built-in network support for HTTP(S), UDP, and Multicast.
|
|
31
38
|
* Automatic AES decryption for HLS.
|
|
32
39
|
* All HLS SCTE-35 Tags are Supported.
|
|
33
|
-
|
|
34
|
-
|
|
40
|
+
|
|
41
|
+
### Latest release is v3.0.21
|
|
35
42
|
> Stay up to date, only the latest release is supported.
|
|
36
43
|
___
|
|
37
44
|
### MPEGTS streams can be parsed for SCTE-35 with three lines of code.
|
|
@@ -48,30 +55,70 @@ Type "help", "copyright", "credits" or "license" for more information.
|
|
|
48
55
|
|
|
49
56
|
>>>> strm.decode()
|
|
50
57
|
```
|
|
51
|
-
# Heads Up!
|
|
52
58
|
|
|
53
|
-
> threefive3 is a lot to do by myself, in my spare time. I'm going to impose on y'all a little.
|
|
54
59
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
>
|
|
58
|
-
|
|
60
|
+
# threefive3 Road Map.
|
|
61
|
+
|
|
62
|
+
> The master plan for threefive3 is to consolidate code from several of my projects.
|
|
63
|
+
|
|
64
|
+
| Project | Description | Status |
|
|
65
|
+
|-----------------|---------------------------------------|----------|
|
|
66
|
+
| threefive | scte-35 parser | Done |
|
|
67
|
+
| bitn | bitslicer for byte strings | Done |
|
|
68
|
+
| new_reader | reader for files and network data | Done |
|
|
69
|
+
| showcues | hls scte35 parser | Done |
|
|
70
|
+
| m3ufu tagparser | hls scte-35 tag parser | Done |
|
|
71
|
+
| iframes | iframe detection for mpegts | Done |
|
|
72
|
+
| dash rip rock | scte-35 xml parser and generator | Done |
|
|
73
|
+
| six2scte35 | ffmpeg bin data stream back to scte-35 | Done |
|
|
74
|
+
| superkabuki | scte-35 packet injection | Next release |
|
|
75
|
+
| sideways | hls scte-35 tag injecton | No |
|
|
76
|
+
| gums | multicast server | Next release |
|
|
77
|
+
| adbreak3 | fast cli scte-35 cue creation | No |
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
# Little Help?
|
|
81
|
+
|
|
82
|
+
I could use a hand.with these <br>
|
|
83
|
+
|
|
84
|
+
* Writing docs. Explain how to use threefive3.
|
|
85
|
+
* Easy Examples. Light coding.
|
|
86
|
+
* Unit Testing. light coding with some SCTE-35.
|
|
87
|
+
* Pylint and PEP compliance. medium python knowledge.
|
|
88
|
+
* Profiling and Benchmarking. Help make threefive3 faster.
|
|
89
|
+
* Replacing setup tools. Using setup.py for packaging has been deprecated, medium python knowledge.
|
|
90
|
+
* DASH parsing. I need somebody to explain the non-SCTE-35 parts of DASH to me.
|
|
91
|
+
|
|
92
|
+
You don't have to be a master of python or SCTE-35,<BR> but helping will make you better at both.<BR>
|
|
93
|
+
__I value enthusiasm over skill, I can teach you what you don't know.__ <BR>
|
|
94
|
+
Don't worry, I won't let you break anything, that's my job.
|
|
95
|
+
|
|
96
|
+
If you want to get involved, just open an issue and we can talk about it.
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
# `Documentation`
|
|
100
|
+
|
|
59
101
|
|
|
60
|
-
|
|
61
|
-
# Documentation
|
|
102
|
+
* [Install](#install)
|
|
62
103
|
|
|
63
|
-
|
|
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)
|
|
104
|
+
#### Cli
|
|
71
105
|
|
|
72
|
-
*
|
|
106
|
+
* [SCTE-35 Cli Super Tool](#the-cli-tool) Encodes, Decodes, and Recodes. This is pretty cool, it does SCTE-35 seven different ways.
|
|
107
|
+
* The cli tool comes with builtin documentation just type `threefive3 help`
|
|
73
108
|
|
|
74
|
-
|
|
109
|
+
### HLS
|
|
110
|
+
* [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?
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
#### Xml
|
|
114
|
+
|
|
115
|
+
* [SCTE-35 Xml ](https://github.com/superkabuki/threefive3/blob/main/xml.md) The people wanted it so I finally did Xml.
|
|
116
|
+
* I feel cheap and dirty.
|
|
117
|
+
___
|
|
118
|
+
|
|
119
|
+
#### `Classes`
|
|
120
|
+
|
|
121
|
+
* The python built in help is always the most up to date docs for the library.
|
|
75
122
|
|
|
76
123
|
```rebol
|
|
77
124
|
a@fu:~/build7/threefive3$ pypy3
|
|
@@ -82,10 +129,21 @@ Type "help", "copyright", "credits" or "license" for more information.
|
|
|
82
129
|
>>>> help(Stream)
|
|
83
130
|
```
|
|
84
131
|
|
|
132
|
+
* [Cue Class](https://github.com/superkabuki/threefive3/blob/main/cue.md) Cue is the main SCTE-35 class to use.
|
|
133
|
+
* [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
134
|
___
|
|
86
135
|
|
|
136
|
+
#### `| more`
|
|
137
|
+
|
|
138
|
+
* [Online SCTE-35 Parser](https://iodisco.com/scte35) Supporte Base64, Bytes,Hex,Int, Json, Xml, and Xml+binary.
|
|
139
|
+
|
|
140
|
+
* [Encode SCTE-35](https://github.com/superkabuki/threefive3/blob/main/encode.md) Some encoding code examples.
|
|
87
141
|
|
|
88
|
-
|
|
142
|
+
* [FFmpeg SCTE35](https://github.com/superkabuki/FFmpeg_SCTE35) FFmpeg with the SuperKabui SCTE-35 Patch applied.
|
|
143
|
+
|
|
144
|
+
___
|
|
145
|
+
|
|
146
|
+
### `Install`
|
|
89
147
|
* python3 via pip
|
|
90
148
|
```rebol
|
|
91
149
|
python3 -mpip install threefive3
|
|
@@ -103,10 +161,10 @@ make install
|
|
|
103
161
|
___
|
|
104
162
|
|
|
105
163
|
|
|
106
|
-
|
|
164
|
+
### `The Cli tool`
|
|
107
165
|
|
|
108
166
|
|
|
109
|
-
|
|
167
|
+
#### The cli tool installs automatically with pip or the Makefile.
|
|
110
168
|
|
|
111
169
|
* [__SCTE-35 Inputs__](#inputs)
|
|
112
170
|
* [__SCTE-35 Outputs__](#outputs)
|
|
@@ -116,7 +174,7 @@ ___
|
|
|
116
174
|
* [Display raw __SCTE-35 packets__ from __video streams__](#packets)
|
|
117
175
|
* [__Repair SCTE-35 streams__ changed to __bin data__ by __ffmpeg__](#sixfix)
|
|
118
176
|
|
|
119
|
-
|
|
177
|
+
#### `Inputs`
|
|
120
178
|
|
|
121
179
|
* Most __inputs__ are __auto-detected.__
|
|
122
180
|
* __stdin__ is __auto selected__ and __auto detected.__
|
|
@@ -126,7 +184,7 @@ ___
|
|
|
126
184
|
```rebol
|
|
127
185
|
threefive3 udp://@235.2.5.35:3535
|
|
128
186
|
```
|
|
129
|
-
* If a file comtains a SCTE-35
|
|
187
|
+
* If a file comtains a SCTE-35 cue as a string( base64,hex,int,json,xml or xml+bin), redirect the file contents.
|
|
130
188
|
```rebol
|
|
131
189
|
|
|
132
190
|
threefive3 < json.json
|
|
@@ -167,7 +225,7 @@ threefive3 '/DAWAAAAAAAAAP/wBQb+ztd7owAAdIbbmw=='
|
|
|
167
225
|
| | |
|
|
168
226
|
|
|
169
227
|
|
|
170
|
-
|
|
228
|
+
#### Outputs
|
|
171
229
|
* output type is determined by the key words __base64, bytes, hex, int, json, xml, and xmlbin__.
|
|
172
230
|
* __json is the default__.
|
|
173
231
|
* __Any input (except HLS,) can be returned as any output__
|
|
@@ -184,55 +242,55 @@ threefive3 '/DAWAAAAAAAAAP/wBQb+ztd7owAAdIbbmw=='
|
|
|
184
242
|
| Xml | `threefive3 '/DAsAAAAAyiYAP/wCgUAAAABf1+ZmQEBABECD0NVRUkAAAAAf4ABADUAAC2XQZU=' xml ` ` |
|
|
185
243
|
| Xml+bin | `threefive3 0xfc301600000000000000fff00506fed605225b0000b0b65f3b xmlbin ` |`
|
|
186
244
|
|
|
187
|
-
|
|
245
|
+
#### `hls`
|
|
188
246
|
* parse hls manifests and segments for SCTE-35
|
|
189
247
|
```smalltalk
|
|
190
248
|
threefive3 hls https://example.com/master.m3u8
|
|
191
249
|
```
|
|
192
250
|
___
|
|
193
|
-
|
|
251
|
+
#### `Iframes`
|
|
194
252
|
* Show iframes PTS in an MPEGTS video
|
|
195
253
|
|
|
196
254
|
```smalltalk
|
|
197
255
|
threefive3 iframes https://example.com/video.ts
|
|
198
256
|
```
|
|
199
257
|
___
|
|
200
|
-
|
|
258
|
+
#### `packets`
|
|
201
259
|
* Print raw SCTE-35 packets from multicast mpegts video
|
|
202
260
|
|
|
203
261
|
```smalltalk
|
|
204
262
|
threefive3 packets udp://@235.35.3.5:3535
|
|
205
263
|
```
|
|
206
264
|
___
|
|
207
|
-
|
|
265
|
+
#### `proxy`
|
|
208
266
|
* Parse a https stream and write raw video to stdout
|
|
209
267
|
|
|
210
268
|
```smalltalk
|
|
211
269
|
threefive3 proxy video.ts
|
|
212
270
|
```
|
|
213
271
|
___
|
|
214
|
-
|
|
272
|
+
#### `pts`
|
|
215
273
|
* Print PTS from mpegts video
|
|
216
274
|
|
|
217
275
|
```smalltalk
|
|
218
276
|
threefive3 pts video.ts
|
|
219
277
|
```
|
|
220
278
|
___
|
|
221
|
-
|
|
279
|
+
#### `sidecar`
|
|
222
280
|
* Parse a stream, write pts,write SCTE-35 Cues to sidecar.txt
|
|
223
281
|
|
|
224
282
|
```smalltalk
|
|
225
283
|
threefive3 sidecar video.ts
|
|
226
284
|
```
|
|
227
285
|
___
|
|
228
|
-
|
|
286
|
+
#### `sixfix`
|
|
229
287
|
* Fix SCTE-35 data mangled by ffmpeg
|
|
230
288
|
|
|
231
289
|
```smalltalk
|
|
232
290
|
threefive3 sixfix video.ts
|
|
233
291
|
```
|
|
234
292
|
___
|
|
235
|
-
|
|
293
|
+
#### `show`
|
|
236
294
|
|
|
237
295
|
* Probe mpegts video _( kind of like ffprobe )_
|
|
238
296
|
|
|
@@ -240,32 +298,27 @@ ___
|
|
|
240
298
|
threefive3 show video.ts
|
|
241
299
|
```
|
|
242
300
|
___
|
|
243
|
-
|
|
301
|
+
#### `version`
|
|
244
302
|
* Show version
|
|
245
303
|
|
|
246
304
|
```smalltalk
|
|
247
305
|
threefive3 version
|
|
248
306
|
```
|
|
249
307
|
___
|
|
250
|
-
|
|
308
|
+
#### `help`
|
|
251
309
|
* Help
|
|
252
310
|
```rebol
|
|
253
311
|
threefive3 help
|
|
254
312
|
```
|
|
255
313
|
___
|
|
256
314
|
|
|
257
|
-

|
|
258
315
|
|
|
259
|
-
___
|
|
260
316
|
|
|
261
|
-
|
|
317
|
+
### [iodisco.com/scte35](https://iodisco.com/scte35)
|
|
262
318
|

|
|
263
319
|
|
|
264
320
|
|
|
265
321
|
|
|
266
322
|
___
|
|
267
323
|
|
|
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
|
-
|
|
324
|
+
[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,12 @@
|
|
|
1
|
+
Canada has a virtual monopoly on the World's mustard seed supply and they will use it to manipulate financial markets. We must act.
|
|
2
|
+
## Nuke Canada Now!
|
|
3
|
+
|
|
4
|
+
[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)
|
|
5
|
+
|
|
6
|
+
|
|
1
7
|
|
|
2
8
|
# threefive3 SCTE-35 cli super tool and python3 library.
|
|
9
|
+
> Brought to you by the fine folks at fu-corp _( Adrian and the two blonde Chinese girls. )_
|
|
3
10
|
|
|
4
11
|
✅ SCTE-35 Parser ✅ SCTE-35 Encoder ✅ SCTE-35 HLS ✅ SCTE-35 Xml ✅ SCTE-35 Cli ✅ SCTE-35 library
|
|
5
12
|
|
|
@@ -9,8 +16,8 @@
|
|
|
9
16
|
* Built-in network support for HTTP(S), UDP, and Multicast.
|
|
10
17
|
* Automatic AES decryption for HLS.
|
|
11
18
|
* All HLS SCTE-35 Tags are Supported.
|
|
12
|
-
|
|
13
|
-
|
|
19
|
+
|
|
20
|
+
### Latest release is v3.0.21
|
|
14
21
|
> Stay up to date, only the latest release is supported.
|
|
15
22
|
___
|
|
16
23
|
### MPEGTS streams can be parsed for SCTE-35 with three lines of code.
|
|
@@ -27,30 +34,70 @@ Type "help", "copyright", "credits" or "license" for more information.
|
|
|
27
34
|
|
|
28
35
|
>>>> strm.decode()
|
|
29
36
|
```
|
|
30
|
-
# Heads Up!
|
|
31
37
|
|
|
32
|
-
> threefive3 is a lot to do by myself, in my spare time. I'm going to impose on y'all a little.
|
|
33
38
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
>
|
|
37
|
-
|
|
39
|
+
# threefive3 Road Map.
|
|
40
|
+
|
|
41
|
+
> The master plan for threefive3 is to consolidate code from several of my projects.
|
|
42
|
+
|
|
43
|
+
| Project | Description | Status |
|
|
44
|
+
|-----------------|---------------------------------------|----------|
|
|
45
|
+
| threefive | scte-35 parser | Done |
|
|
46
|
+
| bitn | bitslicer for byte strings | Done |
|
|
47
|
+
| new_reader | reader for files and network data | Done |
|
|
48
|
+
| showcues | hls scte35 parser | Done |
|
|
49
|
+
| m3ufu tagparser | hls scte-35 tag parser | Done |
|
|
50
|
+
| iframes | iframe detection for mpegts | Done |
|
|
51
|
+
| dash rip rock | scte-35 xml parser and generator | Done |
|
|
52
|
+
| six2scte35 | ffmpeg bin data stream back to scte-35 | Done |
|
|
53
|
+
| superkabuki | scte-35 packet injection | Next release |
|
|
54
|
+
| sideways | hls scte-35 tag injecton | No |
|
|
55
|
+
| gums | multicast server | Next release |
|
|
56
|
+
| adbreak3 | fast cli scte-35 cue creation | No |
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
# Little Help?
|
|
60
|
+
|
|
61
|
+
I could use a hand.with these <br>
|
|
62
|
+
|
|
63
|
+
* Writing docs. Explain how to use threefive3.
|
|
64
|
+
* Easy Examples. Light coding.
|
|
65
|
+
* Unit Testing. light coding with some SCTE-35.
|
|
66
|
+
* Pylint and PEP compliance. medium python knowledge.
|
|
67
|
+
* Profiling and Benchmarking. Help make threefive3 faster.
|
|
68
|
+
* Replacing setup tools. Using setup.py for packaging has been deprecated, medium python knowledge.
|
|
69
|
+
* DASH parsing. I need somebody to explain the non-SCTE-35 parts of DASH to me.
|
|
70
|
+
|
|
71
|
+
You don't have to be a master of python or SCTE-35,<BR> but helping will make you better at both.<BR>
|
|
72
|
+
__I value enthusiasm over skill, I can teach you what you don't know.__ <BR>
|
|
73
|
+
Don't worry, I won't let you break anything, that's my job.
|
|
74
|
+
|
|
75
|
+
If you want to get involved, just open an issue and we can talk about it.
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
# `Documentation`
|
|
79
|
+
|
|
38
80
|
|
|
39
|
-
|
|
40
|
-
# Documentation
|
|
81
|
+
* [Install](#install)
|
|
41
82
|
|
|
42
|
-
|
|
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)
|
|
83
|
+
#### Cli
|
|
50
84
|
|
|
51
|
-
*
|
|
85
|
+
* [SCTE-35 Cli Super Tool](#the-cli-tool) Encodes, Decodes, and Recodes. This is pretty cool, it does SCTE-35 seven different ways.
|
|
86
|
+
* The cli tool comes with builtin documentation just type `threefive3 help`
|
|
52
87
|
|
|
53
|
-
|
|
88
|
+
### HLS
|
|
89
|
+
* [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?
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
#### Xml
|
|
93
|
+
|
|
94
|
+
* [SCTE-35 Xml ](https://github.com/superkabuki/threefive3/blob/main/xml.md) The people wanted it so I finally did Xml.
|
|
95
|
+
* I feel cheap and dirty.
|
|
96
|
+
___
|
|
97
|
+
|
|
98
|
+
#### `Classes`
|
|
99
|
+
|
|
100
|
+
* The python built in help is always the most up to date docs for the library.
|
|
54
101
|
|
|
55
102
|
```rebol
|
|
56
103
|
a@fu:~/build7/threefive3$ pypy3
|
|
@@ -61,10 +108,21 @@ Type "help", "copyright", "credits" or "license" for more information.
|
|
|
61
108
|
>>>> help(Stream)
|
|
62
109
|
```
|
|
63
110
|
|
|
111
|
+
* [Cue Class](https://github.com/superkabuki/threefive3/blob/main/cue.md) Cue is the main SCTE-35 class to use.
|
|
112
|
+
* [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
113
|
___
|
|
65
114
|
|
|
115
|
+
#### `| more`
|
|
116
|
+
|
|
117
|
+
* [Online SCTE-35 Parser](https://iodisco.com/scte35) Supporte Base64, Bytes,Hex,Int, Json, Xml, and Xml+binary.
|
|
118
|
+
|
|
119
|
+
* [Encode SCTE-35](https://github.com/superkabuki/threefive3/blob/main/encode.md) Some encoding code examples.
|
|
66
120
|
|
|
67
|
-
|
|
121
|
+
* [FFmpeg SCTE35](https://github.com/superkabuki/FFmpeg_SCTE35) FFmpeg with the SuperKabui SCTE-35 Patch applied.
|
|
122
|
+
|
|
123
|
+
___
|
|
124
|
+
|
|
125
|
+
### `Install`
|
|
68
126
|
* python3 via pip
|
|
69
127
|
```rebol
|
|
70
128
|
python3 -mpip install threefive3
|
|
@@ -82,10 +140,10 @@ make install
|
|
|
82
140
|
___
|
|
83
141
|
|
|
84
142
|
|
|
85
|
-
|
|
143
|
+
### `The Cli tool`
|
|
86
144
|
|
|
87
145
|
|
|
88
|
-
|
|
146
|
+
#### The cli tool installs automatically with pip or the Makefile.
|
|
89
147
|
|
|
90
148
|
* [__SCTE-35 Inputs__](#inputs)
|
|
91
149
|
* [__SCTE-35 Outputs__](#outputs)
|
|
@@ -95,7 +153,7 @@ ___
|
|
|
95
153
|
* [Display raw __SCTE-35 packets__ from __video streams__](#packets)
|
|
96
154
|
* [__Repair SCTE-35 streams__ changed to __bin data__ by __ffmpeg__](#sixfix)
|
|
97
155
|
|
|
98
|
-
|
|
156
|
+
#### `Inputs`
|
|
99
157
|
|
|
100
158
|
* Most __inputs__ are __auto-detected.__
|
|
101
159
|
* __stdin__ is __auto selected__ and __auto detected.__
|
|
@@ -105,7 +163,7 @@ ___
|
|
|
105
163
|
```rebol
|
|
106
164
|
threefive3 udp://@235.2.5.35:3535
|
|
107
165
|
```
|
|
108
|
-
* If a file comtains a SCTE-35
|
|
166
|
+
* If a file comtains a SCTE-35 cue as a string( base64,hex,int,json,xml or xml+bin), redirect the file contents.
|
|
109
167
|
```rebol
|
|
110
168
|
|
|
111
169
|
threefive3 < json.json
|
|
@@ -146,7 +204,7 @@ threefive3 '/DAWAAAAAAAAAP/wBQb+ztd7owAAdIbbmw=='
|
|
|
146
204
|
| | |
|
|
147
205
|
|
|
148
206
|
|
|
149
|
-
|
|
207
|
+
#### Outputs
|
|
150
208
|
* output type is determined by the key words __base64, bytes, hex, int, json, xml, and xmlbin__.
|
|
151
209
|
* __json is the default__.
|
|
152
210
|
* __Any input (except HLS,) can be returned as any output__
|
|
@@ -163,55 +221,55 @@ threefive3 '/DAWAAAAAAAAAP/wBQb+ztd7owAAdIbbmw=='
|
|
|
163
221
|
| Xml | `threefive3 '/DAsAAAAAyiYAP/wCgUAAAABf1+ZmQEBABECD0NVRUkAAAAAf4ABADUAAC2XQZU=' xml ` ` |
|
|
164
222
|
| Xml+bin | `threefive3 0xfc301600000000000000fff00506fed605225b0000b0b65f3b xmlbin ` |`
|
|
165
223
|
|
|
166
|
-
|
|
224
|
+
#### `hls`
|
|
167
225
|
* parse hls manifests and segments for SCTE-35
|
|
168
226
|
```smalltalk
|
|
169
227
|
threefive3 hls https://example.com/master.m3u8
|
|
170
228
|
```
|
|
171
229
|
___
|
|
172
|
-
|
|
230
|
+
#### `Iframes`
|
|
173
231
|
* Show iframes PTS in an MPEGTS video
|
|
174
232
|
|
|
175
233
|
```smalltalk
|
|
176
234
|
threefive3 iframes https://example.com/video.ts
|
|
177
235
|
```
|
|
178
236
|
___
|
|
179
|
-
|
|
237
|
+
#### `packets`
|
|
180
238
|
* Print raw SCTE-35 packets from multicast mpegts video
|
|
181
239
|
|
|
182
240
|
```smalltalk
|
|
183
241
|
threefive3 packets udp://@235.35.3.5:3535
|
|
184
242
|
```
|
|
185
243
|
___
|
|
186
|
-
|
|
244
|
+
#### `proxy`
|
|
187
245
|
* Parse a https stream and write raw video to stdout
|
|
188
246
|
|
|
189
247
|
```smalltalk
|
|
190
248
|
threefive3 proxy video.ts
|
|
191
249
|
```
|
|
192
250
|
___
|
|
193
|
-
|
|
251
|
+
#### `pts`
|
|
194
252
|
* Print PTS from mpegts video
|
|
195
253
|
|
|
196
254
|
```smalltalk
|
|
197
255
|
threefive3 pts video.ts
|
|
198
256
|
```
|
|
199
257
|
___
|
|
200
|
-
|
|
258
|
+
#### `sidecar`
|
|
201
259
|
* Parse a stream, write pts,write SCTE-35 Cues to sidecar.txt
|
|
202
260
|
|
|
203
261
|
```smalltalk
|
|
204
262
|
threefive3 sidecar video.ts
|
|
205
263
|
```
|
|
206
264
|
___
|
|
207
|
-
|
|
265
|
+
#### `sixfix`
|
|
208
266
|
* Fix SCTE-35 data mangled by ffmpeg
|
|
209
267
|
|
|
210
268
|
```smalltalk
|
|
211
269
|
threefive3 sixfix video.ts
|
|
212
270
|
```
|
|
213
271
|
___
|
|
214
|
-
|
|
272
|
+
#### `show`
|
|
215
273
|
|
|
216
274
|
* Probe mpegts video _( kind of like ffprobe )_
|
|
217
275
|
|
|
@@ -219,32 +277,27 @@ ___
|
|
|
219
277
|
threefive3 show video.ts
|
|
220
278
|
```
|
|
221
279
|
___
|
|
222
|
-
|
|
280
|
+
#### `version`
|
|
223
281
|
* Show version
|
|
224
282
|
|
|
225
283
|
```smalltalk
|
|
226
284
|
threefive3 version
|
|
227
285
|
```
|
|
228
286
|
___
|
|
229
|
-
|
|
287
|
+
#### `help`
|
|
230
288
|
* Help
|
|
231
289
|
```rebol
|
|
232
290
|
threefive3 help
|
|
233
291
|
```
|
|
234
292
|
___
|
|
235
293
|
|
|
236
|
-

|
|
237
294
|
|
|
238
|
-
___
|
|
239
295
|
|
|
240
|
-
|
|
296
|
+
### [iodisco.com/scte35](https://iodisco.com/scte35)
|
|
241
297
|

|
|
242
298
|
|
|
243
299
|
|
|
244
300
|
|
|
245
301
|
___
|
|
246
302
|
|
|
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
|
-
|
|
303
|
+
[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.
|
|
@@ -8,11 +8,14 @@ scte35 command line SCTE35 decoder.
|
|
|
8
8
|
|
|
9
9
|
import select
|
|
10
10
|
import sys
|
|
11
|
+
from threefive3.gums import cli as gumscli
|
|
12
|
+
from threefive3.superkabuki import cli as skcli
|
|
11
13
|
from threefive3.iframes import IFramer
|
|
12
14
|
from threefive3.new_reader import reader
|
|
13
|
-
from threefive3 import Cue, Stream, print2, version
|
|
15
|
+
from threefive3 import Cue, Stream, print2, blue, version, red
|
|
14
16
|
from threefive3.hls import cli as hlscli
|
|
15
17
|
from threefive3.sixfix import sixfix
|
|
18
|
+
import cProfile
|
|
16
19
|
|
|
17
20
|
# from sideways import cli as sidecli
|
|
18
21
|
|
|
@@ -53,7 +56,7 @@ def mk_sidecar(cue):
|
|
|
53
56
|
HELP = f"""
|
|
54
57
|
{BLUE} threefive3 cli tool {U}
|
|
55
58
|
|
|
56
|
-
{B} Default {U} {BLUE}The default action is to read
|
|
59
|
+
{B} Default {U} {BLUE}The default action is to read an input and write an output.{U}
|
|
57
60
|
|
|
58
61
|
{BLUE}Inputs {U} mpegts, base64, hex, json, xml, and xmlbin{U}.
|
|
59
62
|
|
|
@@ -76,6 +79,9 @@ HELP = f"""
|
|
|
76
79
|
|
|
77
80
|
{B} iframes {U}{BLUE} show MPEGTS iframes{NORM} threefive3 iframes video.ts
|
|
78
81
|
|
|
82
|
+
{B} mcast {U}{BLUE} Create a Multicast Stream {NORM} threefive3 mcast -I video.ts
|
|
83
|
+
{U}{BLUE}See mcast help {NORM} threefive3 mcast help
|
|
84
|
+
|
|
79
85
|
{B} packets {U}{NORM}{BLUE} Print raw SCTE-35 packets:{NORM} threefive3 packets udp://@235.35.3.5:3535
|
|
80
86
|
|
|
81
87
|
{B} proxy {U}{NORM}{BLUE} Parse a stream and copy it to stdout:{NORM} threefive3 proxy video.ts
|
|
@@ -322,8 +328,8 @@ def to_funk(this):
|
|
|
322
328
|
try:
|
|
323
329
|
cue.bites = cue._mk_bits(this)
|
|
324
330
|
cue.decode()
|
|
325
|
-
except:
|
|
326
|
-
print2(
|
|
331
|
+
except Error:
|
|
332
|
+
print2(Error)
|
|
327
333
|
sys.exit()
|
|
328
334
|
if cue:
|
|
329
335
|
funk()(cue) # func works here too.
|
|
@@ -345,7 +351,7 @@ def chk_stdin(args):
|
|
|
345
351
|
strm = Stream(sys.stdin.buffer)
|
|
346
352
|
strm._parse(one + two) # dont drop first packet
|
|
347
353
|
strm.decode(func=funk())
|
|
348
|
-
sys.exit()
|
|
354
|
+
sys.exit() # I keep forgetting why I do
|
|
349
355
|
return args
|
|
350
356
|
|
|
351
357
|
|
|
@@ -361,9 +367,47 @@ def chk_funk_map():
|
|
|
361
367
|
sys.exit()
|
|
362
368
|
|
|
363
369
|
|
|
364
|
-
|
|
370
|
+
# cli map
|
|
371
|
+
|
|
372
|
+
cli_map = {"mcast": gumscli, "superkabuki": skcli}
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
def dashdashhelp():
|
|
376
|
+
"""
|
|
377
|
+
dashdashhelp swaps out "help" with "--help"
|
|
378
|
+
for keys in cli_map. Pure bureaucracy.
|
|
379
|
+
I still can't believe I can just edit sys.argv at will,
|
|
380
|
+
it kind of makes sense, since I wrote it in the first place,
|
|
381
|
+
but it just feels so wrong.
|
|
382
|
+
"""
|
|
383
|
+
if "help" in sys.argv:
|
|
384
|
+
idx = sys.argv.index("help")
|
|
385
|
+
sys.argv[idx]= "--help"
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
def chk_cli_map():
|
|
389
|
+
"""
|
|
390
|
+
chk_cli_map check if a
|
|
391
|
+
cli_map key is present in sys.argv,
|
|
392
|
+
pass control to the cli function.
|
|
393
|
+
"""
|
|
394
|
+
for k, v in cli_map.items():
|
|
395
|
+
if k in sys.argv:
|
|
396
|
+
dashdashhelp()
|
|
397
|
+
sys.argv[0] = f"{sys.argv[0]} {k}"
|
|
398
|
+
sys.argv.remove(k)
|
|
399
|
+
v()
|
|
400
|
+
sys.exit()
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
def go():
|
|
404
|
+
chk_cli_map()
|
|
405
|
+
chk_print_map()
|
|
365
406
|
if len(sys.argv) < 2:
|
|
366
407
|
sys.argv.append("json")
|
|
367
|
-
chk_print_map()
|
|
368
408
|
chk_mpegts_map()
|
|
369
409
|
chk_funk_map()
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
if __name__ == "__main__":
|
|
413
|
+
go()
|