threefive 3.0.95__tar.gz → 3.0.97__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {threefive-3.0.95 → threefive-3.0.97}/PKG-INFO +155 -104
- {threefive-3.0.95 → threefive-3.0.97}/README.md +154 -103
- {threefive-3.0.95 → threefive-3.0.97}/pyproject.toml +1 -1
- {threefive-3.0.95 → threefive-3.0.97}/threefive/base.py +2 -1
- {threefive-3.0.95 → threefive-3.0.97}/threefive/bitn.py +45 -21
- {threefive-3.0.95 → threefive-3.0.97}/threefive/cli.py +158 -176
- threefive-3.0.97/threefive/crctable.py +34 -0
- {threefive-3.0.95 → threefive-3.0.97}/threefive/cue.py +45 -24
- {threefive-3.0.95 → threefive-3.0.97}/threefive/hlstags.py +9 -2
- {threefive-3.0.95 → threefive-3.0.97}/threefive/new_reader.py +16 -19
- {threefive-3.0.95 → threefive-3.0.97}/threefive/segment.py +11 -12
- {threefive-3.0.95 → threefive-3.0.97}/threefive/stream.py +57 -92
- {threefive-3.0.95 → threefive-3.0.97}/threefive/udp.py +1 -16
- {threefive-3.0.95 → threefive-3.0.97}/threefive/version.py +1 -1
- {threefive-3.0.95 → threefive-3.0.97}/threefive.egg-info/PKG-INFO +155 -104
- {threefive-3.0.95 → threefive-3.0.97}/threefive.egg-info/SOURCES.txt +0 -1
- threefive-3.0.95/threefive/bump.py +0 -236
- threefive-3.0.95/threefive/crctable.py +0 -258
- {threefive-3.0.95 → threefive-3.0.97}/LICENSE +0 -0
- {threefive-3.0.95 → threefive-3.0.97}/setup.cfg +0 -0
- {threefive-3.0.95 → threefive-3.0.97}/threefive/__init__.py +0 -0
- {threefive-3.0.95 → threefive-3.0.97}/threefive/aac.py +0 -0
- {threefive-3.0.95 → threefive-3.0.97}/threefive/commands.py +0 -0
- {threefive-3.0.95 → threefive-3.0.97}/threefive/crc.py +0 -0
- {threefive-3.0.95 → threefive-3.0.97}/threefive/descriptors.py +0 -0
- {threefive-3.0.95 → threefive-3.0.97}/threefive/encode.py +0 -0
- {threefive-3.0.95 → threefive-3.0.97}/threefive/gums.py +0 -0
- {threefive-3.0.95 → threefive-3.0.97}/threefive/hls.py +0 -0
- {threefive-3.0.95 → threefive-3.0.97}/threefive/hlsprofile.py +0 -0
- {threefive-3.0.95 → threefive-3.0.97}/threefive/iframes.py +0 -0
- {threefive-3.0.95 → threefive-3.0.97}/threefive/packetdata.py +0 -0
- {threefive-3.0.95 → threefive-3.0.97}/threefive/pmt.py +0 -0
- {threefive-3.0.95 → threefive-3.0.97}/threefive/section.py +0 -0
- {threefive-3.0.95 → threefive-3.0.97}/threefive/segmentation.py +0 -0
- {threefive-3.0.95 → threefive-3.0.97}/threefive/sixfix.py +0 -0
- {threefive-3.0.95 → threefive-3.0.97}/threefive/speedo.py +0 -0
- {threefive-3.0.95 → threefive-3.0.97}/threefive/streamtypes.py +0 -0
- {threefive-3.0.95 → threefive-3.0.97}/threefive/stuff.py +0 -0
- {threefive-3.0.95 → threefive-3.0.97}/threefive/superkabuki.py +0 -0
- {threefive-3.0.95 → threefive-3.0.97}/threefive/throttle.py +0 -0
- {threefive-3.0.95 → threefive-3.0.97}/threefive/upids.py +0 -0
- {threefive-3.0.95 → threefive-3.0.97}/threefive/uxp.py +0 -0
- {threefive-3.0.95 → threefive-3.0.97}/threefive/xml.py +0 -0
- {threefive-3.0.95 → threefive-3.0.97}/threefive.egg-info/dependency_links.txt +0 -0
- {threefive-3.0.95 → threefive-3.0.97}/threefive.egg-info/entry_points.txt +0 -0
- {threefive-3.0.95 → threefive-3.0.97}/threefive.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: threefive
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.97
|
|
4
4
|
Summary: threefive is The #1 SCTE-35 Decoder and Encoder on the Planet.
|
|
5
5
|
Author-email: AdrianofDoom <spam@iodisco.com>
|
|
6
6
|
License-Expression: Sleepycat
|
|
@@ -17,13 +17,20 @@ Description-Content-Type: text/markdown
|
|
|
17
17
|
License-File: LICENSE
|
|
18
18
|
Dynamic: license-file
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
_A lot of people consider me to be a subject matter expert on SCTE-35,<BR> I see myself more as the undisputed heavy weight champion of SCTE-35._ ~Adrian
|
|
21
|
+
|
|
21
22
|
# [ threefive ]
|
|
22
23
|
|
|
24
|
+
# Over 1.2 Million Installs.
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
23
28
|
* __Decodes SCTE-35__ from `MPEGTS`✔ `Base64`✔ `Bytes`✔ `DASH`✔ `Hex` ✔ `HLS`✔ `Integers`✔ `JSON`✔ `XML`✔ `XML+Binary`✔
|
|
24
29
|
* __Encodes SCTE-35__ to `MPEGTS`✔ `Base64`✔ `Bytes`✔ `Hex`✔ `Integers`✔ `JSON`✔ `XML`✔ `XML+Binary`✔
|
|
30
|
+
|
|
25
31
|
# [ version ]
|
|
26
|
-
|
|
32
|
+
|
|
33
|
+
### __latest is v.3.0.97__
|
|
27
34
|
|
|
28
35
|
|
|
29
36
|
# [ really really quick start ]
|
|
@@ -32,56 +39,90 @@ Dynamic: license-file
|
|
|
32
39
|
```
|
|
33
40
|
python3 -m pip install threefive`
|
|
34
41
|
```
|
|
35
|
-
*
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
42
|
+
* __decoding SCTE-35__
|
|
43
|
+
* __base64__
|
|
44
|
+
* decode __SCTE-35__ as __base64__
|
|
45
|
+
```cobol
|
|
46
|
+
threefive '/DAWAAAAAAAAAP/wBQb+AKmKxwAACzuu2Q=='
|
|
47
|
+
```
|
|
48
|
+
* decode __SCTE-35__ as __base64__ and __convert SCTE-35 to hex__
|
|
49
|
+
```cobol
|
|
50
|
+
threefive '/DAWAAAAAAAAAP/wBQb+AKmKxwAACzuu2Q==' hex
|
|
51
|
+
```
|
|
52
|
+
* __Hex__
|
|
53
|
+
* decode __SCTE-35__ as __hex__
|
|
54
|
+
```cobol
|
|
55
|
+
threefive '0xfc301600000000000000fff00506fe00a98ac700000b3baed9'
|
|
56
|
+
```
|
|
57
|
+
* decode __SCTE-35__ as __hex__ and __convert__ __SCTE-35__ to __xml__
|
|
58
|
+
```cobol
|
|
59
|
+
threefive '0xfc301600000000000000fff00506fe00a98ac700000b3baed9' xml
|
|
60
|
+
```
|
|
61
|
+
* __HLS__
|
|
62
|
+
* decode __SCTE-35__ from __HLS__ ( a rendition or a master.m3u8)
|
|
63
|
+
```cobol
|
|
64
|
+
threefive 'https://demo.unified-streaming.com/k8s/live/scte35.isml/.m3u8'
|
|
65
|
+
```
|
|
66
|
+
* __MPEGTS__
|
|
67
|
+
* decode __SCTE-35__ from __MPEGTS__
|
|
68
|
+
```cobol
|
|
69
|
+
threefive 'https;//iodisco.com/longb2.ts'
|
|
70
|
+
```
|
|
71
|
+
* decode __SCTE-35__ from __MPEGTS__ and __convert__ __SCTE-35__ to __bytes__
|
|
72
|
+
```cobol
|
|
73
|
+
threefive 'https;//iodisco.com/longb2.ts' bytes
|
|
74
|
+
```
|
|
75
|
+
* __Multicast__
|
|
76
|
+
* decode __SCTE-35__ from __MPEGTS__ over __Multicast__
|
|
77
|
+
```cobol
|
|
78
|
+
threefive udp://@235.3.5.35:3535
|
|
79
|
+
```
|
|
80
|
+
|
|
52
81
|
* __threefive does a lot more__, that was just to get you started.
|
|
53
|
-
* RTFM
|
|
54
82
|
___
|
|
55
83
|
|
|
84
|
+
# [ Documentation ]
|
|
56
85
|
|
|
86
|
+
[A Lot of Examples ](https://github.com/superkabuki/threefive_is_scte35/blob/main/examples) | [ Tip of the Week ](totw.md) | [ Cheap Tricks ](cheaptricks.md) |
|
|
57
87
|
|
|
58
88
|
|
|
59
|
-
# [ Documentation ]
|
|
60
89
|
#### Need to inject SCTE-35 into HLS? [X9k3.](https://github.com/superkabuki/x9k3)
|
|
90
|
+
|
|
61
91
|
* [__web based SCTE-35 tools__](#web) - threefive and friends over http.
|
|
92
|
+
|
|
62
93
|
* [__install__](#install)
|
|
94
|
+
|
|
63
95
|
* [__quick start__](quickstart.md)
|
|
96
|
+
|
|
64
97
|
* ___SCTE-35 on the command line___
|
|
65
|
-
* [ __the threefive cli tool__](#-cli-) _If you work with SCTE-35, this is as cool as it gets.
|
|
98
|
+
* [ __the threefive cli tool__](#-cli-) _If you work with SCTE-35, this is as cool as it gets._
|
|
99
|
+
|
|
66
100
|
* __other included tools__
|
|
67
|
-
* [__scte35bump__](#scte35bump) _adjust SCTE-35 PTS in MPEGTS streams_
|
|
68
101
|
* [__scte35fix__](#scte35fix) _ffmpeg changes scte-35 streams into bin data, scte35fix changes them back._
|
|
69
102
|
* [__scte35inject__](scte35inject.md) _scte35inject inject scte-35 into mpegts._
|
|
70
103
|
* [__gums__](#gums) _gums is a multicast sender(server) for video_
|
|
104
|
+
|
|
105
|
+
|
|
71
106
|
* __the threefive library__ _cool code for the cool kids_.
|
|
72
107
|
* [__Using the threefive.Cue class__](lib.md)
|
|
73
108
|
* [__Using the threefive library__](#-using-the-library-) _decode SCTE-35 with less than ten lines of code_
|
|
74
109
|
* * [threefive __Classes__](#classes) _threefive is OO, made to subclass_
|
|
75
110
|
* [__Cue__ Class](https://github.com/superkabuki/threefive/blob/main/cue.md) _this class you'll use often_
|
|
76
111
|
* [__Stream__ Class](https://github.com/superkabuki/threefive/blob/main/stream.md) _this is the class for parsing MPEGTS_
|
|
112
|
+
|
|
77
113
|
* [SCTE-35 __Sidecar Files__](https://github.com/superkabuki/SCTE-35_Sidecar_Files) _threefive supports SCTE-35 sidecar files_
|
|
114
|
+
|
|
78
115
|
* [SCTE-35 __HLS__](https://github.com/superkabuki/threefive/blob/main/hls.md) _parse SCTE-35 in HLS in MPEGTS,CMAF, or fmP4__
|
|
116
|
+
|
|
79
117
|
* [SCTE-35 __XML__ ](https://github.com/superkabuki/SCTE-35/blob/main/xml.md) and [More __XML__](node.md) _threefive can parse and encode SCTE-35 xml_
|
|
118
|
+
|
|
80
119
|
* [__Encode__ SCTE-35](https://github.com/superkabuki/threefive/blob/main/encode.md) _threefive can encode SCTE-35 in every SCTE-35 format_
|
|
120
|
+
|
|
81
121
|
* [Make your __threefive__ script an executable with __cython__](cython.md) _threefive is compatible with all python tools_
|
|
82
122
|
</samp>
|
|
83
123
|
|
|
84
124
|
## [Install]
|
|
125
|
+
|
|
85
126
|
* __threefive__ is curretnly tested on python-3.11, python-3.14, python-3.14t, pypy-7.3.11 and pypy-7.3.22
|
|
86
127
|
|
|
87
128
|
* __threefive__ is some of the __fastest code__ you'll see on __python3__.
|
|
@@ -89,9 +130,6 @@ ___
|
|
|
89
130
|
```rebol
|
|
90
131
|
python3 -mpip install threefive
|
|
91
132
|
```
|
|
92
|
-
|
|
93
|
-
* __threefive__ runs __five times faster on pypy3__,
|
|
94
|
-
* __threefive on pypy3__ can parse __mpegts__ at __over 1.5 GigaBytes__ a second, __single-threaded__.
|
|
95
133
|
* __pypy3 via pip__
|
|
96
134
|
```rebol
|
|
97
135
|
pypy3 -mpip install threefive
|
|
@@ -130,92 +168,105 @@ make install py3=python3.14
|
|
|
130
168
|
___
|
|
131
169
|
|
|
132
170
|
## [ CLI ]
|
|
133
|
-
|
|
134
|
-
* Base64
|
|
135
|
-
* Hex
|
|
136
|
-
* HLS
|
|
137
|
-
* Integers
|
|
138
|
-
* JSON
|
|
139
|
-
* MPEGTS
|
|
140
|
-
* XML
|
|
141
|
-
* XMLBinary.
|
|
142
|
-
|
|
143
|
-
* Formats are auto-detected.
|
|
144
|
-
___
|
|
171
|
+
threefive is designed to be easy to use. I'm not sure that it's served well by a long explaination, so I'm going to try and keep this brief.
|
|
145
172
|
|
|
146
|
-
|
|
147
|
-
* __SCTE-35 Inputs:__ base64, hex, int, JSON,int,xml,and xmlbin.
|
|
148
|
-
* __SCTE-35 Outputs:__ base64, bytes, hex, int,JSON, xml, and xmlbin.
|
|
149
|
-
* __Any Input can be used with Any Output__
|
|
150
|
-
* The __default output__ is JSON
|
|
151
|
-
|
|
152
|
-
> __Here are several examples.__
|
|
153
|
-
|
|
154
|
-
|SCTE-35 Input | SCTE-35 Output | Command |
|
|
155
|
-
|-------|-----------|---------------------------------------------------------|
|
|
156
|
-
|__base64__|__JSON__ | __threefive__ '/DAWAAAAAAAAAP/wBQb+AKmKxwAACzuu2Q==' |
|
|
157
|
-
|__.__|__bytes__ | __threefive__ '/DAWAAAAAAAAAP/wBQb+AKmKxwAACzuu2Q==' __bytes__|
|
|
158
|
-
|__.__|__hex__ | __threefive__ '/DAWAAAAAAAAAP/wBQb+AKmKxwAACzuu2Q==' __hex__|
|
|
159
|
-
|__.__|__xml__ | __threefive__ '/DAWAAAAAAAAAP/wBQb+AKmKxwAACzuu2Q==' __xml__|
|
|
160
|
-
|__hex__ | __JSON__ | __threefive__ 0xfc301600000000000000fff00506fe00a98ac700000b3baed9|
|
|
161
|
-
|__.__ | __base64__ | __threefive__ 0xfc301600000000000000fff00506fe00a98ac700000b3baed9 __base64__ |
|
|
162
|
-
|__.__ | __int__ | __threefive__ 0xfc301600000000000000fff00506fe00a98ac700000b3baed9 __int__ |
|
|
163
|
-
|__.__ | __xmlbin__ | __threefive__ 0xfc301600000000000000fff00506fe00a98ac700000b3baed9 __xmlbin__ |
|
|
164
|
-
| __int__ | __JSON__ | __threefive__ 1583008701074197245727019716796221242036302348025116111908569 |
|
|
165
|
-
|__.__ | __hex__ | __threefive__ 1583008701074197245727019716796221242036302348025116111908569 __hex__ |
|
|
166
|
-
|__.__ | __xml__ | __threefive__ 1583008701074197245727019716796221242036302348025116111908569 __xml__ |
|
|
167
|
-
|__JSON__ |__base64__ | __threefive__ < json.json __base64__ |
|
|
168
|
-
|__.__ |__bytes__ | __threefive__ < json.json __bytes__ |
|
|
169
|
-
|__.__ |__xml__ | __threefive__ < json.json __xml__ |
|
|
170
|
-
|__xml__ |__JSON__ | __threefive__ < xml.xml |
|
|
171
|
-
|__xmlbin__|__int__ | __threefive__ < xmlbin.xml __int__ |
|
|
173
|
+
### The threefive cli tool.
|
|
172
174
|
|
|
173
|
-
|
|
175
|
+
the threefive cli tool decodes SCTE-35, formats are autodetected, and they all work the same way.
|
|
176
|
+
|
|
177
|
+
threefive [media to parse for SCTE-35]
|
|
178
|
+
|
|
179
|
+
examples:
|
|
174
180
|
|
|
175
|
-
*
|
|
176
|
-
```
|
|
177
|
-
threefive
|
|
181
|
+
*
|
|
182
|
+
```sed
|
|
183
|
+
threefive '/DAWAAAAAAAAAP/wBQb+AKmKxwAACzuu2Q=='
|
|
184
|
+
```
|
|
185
|
+
*
|
|
186
|
+
```sed
|
|
187
|
+
threefive 0xfc301600000000000000fff00506fe00a98ac700000b3baed9
|
|
188
|
+
```
|
|
189
|
+
*
|
|
190
|
+
```sed
|
|
191
|
+
threefive 1583008701074197245727019716796221242036302348025116111908569
|
|
192
|
+
```
|
|
193
|
+
*
|
|
194
|
+
```sed
|
|
195
|
+
threefive video.ts
|
|
196
|
+
```
|
|
197
|
+
*
|
|
198
|
+
```sed
|
|
199
|
+
threefive https://demo.unified-streaming.com/k8s/live/scte35.isml/scte35-audio_eng=64000-video=500000.m3u8
|
|
178
200
|
```
|
|
179
|
-
___
|
|
180
201
|
|
|
181
|
-
*
|
|
182
|
-
* SCTE-35 can be parsed from MPEGTS over a variety of protocols.
|
|
183
|
-
* __SCTE-35 Input__: MPEGTS
|
|
184
|
-
* __Protocols__: pipes, files, stdin, http(s), multicast,SRT and UDP.
|
|
185
|
-
* __SCTE-35 Output__: JSON _(default)_ base64, bytes, hex, int, xml, and xmlbin.
|
|
186
|
-
|
|
187
|
-
|SCTE-35 Input | Protocol | SCTE-35 Output | Command |
|
|
188
|
-
|-------|------------|-----------|---------------------------------------------------------|
|
|
189
|
-
|__MPEGTS__|file|__JSON__ | __threefive__ video.ts |
|
|
190
|
-
|__.__|https|__base64__ | __threefive__ https://example.com/video.ts __base64__ |
|
|
191
|
-
|__.__|multicast|__bytes__ | __threefive__ udp://@235.3.5:3535 __bytes__ |
|
|
192
|
-
|__.__|SRT|__hex__ | __threefive__ srt://1.2.3.4:4201 __hex__ |
|
|
193
|
-
|__.__|UDP|__int__ | __threefive__ udp://10.10.10.10:1011 __int__ |
|
|
194
|
-
|__.__|Pipe|__xml__| cat video.ts \| __threefive__ __xml__ |
|
|
195
|
-
|__.__|stdin|__xml+bin__| __threefive__ __xmlbin__ < video.ts|
|
|
202
|
+
* Formats like XML and JSON that may be to large to type on the command line,they can be redirected or piped in to threefive.
|
|
196
203
|
|
|
197
|
-
|
|
204
|
+
* redirect
|
|
205
|
+
```sed
|
|
206
|
+
threefive < xml.xml
|
|
207
|
+
```
|
|
208
|
+
* pipe
|
|
209
|
+
```sed
|
|
210
|
+
cat json.json | threefive
|
|
198
211
|
|
|
212
|
+
```
|
|
213
|
+
### cli outputs and converting SCTE-35 Formats
|
|
199
214
|
|
|
200
|
-
|
|
215
|
+
* the __default output format for threefive is json__
|
|
216
|
+
|
|
217
|
+
* The cli tool can convert from one SCTE-35 format to another using keywords.
|
|
218
|
+
* The keywords are __base64,bytes,hex, int,json,xml, and xmlbin__
|
|
219
|
+
|
|
220
|
+
* some conversion examples
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
* SCTE-35 Base64 to SCTE-35 Hex
|
|
224
|
+
```sed
|
|
225
|
+
threefive '/DAWAAAAAAAAAP/wBQb+AKmKxwAACzuu2Q==' hex
|
|
226
|
+
```
|
|
227
|
+
* SCTE-35 Int to SCTE-35 Xml
|
|
228
|
+
```sed
|
|
229
|
+
threefive 1583008701074197245727019716796221242036302348025116111908569 xml
|
|
230
|
+
```
|
|
231
|
+
* SCTE-35 Hex to SCTE-35 xml+binary
|
|
232
|
+
```sed
|
|
233
|
+
threefive 0xfc301600000000000000fff00506fe00a98ac700000b3baed9 xmlbin
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
### threefive cli and MPEGTS
|
|
237
|
+
* threefive can parse MPEGTS from stdin, local files, HTTP(s), Multicast, SRT, and unicast UDP.
|
|
238
|
+
|
|
239
|
+
* some mpegts examples
|
|
240
|
+
|
|
241
|
+
* local
|
|
242
|
+
```sed
|
|
243
|
+
threefive video.ts
|
|
244
|
+
```
|
|
245
|
+
* stdin
|
|
246
|
+
```sed
|
|
247
|
+
cat video.ts | threefive
|
|
248
|
+
```
|
|
249
|
+
* https
|
|
250
|
+
```sed
|
|
251
|
+
threefive https://iodisco.com/longb2.ts
|
|
252
|
+
```
|
|
253
|
+
* multicast
|
|
254
|
+
```sed
|
|
255
|
+
threefive udp://@235.35.3.5:3535
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### threefive cli MPEGTS outputs
|
|
259
|
+
|
|
260
|
+
* the __default output for MPEGTS is json__
|
|
261
|
+
|
|
262
|
+
* keywords can be used to specify other output formats
|
|
263
|
+
* The keywords are __base64,bytes,hex, int,json,xml, and xmlbin__
|
|
264
|
+
|
|
265
|
+
* An example of mpegts with a keyword
|
|
266
|
+
```
|
|
267
|
+
threefive https://iodisco.com/longb2.ts xml
|
|
268
|
+
```
|
|
201
269
|
|
|
202
|
-
* [__Additional functionality__]
|
|
203
|
-
* threefive has several additional features, mostly related to MPEGTS streams.
|
|
204
|
-
* threefive has built in help, just type `threefive help`
|
|
205
|
-
* This table shows how to use them.
|
|
206
|
-
|
|
207
|
-
| Description | How To Use |
|
|
208
|
-
|------------------------------------------|---------------------------------------------------------|
|
|
209
|
-
| Inject __SCTE35__ packets |threefive __inject__ -i in.video -s sidecar.txt -o out.ts|
|
|
210
|
-
| Show raw __SCTE35__ packets |threefive __packets__ udp://@235.35.3.5:3535 |
|
|
211
|
-
| Copy MPEGTS stream to stdout at realtime speed| threefive __rt__ input.ts | mplayer - |
|
|
212
|
-
| Create __SCTE35__ sidecar file |threefive __sidecar__ video.ts |
|
|
213
|
-
| Show streams in mpegts stream | threefive __show__ https://example.com/video.ts |
|
|
214
|
-
| Show __iframes__ in mpegts stream |threefive __iframes__ srt://10.10.1.3:9000 |
|
|
215
|
-
| Show __PTS__ values from mpegts stream | threefive __pts__ udp://192.168.1.10:9000 |
|
|
216
|
-
|__Proxy__ the __mpegts__ stream to stdout |threefive __proxy__ https://wexample.com/video.ts |
|
|
217
|
-
| | |
|
|
218
|
-
| | |
|
|
219
270
|
|
|
220
271
|
___
|
|
221
272
|
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
_A lot of people consider me to be a subject matter expert on SCTE-35,<BR> I see myself more as the undisputed heavy weight champion of SCTE-35._ ~Adrian
|
|
2
|
+
|
|
2
3
|
# [ threefive ]
|
|
3
4
|
|
|
5
|
+
# Over 1.2 Million Installs.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
4
9
|
* __Decodes SCTE-35__ from `MPEGTS`✔ `Base64`✔ `Bytes`✔ `DASH`✔ `Hex` ✔ `HLS`✔ `Integers`✔ `JSON`✔ `XML`✔ `XML+Binary`✔
|
|
5
10
|
* __Encodes SCTE-35__ to `MPEGTS`✔ `Base64`✔ `Bytes`✔ `Hex`✔ `Integers`✔ `JSON`✔ `XML`✔ `XML+Binary`✔
|
|
11
|
+
|
|
6
12
|
# [ version ]
|
|
7
|
-
|
|
13
|
+
|
|
14
|
+
### __latest is v.3.0.97__
|
|
8
15
|
|
|
9
16
|
|
|
10
17
|
# [ really really quick start ]
|
|
@@ -13,56 +20,90 @@
|
|
|
13
20
|
```
|
|
14
21
|
python3 -m pip install threefive`
|
|
15
22
|
```
|
|
16
|
-
*
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
* __decoding SCTE-35__
|
|
24
|
+
* __base64__
|
|
25
|
+
* decode __SCTE-35__ as __base64__
|
|
26
|
+
```cobol
|
|
27
|
+
threefive '/DAWAAAAAAAAAP/wBQb+AKmKxwAACzuu2Q=='
|
|
28
|
+
```
|
|
29
|
+
* decode __SCTE-35__ as __base64__ and __convert SCTE-35 to hex__
|
|
30
|
+
```cobol
|
|
31
|
+
threefive '/DAWAAAAAAAAAP/wBQb+AKmKxwAACzuu2Q==' hex
|
|
32
|
+
```
|
|
33
|
+
* __Hex__
|
|
34
|
+
* decode __SCTE-35__ as __hex__
|
|
35
|
+
```cobol
|
|
36
|
+
threefive '0xfc301600000000000000fff00506fe00a98ac700000b3baed9'
|
|
37
|
+
```
|
|
38
|
+
* decode __SCTE-35__ as __hex__ and __convert__ __SCTE-35__ to __xml__
|
|
39
|
+
```cobol
|
|
40
|
+
threefive '0xfc301600000000000000fff00506fe00a98ac700000b3baed9' xml
|
|
41
|
+
```
|
|
42
|
+
* __HLS__
|
|
43
|
+
* decode __SCTE-35__ from __HLS__ ( a rendition or a master.m3u8)
|
|
44
|
+
```cobol
|
|
45
|
+
threefive 'https://demo.unified-streaming.com/k8s/live/scte35.isml/.m3u8'
|
|
46
|
+
```
|
|
47
|
+
* __MPEGTS__
|
|
48
|
+
* decode __SCTE-35__ from __MPEGTS__
|
|
49
|
+
```cobol
|
|
50
|
+
threefive 'https;//iodisco.com/longb2.ts'
|
|
51
|
+
```
|
|
52
|
+
* decode __SCTE-35__ from __MPEGTS__ and __convert__ __SCTE-35__ to __bytes__
|
|
53
|
+
```cobol
|
|
54
|
+
threefive 'https;//iodisco.com/longb2.ts' bytes
|
|
55
|
+
```
|
|
56
|
+
* __Multicast__
|
|
57
|
+
* decode __SCTE-35__ from __MPEGTS__ over __Multicast__
|
|
58
|
+
```cobol
|
|
59
|
+
threefive udp://@235.3.5.35:3535
|
|
60
|
+
```
|
|
61
|
+
|
|
33
62
|
* __threefive does a lot more__, that was just to get you started.
|
|
34
|
-
* RTFM
|
|
35
63
|
___
|
|
36
64
|
|
|
65
|
+
# [ Documentation ]
|
|
37
66
|
|
|
67
|
+
[A Lot of Examples ](https://github.com/superkabuki/threefive_is_scte35/blob/main/examples) | [ Tip of the Week ](totw.md) | [ Cheap Tricks ](cheaptricks.md) |
|
|
38
68
|
|
|
39
69
|
|
|
40
|
-
# [ Documentation ]
|
|
41
70
|
#### Need to inject SCTE-35 into HLS? [X9k3.](https://github.com/superkabuki/x9k3)
|
|
71
|
+
|
|
42
72
|
* [__web based SCTE-35 tools__](#web) - threefive and friends over http.
|
|
73
|
+
|
|
43
74
|
* [__install__](#install)
|
|
75
|
+
|
|
44
76
|
* [__quick start__](quickstart.md)
|
|
77
|
+
|
|
45
78
|
* ___SCTE-35 on the command line___
|
|
46
|
-
* [ __the threefive cli tool__](#-cli-) _If you work with SCTE-35, this is as cool as it gets.
|
|
79
|
+
* [ __the threefive cli tool__](#-cli-) _If you work with SCTE-35, this is as cool as it gets._
|
|
80
|
+
|
|
47
81
|
* __other included tools__
|
|
48
|
-
* [__scte35bump__](#scte35bump) _adjust SCTE-35 PTS in MPEGTS streams_
|
|
49
82
|
* [__scte35fix__](#scte35fix) _ffmpeg changes scte-35 streams into bin data, scte35fix changes them back._
|
|
50
83
|
* [__scte35inject__](scte35inject.md) _scte35inject inject scte-35 into mpegts._
|
|
51
84
|
* [__gums__](#gums) _gums is a multicast sender(server) for video_
|
|
85
|
+
|
|
86
|
+
|
|
52
87
|
* __the threefive library__ _cool code for the cool kids_.
|
|
53
88
|
* [__Using the threefive.Cue class__](lib.md)
|
|
54
89
|
* [__Using the threefive library__](#-using-the-library-) _decode SCTE-35 with less than ten lines of code_
|
|
55
90
|
* * [threefive __Classes__](#classes) _threefive is OO, made to subclass_
|
|
56
91
|
* [__Cue__ Class](https://github.com/superkabuki/threefive/blob/main/cue.md) _this class you'll use often_
|
|
57
92
|
* [__Stream__ Class](https://github.com/superkabuki/threefive/blob/main/stream.md) _this is the class for parsing MPEGTS_
|
|
93
|
+
|
|
58
94
|
* [SCTE-35 __Sidecar Files__](https://github.com/superkabuki/SCTE-35_Sidecar_Files) _threefive supports SCTE-35 sidecar files_
|
|
95
|
+
|
|
59
96
|
* [SCTE-35 __HLS__](https://github.com/superkabuki/threefive/blob/main/hls.md) _parse SCTE-35 in HLS in MPEGTS,CMAF, or fmP4__
|
|
97
|
+
|
|
60
98
|
* [SCTE-35 __XML__ ](https://github.com/superkabuki/SCTE-35/blob/main/xml.md) and [More __XML__](node.md) _threefive can parse and encode SCTE-35 xml_
|
|
99
|
+
|
|
61
100
|
* [__Encode__ SCTE-35](https://github.com/superkabuki/threefive/blob/main/encode.md) _threefive can encode SCTE-35 in every SCTE-35 format_
|
|
101
|
+
|
|
62
102
|
* [Make your __threefive__ script an executable with __cython__](cython.md) _threefive is compatible with all python tools_
|
|
63
103
|
</samp>
|
|
64
104
|
|
|
65
105
|
## [Install]
|
|
106
|
+
|
|
66
107
|
* __threefive__ is curretnly tested on python-3.11, python-3.14, python-3.14t, pypy-7.3.11 and pypy-7.3.22
|
|
67
108
|
|
|
68
109
|
* __threefive__ is some of the __fastest code__ you'll see on __python3__.
|
|
@@ -70,9 +111,6 @@ ___
|
|
|
70
111
|
```rebol
|
|
71
112
|
python3 -mpip install threefive
|
|
72
113
|
```
|
|
73
|
-
|
|
74
|
-
* __threefive__ runs __five times faster on pypy3__,
|
|
75
|
-
* __threefive on pypy3__ can parse __mpegts__ at __over 1.5 GigaBytes__ a second, __single-threaded__.
|
|
76
114
|
* __pypy3 via pip__
|
|
77
115
|
```rebol
|
|
78
116
|
pypy3 -mpip install threefive
|
|
@@ -111,92 +149,105 @@ make install py3=python3.14
|
|
|
111
149
|
___
|
|
112
150
|
|
|
113
151
|
## [ CLI ]
|
|
114
|
-
|
|
115
|
-
* Base64
|
|
116
|
-
* Hex
|
|
117
|
-
* HLS
|
|
118
|
-
* Integers
|
|
119
|
-
* JSON
|
|
120
|
-
* MPEGTS
|
|
121
|
-
* XML
|
|
122
|
-
* XMLBinary.
|
|
123
|
-
|
|
124
|
-
* Formats are auto-detected.
|
|
125
|
-
___
|
|
152
|
+
threefive is designed to be easy to use. I'm not sure that it's served well by a long explaination, so I'm going to try and keep this brief.
|
|
126
153
|
|
|
127
|
-
|
|
128
|
-
* __SCTE-35 Inputs:__ base64, hex, int, JSON,int,xml,and xmlbin.
|
|
129
|
-
* __SCTE-35 Outputs:__ base64, bytes, hex, int,JSON, xml, and xmlbin.
|
|
130
|
-
* __Any Input can be used with Any Output__
|
|
131
|
-
* The __default output__ is JSON
|
|
132
|
-
|
|
133
|
-
> __Here are several examples.__
|
|
134
|
-
|
|
135
|
-
|SCTE-35 Input | SCTE-35 Output | Command |
|
|
136
|
-
|-------|-----------|---------------------------------------------------------|
|
|
137
|
-
|__base64__|__JSON__ | __threefive__ '/DAWAAAAAAAAAP/wBQb+AKmKxwAACzuu2Q==' |
|
|
138
|
-
|__.__|__bytes__ | __threefive__ '/DAWAAAAAAAAAP/wBQb+AKmKxwAACzuu2Q==' __bytes__|
|
|
139
|
-
|__.__|__hex__ | __threefive__ '/DAWAAAAAAAAAP/wBQb+AKmKxwAACzuu2Q==' __hex__|
|
|
140
|
-
|__.__|__xml__ | __threefive__ '/DAWAAAAAAAAAP/wBQb+AKmKxwAACzuu2Q==' __xml__|
|
|
141
|
-
|__hex__ | __JSON__ | __threefive__ 0xfc301600000000000000fff00506fe00a98ac700000b3baed9|
|
|
142
|
-
|__.__ | __base64__ | __threefive__ 0xfc301600000000000000fff00506fe00a98ac700000b3baed9 __base64__ |
|
|
143
|
-
|__.__ | __int__ | __threefive__ 0xfc301600000000000000fff00506fe00a98ac700000b3baed9 __int__ |
|
|
144
|
-
|__.__ | __xmlbin__ | __threefive__ 0xfc301600000000000000fff00506fe00a98ac700000b3baed9 __xmlbin__ |
|
|
145
|
-
| __int__ | __JSON__ | __threefive__ 1583008701074197245727019716796221242036302348025116111908569 |
|
|
146
|
-
|__.__ | __hex__ | __threefive__ 1583008701074197245727019716796221242036302348025116111908569 __hex__ |
|
|
147
|
-
|__.__ | __xml__ | __threefive__ 1583008701074197245727019716796221242036302348025116111908569 __xml__ |
|
|
148
|
-
|__JSON__ |__base64__ | __threefive__ < json.json __base64__ |
|
|
149
|
-
|__.__ |__bytes__ | __threefive__ < json.json __bytes__ |
|
|
150
|
-
|__.__ |__xml__ | __threefive__ < json.json __xml__ |
|
|
151
|
-
|__xml__ |__JSON__ | __threefive__ < xml.xml |
|
|
152
|
-
|__xmlbin__|__int__ | __threefive__ < xmlbin.xml __int__ |
|
|
154
|
+
### The threefive cli tool.
|
|
153
155
|
|
|
154
|
-
|
|
156
|
+
the threefive cli tool decodes SCTE-35, formats are autodetected, and they all work the same way.
|
|
157
|
+
|
|
158
|
+
threefive [media to parse for SCTE-35]
|
|
159
|
+
|
|
160
|
+
examples:
|
|
155
161
|
|
|
156
|
-
*
|
|
157
|
-
```
|
|
158
|
-
threefive
|
|
162
|
+
*
|
|
163
|
+
```sed
|
|
164
|
+
threefive '/DAWAAAAAAAAAP/wBQb+AKmKxwAACzuu2Q=='
|
|
165
|
+
```
|
|
166
|
+
*
|
|
167
|
+
```sed
|
|
168
|
+
threefive 0xfc301600000000000000fff00506fe00a98ac700000b3baed9
|
|
169
|
+
```
|
|
170
|
+
*
|
|
171
|
+
```sed
|
|
172
|
+
threefive 1583008701074197245727019716796221242036302348025116111908569
|
|
173
|
+
```
|
|
174
|
+
*
|
|
175
|
+
```sed
|
|
176
|
+
threefive video.ts
|
|
177
|
+
```
|
|
178
|
+
*
|
|
179
|
+
```sed
|
|
180
|
+
threefive https://demo.unified-streaming.com/k8s/live/scte35.isml/scte35-audio_eng=64000-video=500000.m3u8
|
|
159
181
|
```
|
|
160
|
-
___
|
|
161
182
|
|
|
162
|
-
*
|
|
163
|
-
* SCTE-35 can be parsed from MPEGTS over a variety of protocols.
|
|
164
|
-
* __SCTE-35 Input__: MPEGTS
|
|
165
|
-
* __Protocols__: pipes, files, stdin, http(s), multicast,SRT and UDP.
|
|
166
|
-
* __SCTE-35 Output__: JSON _(default)_ base64, bytes, hex, int, xml, and xmlbin.
|
|
167
|
-
|
|
168
|
-
|SCTE-35 Input | Protocol | SCTE-35 Output | Command |
|
|
169
|
-
|-------|------------|-----------|---------------------------------------------------------|
|
|
170
|
-
|__MPEGTS__|file|__JSON__ | __threefive__ video.ts |
|
|
171
|
-
|__.__|https|__base64__ | __threefive__ https://example.com/video.ts __base64__ |
|
|
172
|
-
|__.__|multicast|__bytes__ | __threefive__ udp://@235.3.5:3535 __bytes__ |
|
|
173
|
-
|__.__|SRT|__hex__ | __threefive__ srt://1.2.3.4:4201 __hex__ |
|
|
174
|
-
|__.__|UDP|__int__ | __threefive__ udp://10.10.10.10:1011 __int__ |
|
|
175
|
-
|__.__|Pipe|__xml__| cat video.ts \| __threefive__ __xml__ |
|
|
176
|
-
|__.__|stdin|__xml+bin__| __threefive__ __xmlbin__ < video.ts|
|
|
183
|
+
* Formats like XML and JSON that may be to large to type on the command line,they can be redirected or piped in to threefive.
|
|
177
184
|
|
|
178
|
-
|
|
185
|
+
* redirect
|
|
186
|
+
```sed
|
|
187
|
+
threefive < xml.xml
|
|
188
|
+
```
|
|
189
|
+
* pipe
|
|
190
|
+
```sed
|
|
191
|
+
cat json.json | threefive
|
|
179
192
|
|
|
193
|
+
```
|
|
194
|
+
### cli outputs and converting SCTE-35 Formats
|
|
180
195
|
|
|
181
|
-
|
|
196
|
+
* the __default output format for threefive is json__
|
|
197
|
+
|
|
198
|
+
* The cli tool can convert from one SCTE-35 format to another using keywords.
|
|
199
|
+
* The keywords are __base64,bytes,hex, int,json,xml, and xmlbin__
|
|
200
|
+
|
|
201
|
+
* some conversion examples
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
* SCTE-35 Base64 to SCTE-35 Hex
|
|
205
|
+
```sed
|
|
206
|
+
threefive '/DAWAAAAAAAAAP/wBQb+AKmKxwAACzuu2Q==' hex
|
|
207
|
+
```
|
|
208
|
+
* SCTE-35 Int to SCTE-35 Xml
|
|
209
|
+
```sed
|
|
210
|
+
threefive 1583008701074197245727019716796221242036302348025116111908569 xml
|
|
211
|
+
```
|
|
212
|
+
* SCTE-35 Hex to SCTE-35 xml+binary
|
|
213
|
+
```sed
|
|
214
|
+
threefive 0xfc301600000000000000fff00506fe00a98ac700000b3baed9 xmlbin
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### threefive cli and MPEGTS
|
|
218
|
+
* threefive can parse MPEGTS from stdin, local files, HTTP(s), Multicast, SRT, and unicast UDP.
|
|
219
|
+
|
|
220
|
+
* some mpegts examples
|
|
221
|
+
|
|
222
|
+
* local
|
|
223
|
+
```sed
|
|
224
|
+
threefive video.ts
|
|
225
|
+
```
|
|
226
|
+
* stdin
|
|
227
|
+
```sed
|
|
228
|
+
cat video.ts | threefive
|
|
229
|
+
```
|
|
230
|
+
* https
|
|
231
|
+
```sed
|
|
232
|
+
threefive https://iodisco.com/longb2.ts
|
|
233
|
+
```
|
|
234
|
+
* multicast
|
|
235
|
+
```sed
|
|
236
|
+
threefive udp://@235.35.3.5:3535
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
### threefive cli MPEGTS outputs
|
|
240
|
+
|
|
241
|
+
* the __default output for MPEGTS is json__
|
|
242
|
+
|
|
243
|
+
* keywords can be used to specify other output formats
|
|
244
|
+
* The keywords are __base64,bytes,hex, int,json,xml, and xmlbin__
|
|
245
|
+
|
|
246
|
+
* An example of mpegts with a keyword
|
|
247
|
+
```
|
|
248
|
+
threefive https://iodisco.com/longb2.ts xml
|
|
249
|
+
```
|
|
182
250
|
|
|
183
|
-
* [__Additional functionality__]
|
|
184
|
-
* threefive has several additional features, mostly related to MPEGTS streams.
|
|
185
|
-
* threefive has built in help, just type `threefive help`
|
|
186
|
-
* This table shows how to use them.
|
|
187
|
-
|
|
188
|
-
| Description | How To Use |
|
|
189
|
-
|------------------------------------------|---------------------------------------------------------|
|
|
190
|
-
| Inject __SCTE35__ packets |threefive __inject__ -i in.video -s sidecar.txt -o out.ts|
|
|
191
|
-
| Show raw __SCTE35__ packets |threefive __packets__ udp://@235.35.3.5:3535 |
|
|
192
|
-
| Copy MPEGTS stream to stdout at realtime speed| threefive __rt__ input.ts | mplayer - |
|
|
193
|
-
| Create __SCTE35__ sidecar file |threefive __sidecar__ video.ts |
|
|
194
|
-
| Show streams in mpegts stream | threefive __show__ https://example.com/video.ts |
|
|
195
|
-
| Show __iframes__ in mpegts stream |threefive __iframes__ srt://10.10.1.3:9000 |
|
|
196
|
-
| Show __PTS__ values from mpegts stream | threefive __pts__ udp://192.168.1.10:9000 |
|
|
197
|
-
|__Proxy__ the __mpegts__ stream to stdout |threefive __proxy__ https://wexample.com/video.ts |
|
|
198
|
-
| | |
|
|
199
|
-
| | |
|
|
200
251
|
|
|
201
252
|
___
|
|
202
253
|
|