threefive3 3.0.11__tar.gz → 3.0.13__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.11/threefive3.egg-info → threefive3-3.0.13}/PKG-INFO +58 -76
- {threefive3-3.0.11 → threefive3-3.0.13}/README.md +57 -75
- {threefive3-3.0.11 → threefive3-3.0.13}/bin/threefive3 +1 -1
- {threefive3-3.0.11 → threefive3-3.0.13}/threefive3/bitn.py +3 -0
- {threefive3-3.0.11 → threefive3-3.0.13}/threefive3/hls.py +9 -7
- {threefive3-3.0.11 → threefive3-3.0.13}/threefive3/iframes.py +1 -1
- {threefive3-3.0.11 → threefive3-3.0.13}/threefive3/segment.py +5 -3
- {threefive3-3.0.11 → threefive3-3.0.13}/threefive3/stream.py +13 -20
- {threefive3-3.0.11 → threefive3-3.0.13}/threefive3/version.py +1 -1
- {threefive3-3.0.11 → threefive3-3.0.13/threefive3.egg-info}/PKG-INFO +58 -76
- {threefive3-3.0.11 → threefive3-3.0.13}/LICENSE +0 -0
- {threefive3-3.0.11 → threefive3-3.0.13}/setup.cfg +0 -0
- {threefive3-3.0.11 → threefive3-3.0.13}/setup.py +0 -0
- {threefive3-3.0.11 → threefive3-3.0.13}/threefive3/__init__.py +0 -0
- {threefive3-3.0.11 → threefive3-3.0.13}/threefive3/base.py +0 -0
- {threefive3-3.0.11 → threefive3-3.0.13}/threefive3/commands.py +0 -0
- {threefive3-3.0.11 → threefive3-3.0.13}/threefive3/crc.py +0 -0
- {threefive3-3.0.11 → threefive3-3.0.13}/threefive3/cue.py +0 -0
- {threefive3-3.0.11 → threefive3-3.0.13}/threefive3/descriptors.py +0 -0
- {threefive3-3.0.11 → threefive3-3.0.13}/threefive3/new_reader.py +0 -0
- {threefive3-3.0.11 → threefive3-3.0.13}/threefive3/packetdata.py +0 -0
- {threefive3-3.0.11 → threefive3-3.0.13}/threefive3/section.py +0 -0
- {threefive3-3.0.11 → threefive3-3.0.13}/threefive3/segmentation.py +0 -0
- {threefive3-3.0.11 → threefive3-3.0.13}/threefive3/sixfix.py +0 -0
- {threefive3-3.0.11 → threefive3-3.0.13}/threefive3/spare.py +0 -0
- {threefive3-3.0.11 → threefive3-3.0.13}/threefive3/streamtypes.py +0 -0
- {threefive3-3.0.11 → threefive3-3.0.13}/threefive3/sxp.py +0 -0
- {threefive3-3.0.11 → threefive3-3.0.13}/threefive3/upids.py +0 -0
- {threefive3-3.0.11 → threefive3-3.0.13}/threefive3/x2c.py +0 -0
- {threefive3-3.0.11 → threefive3-3.0.13}/threefive3/xml.py +0 -0
- {threefive3-3.0.11 → threefive3-3.0.13}/threefive3.egg-info/SOURCES.txt +0 -0
- {threefive3-3.0.11 → threefive3-3.0.13}/threefive3.egg-info/dependency_links.txt +0 -0
- {threefive3-3.0.11 → threefive3-3.0.13}/threefive3.egg-info/requires.txt +0 -0
- {threefive3-3.0.11 → threefive3-3.0.13}/threefive3.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: threefive3
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.13
|
|
4
4
|
Summary: threefive continued.
|
|
5
5
|
Home-page: https://github.com/superkabuki/scte35
|
|
6
6
|
Author: Adrian of Doom
|
|
@@ -22,76 +22,52 @@ Requires-Dist: m3ufu>=0.0.89
|
|
|
22
22
|
Requires-Dist: sideways>=0.0.23
|
|
23
23
|
Requires-Dist: pyaes
|
|
24
24
|
|
|
25
|
-
[Cue Class
|
|
25
|
+
[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)
|
|
26
26
|
|
|
27
|
-

|
|
28
27
|
|
|
29
|
-
#
|
|
28
|
+
# threefive3
|
|
29
|
+
SCTE-35 Parser ✅
|
|
30
|
+
SCTE-35 Encoder ✅
|
|
31
|
+
SCTE-35 HLS ✅
|
|
32
|
+
SCTE-35 Xml ✅
|
|
33
|
+
SCTE-35 Cli ✅
|
|
34
|
+
SCTE-35 library ✅
|
|
35
|
+
<br>
|
|
36
|
+
<br>
|
|
37
|
+
# What people are saying about threefive3:
|
|
30
38
|
|
|
31
|
-
|
|
32
|
-
#### Use like this
|
|
33
|
-
```js
|
|
34
|
-
threefive3 hls https://example.com/master.m3u8
|
|
35
|
-
or
|
|
36
|
-
threefive3 hls help
|
|
37
|
-
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
# Why threefive3, why not just threefive?
|
|
39
|
+
<br>
|
|
41
40
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
41
|
+
_I was satisfied with everything, only a linear entrance of.... there was a bomb with him._ ~ __Suzy in Swanee__
|
|
42
|
+
<br>
|
|
43
|
+
___
|
|
44
|
+
_A little bigger than i thought, but lighter._ ~ __Bob in Buford__
|
|
45
|
+
<br>
|
|
46
|
+
___
|
|
47
|
+
_Class! I choked very much, took it for the dacha, as an easily transported option, the sound was just hurt! And generally listen to music. Perfectly pumps speakers from ancient muses. Center Sony! Without distortion, background noise, detailed sound. In short, who does not need highend much, so I recommend it!_
|
|
48
|
+
~ __Larry in Lawrenceville__
|
|
49
|
+
<br>
|
|
50
|
+
___
|
|
51
|
+
_It's good, it's good. It's good. It's good. It's good. It's good. It's good. It's good. It's good. It's good_
|
|
52
|
+
~ __Connie in Columbia__
|
|
53
|
+
<br>
|
|
54
|
+
___
|
|
50
55
|
|
|
51
|
-
|
|
52
|
-
|
|
56
|
+
# FAQ
|
|
57
|
+
* Q. What is the latest version?
|
|
53
58
|
|
|
59
|
+
* A. `v3.0.13`
|
|
60
|
+
---
|
|
61
|
+
* Q. How do I upgrade my code from threefive to the __more powerful super advanced threefive3?__
|
|
54
62
|
|
|
55
|
-
|
|
56
|
-
> Despite making a lot of changes, the api remains. threefive3 is pretty much a drop in replacement for threefive. I used sed to upgrade my code.
|
|
63
|
+
* A. `sed.`
|
|
57
64
|
```js
|
|
58
65
|
sed -i 's/threefive/threefive3/g'
|
|
59
66
|
```
|
|
60
|
-
> One thing to note, calling load or decode is no longer necessary for the Cue class, however, the methods are there in case you do call them.
|
|
61
|
-
>
|
|
62
|
-
>
|
|
63
|
-
# Is threefive3 faster than threefive?
|
|
64
|
-
### `threefive` vs. `threefive3` vs. `threefive3 next release`
|
|
65
|
-
#
|
|
66
|
-

|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
* _testing was done on a beatup chrome book reporting 5GB of RAM running Debian Sid and PyPy 7.3.11_
|
|
72
|
-
|
|
73
67
|
---
|
|
68
|
+
* Q. Does threefive3 have super cool new features?
|
|
74
69
|
|
|
75
|
-
|
|
76
|
-
* This is super cool.
|
|
77
|
-
* Does not generate Fatal errors, it won't break your process.
|
|
78
|
-
* Displays what is in error and how to correct it.
|
|
79
|
-
* Works in the cli
|
|
80
|
-
* Works in code.
|
|
81
|
-

|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
# Issues and Bugs.
|
|
85
|
-
* If you think you have a bug, I'll quickly fix it, but first I need you to prove it to me. __Show me the entire error message, the code you're running, and if the SCTE-35 is in video, the video stream__. You think your stream has proprietary data, we call those UPIDS. I am not going to spend my time trying to guess what your issue might be because you don't trust me.
|
|
86
|
-
* Why am I being such a dick about this? Because nine out of ten issues opened are not bugs at all or even related to threefive3. Most of them are SCTE-35 questions.
|
|
87
|
-
* I am not here to tutor you on SCTE-35. I do not work for SCTE.
|
|
88
|
-
---
|
|
89
|
-
# Special Request and Contract Work.
|
|
90
|
-
* If need some work done, this is what I do for a living, you can hire me, it's usually a month or two wait before I have an opening.
|
|
91
|
-
* SCTE-35 is not easy to learn, there is over 1000 pages of specs you really need understand. ISO 13818,RFC 4326, SCTE-30,SCTE-35, SCTE-67, SCTE-104, SCTE-214, HLS, DAS and few others.
|
|
92
|
-
* It reminds me of DNS or Sendmail configurations. It's a lot turn learn, but once you get things setup, you can pretty forget about it.
|
|
93
|
-
* I know SCTE-35 really really well. It's all I've for the last five years. I'm probably not the best SCTE-35 guy, but I'm the top ten, if not the top five.
|
|
94
|
-
* If you want to discuss your project open an issue and I'll send you my contact info.
|
|
70
|
+
* A. `Yes.`
|
|
95
71
|
---
|
|
96
72
|
|
|
97
73
|
# `Install`
|
|
@@ -112,11 +88,10 @@ make install
|
|
|
112
88
|
___
|
|
113
89
|
|
|
114
90
|
# `The Cli tool`
|
|
115
|
-
> The cli
|
|
91
|
+
> The cli polls stdin and that allows it to autodetect the SCTE-35 format as well as MPEGTS steams. Now every SCTE-35 data format, except hls, is autodetected on the commandline, as well as stdin.<br>HLS requires the `hls` ketyword.
|
|
116
92
|
|
|
117
93
|
### The cli tool installs automatically with pip or the Makefile.
|
|
118
94
|
|
|
119
|
-
|
|
120
95
|
* [__SCTE-35 Inputs__](#inputs)
|
|
121
96
|
* [__SCTE-35 Outputs__](#outputs)
|
|
122
97
|
* [Parse __MPEGTS__ streams for __SCTE-35__](#streams)
|
|
@@ -125,7 +100,6 @@ ___
|
|
|
125
100
|
* [Display raw __SCTE-35 packets__ from __video streams__](#packets)
|
|
126
101
|
* [__Repair SCTE-35 streams__ changed to __bin data__ by __ffmpeg__](#sixfix)
|
|
127
102
|
|
|
128
|
-
|
|
129
103
|
# `Inputs`
|
|
130
104
|
|
|
131
105
|
* Most __inputs__ are __auto-detected.__
|
|
@@ -140,9 +114,9 @@ ___
|
|
|
140
114
|
| __HLS__ |`threefive3 hls https://example.com/master.m3u8` |
|
|
141
115
|
| __JSON__ |`threefive3 < json.json` |
|
|
142
116
|
| __Xml__ | `threefive3 < xml.xml` |
|
|
143
|
-
| __Xmlbin__ | `threefive3 < xmlbin.xml` |
|
|
117
|
+
| __Xmlbin__ | `js threefive3 < xmlbin.xml` |
|
|
144
118
|
|
|
145
|
-
# Streams
|
|
119
|
+
# `Streams`
|
|
146
120
|
|
|
147
121
|
|Protocol | Cli Example |
|
|
148
122
|
|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
@@ -174,56 +148,64 @@ ___
|
|
|
174
148
|
|
|
175
149
|
### `hls`
|
|
176
150
|
* parse hls manifests and segments for SCTE-35
|
|
177
|
-
```
|
|
151
|
+
```smalltalk
|
|
178
152
|
threefive3 hls https://example.com/master.m3u8
|
|
179
153
|
```
|
|
180
154
|
___
|
|
181
155
|
### `Iframes`
|
|
182
156
|
* Show iframes PTS in an MPEGTS video
|
|
183
|
-
|
|
157
|
+
|
|
158
|
+
```smalltalk
|
|
184
159
|
threefive3 iframes https://example.com/video.ts
|
|
185
160
|
```
|
|
186
161
|
___
|
|
187
162
|
### `packets`
|
|
188
163
|
* Print raw SCTE-35 packets from multicast mpegts video
|
|
189
|
-
|
|
164
|
+
|
|
165
|
+
```smalltalk
|
|
190
166
|
threefive3 packets udp://@235.35.3.5:3535
|
|
191
167
|
```
|
|
192
168
|
___
|
|
193
169
|
### `proxy`
|
|
194
170
|
* Parse a https stream and write raw video to stdout
|
|
195
|
-
|
|
171
|
+
|
|
172
|
+
```smalltalk
|
|
196
173
|
threefive3 proxy video.ts
|
|
197
174
|
```
|
|
198
175
|
___
|
|
199
176
|
### `pts`
|
|
200
177
|
* Print PTS from mpegts video
|
|
201
|
-
|
|
202
|
-
|
|
178
|
+
|
|
179
|
+
```smalltalk
|
|
180
|
+
threefive3 pts video.ts
|
|
203
181
|
```
|
|
204
182
|
___
|
|
205
183
|
### `sidecar`
|
|
206
184
|
* Parse a stream, write pts,write SCTE-35 Cues to sidecar.txt
|
|
207
|
-
|
|
208
|
-
|
|
185
|
+
|
|
186
|
+
```smalltalk
|
|
187
|
+
threefive3 sidecar video.ts
|
|
209
188
|
```
|
|
210
189
|
___
|
|
211
190
|
### `sixfix`
|
|
212
191
|
* Fix SCTE-35 data mangled by ffmpeg
|
|
213
|
-
|
|
214
|
-
|
|
192
|
+
|
|
193
|
+
```smalltalk
|
|
194
|
+
threefive3 sixfix video.ts
|
|
215
195
|
```
|
|
216
196
|
___
|
|
217
197
|
### `show`
|
|
218
198
|
|
|
219
199
|
* Probe mpegts video _( kind of like ffprobe )_
|
|
220
|
-
|
|
200
|
+
|
|
201
|
+
```smalltalk
|
|
221
202
|
threefive3 show video.ts
|
|
222
203
|
```
|
|
223
204
|
___
|
|
224
205
|
### `version`
|
|
225
206
|
* Show version
|
|
226
|
-
|
|
207
|
+
|
|
208
|
+
```smalltalk
|
|
227
209
|
threefive3 version
|
|
228
210
|
```
|
|
229
211
|
___
|
|
@@ -1,73 +1,49 @@
|
|
|
1
|
-
[Cue Class
|
|
1
|
+
[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)
|
|
2
2
|
|
|
3
|
-

|
|
4
3
|
|
|
5
|
-
#
|
|
4
|
+
# threefive3
|
|
5
|
+
SCTE-35 Parser ✅
|
|
6
|
+
SCTE-35 Encoder ✅
|
|
7
|
+
SCTE-35 HLS ✅
|
|
8
|
+
SCTE-35 Xml ✅
|
|
9
|
+
SCTE-35 Cli ✅
|
|
10
|
+
SCTE-35 library ✅
|
|
11
|
+
<br>
|
|
12
|
+
<br>
|
|
13
|
+
# What people are saying about threefive3:
|
|
6
14
|
|
|
7
|
-
|
|
8
|
-
#### Use like this
|
|
9
|
-
```js
|
|
10
|
-
threefive3 hls https://example.com/master.m3u8
|
|
11
|
-
or
|
|
12
|
-
threefive3 hls help
|
|
13
|
-
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
# Why threefive3, why not just threefive?
|
|
15
|
+
<br>
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
_I was satisfied with everything, only a linear entrance of.... there was a bomb with him._ ~ __Suzy in Swanee__
|
|
18
|
+
<br>
|
|
19
|
+
___
|
|
20
|
+
_A little bigger than i thought, but lighter._ ~ __Bob in Buford__
|
|
21
|
+
<br>
|
|
22
|
+
___
|
|
23
|
+
_Class! I choked very much, took it for the dacha, as an easily transported option, the sound was just hurt! And generally listen to music. Perfectly pumps speakers from ancient muses. Center Sony! Without distortion, background noise, detailed sound. In short, who does not need highend much, so I recommend it!_
|
|
24
|
+
~ __Larry in Lawrenceville__
|
|
25
|
+
<br>
|
|
26
|
+
___
|
|
27
|
+
_It's good, it's good. It's good. It's good. It's good. It's good. It's good. It's good. It's good. It's good_
|
|
28
|
+
~ __Connie in Columbia__
|
|
29
|
+
<br>
|
|
30
|
+
___
|
|
26
31
|
|
|
27
|
-
|
|
28
|
-
|
|
32
|
+
# FAQ
|
|
33
|
+
* Q. What is the latest version?
|
|
29
34
|
|
|
35
|
+
* A. `v3.0.13`
|
|
36
|
+
---
|
|
37
|
+
* Q. How do I upgrade my code from threefive to the __more powerful super advanced threefive3?__
|
|
30
38
|
|
|
31
|
-
|
|
32
|
-
> Despite making a lot of changes, the api remains. threefive3 is pretty much a drop in replacement for threefive. I used sed to upgrade my code.
|
|
39
|
+
* A. `sed.`
|
|
33
40
|
```js
|
|
34
41
|
sed -i 's/threefive/threefive3/g'
|
|
35
42
|
```
|
|
36
|
-
> One thing to note, calling load or decode is no longer necessary for the Cue class, however, the methods are there in case you do call them.
|
|
37
|
-
>
|
|
38
|
-
>
|
|
39
|
-
# Is threefive3 faster than threefive?
|
|
40
|
-
### `threefive` vs. `threefive3` vs. `threefive3 next release`
|
|
41
|
-
#
|
|
42
|
-

|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
* _testing was done on a beatup chrome book reporting 5GB of RAM running Debian Sid and PyPy 7.3.11_
|
|
48
|
-
|
|
49
43
|
---
|
|
44
|
+
* Q. Does threefive3 have super cool new features?
|
|
50
45
|
|
|
51
|
-
|
|
52
|
-
* This is super cool.
|
|
53
|
-
* Does not generate Fatal errors, it won't break your process.
|
|
54
|
-
* Displays what is in error and how to correct it.
|
|
55
|
-
* Works in the cli
|
|
56
|
-
* Works in code.
|
|
57
|
-

|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
# Issues and Bugs.
|
|
61
|
-
* If you think you have a bug, I'll quickly fix it, but first I need you to prove it to me. __Show me the entire error message, the code you're running, and if the SCTE-35 is in video, the video stream__. You think your stream has proprietary data, we call those UPIDS. I am not going to spend my time trying to guess what your issue might be because you don't trust me.
|
|
62
|
-
* Why am I being such a dick about this? Because nine out of ten issues opened are not bugs at all or even related to threefive3. Most of them are SCTE-35 questions.
|
|
63
|
-
* I am not here to tutor you on SCTE-35. I do not work for SCTE.
|
|
64
|
-
---
|
|
65
|
-
# Special Request and Contract Work.
|
|
66
|
-
* If need some work done, this is what I do for a living, you can hire me, it's usually a month or two wait before I have an opening.
|
|
67
|
-
* SCTE-35 is not easy to learn, there is over 1000 pages of specs you really need understand. ISO 13818,RFC 4326, SCTE-30,SCTE-35, SCTE-67, SCTE-104, SCTE-214, HLS, DAS and few others.
|
|
68
|
-
* It reminds me of DNS or Sendmail configurations. It's a lot turn learn, but once you get things setup, you can pretty forget about it.
|
|
69
|
-
* I know SCTE-35 really really well. It's all I've for the last five years. I'm probably not the best SCTE-35 guy, but I'm the top ten, if not the top five.
|
|
70
|
-
* If you want to discuss your project open an issue and I'll send you my contact info.
|
|
46
|
+
* A. `Yes.`
|
|
71
47
|
---
|
|
72
48
|
|
|
73
49
|
# `Install`
|
|
@@ -88,11 +64,10 @@ make install
|
|
|
88
64
|
___
|
|
89
65
|
|
|
90
66
|
# `The Cli tool`
|
|
91
|
-
> The cli
|
|
67
|
+
> The cli polls stdin and that allows it to autodetect the SCTE-35 format as well as MPEGTS steams. Now every SCTE-35 data format, except hls, is autodetected on the commandline, as well as stdin.<br>HLS requires the `hls` ketyword.
|
|
92
68
|
|
|
93
69
|
### The cli tool installs automatically with pip or the Makefile.
|
|
94
70
|
|
|
95
|
-
|
|
96
71
|
* [__SCTE-35 Inputs__](#inputs)
|
|
97
72
|
* [__SCTE-35 Outputs__](#outputs)
|
|
98
73
|
* [Parse __MPEGTS__ streams for __SCTE-35__](#streams)
|
|
@@ -101,7 +76,6 @@ ___
|
|
|
101
76
|
* [Display raw __SCTE-35 packets__ from __video streams__](#packets)
|
|
102
77
|
* [__Repair SCTE-35 streams__ changed to __bin data__ by __ffmpeg__](#sixfix)
|
|
103
78
|
|
|
104
|
-
|
|
105
79
|
# `Inputs`
|
|
106
80
|
|
|
107
81
|
* Most __inputs__ are __auto-detected.__
|
|
@@ -116,9 +90,9 @@ ___
|
|
|
116
90
|
| __HLS__ |`threefive3 hls https://example.com/master.m3u8` |
|
|
117
91
|
| __JSON__ |`threefive3 < json.json` |
|
|
118
92
|
| __Xml__ | `threefive3 < xml.xml` |
|
|
119
|
-
| __Xmlbin__ | `threefive3 < xmlbin.xml` |
|
|
93
|
+
| __Xmlbin__ | `js threefive3 < xmlbin.xml` |
|
|
120
94
|
|
|
121
|
-
# Streams
|
|
95
|
+
# `Streams`
|
|
122
96
|
|
|
123
97
|
|Protocol | Cli Example |
|
|
124
98
|
|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
@@ -150,56 +124,64 @@ ___
|
|
|
150
124
|
|
|
151
125
|
### `hls`
|
|
152
126
|
* parse hls manifests and segments for SCTE-35
|
|
153
|
-
```
|
|
127
|
+
```smalltalk
|
|
154
128
|
threefive3 hls https://example.com/master.m3u8
|
|
155
129
|
```
|
|
156
130
|
___
|
|
157
131
|
### `Iframes`
|
|
158
132
|
* Show iframes PTS in an MPEGTS video
|
|
159
|
-
|
|
133
|
+
|
|
134
|
+
```smalltalk
|
|
160
135
|
threefive3 iframes https://example.com/video.ts
|
|
161
136
|
```
|
|
162
137
|
___
|
|
163
138
|
### `packets`
|
|
164
139
|
* Print raw SCTE-35 packets from multicast mpegts video
|
|
165
|
-
|
|
140
|
+
|
|
141
|
+
```smalltalk
|
|
166
142
|
threefive3 packets udp://@235.35.3.5:3535
|
|
167
143
|
```
|
|
168
144
|
___
|
|
169
145
|
### `proxy`
|
|
170
146
|
* Parse a https stream and write raw video to stdout
|
|
171
|
-
|
|
147
|
+
|
|
148
|
+
```smalltalk
|
|
172
149
|
threefive3 proxy video.ts
|
|
173
150
|
```
|
|
174
151
|
___
|
|
175
152
|
### `pts`
|
|
176
153
|
* Print PTS from mpegts video
|
|
177
|
-
|
|
178
|
-
|
|
154
|
+
|
|
155
|
+
```smalltalk
|
|
156
|
+
threefive3 pts video.ts
|
|
179
157
|
```
|
|
180
158
|
___
|
|
181
159
|
### `sidecar`
|
|
182
160
|
* Parse a stream, write pts,write SCTE-35 Cues to sidecar.txt
|
|
183
|
-
|
|
184
|
-
|
|
161
|
+
|
|
162
|
+
```smalltalk
|
|
163
|
+
threefive3 sidecar video.ts
|
|
185
164
|
```
|
|
186
165
|
___
|
|
187
166
|
### `sixfix`
|
|
188
167
|
* Fix SCTE-35 data mangled by ffmpeg
|
|
189
|
-
|
|
190
|
-
|
|
168
|
+
|
|
169
|
+
```smalltalk
|
|
170
|
+
threefive3 sixfix video.ts
|
|
191
171
|
```
|
|
192
172
|
___
|
|
193
173
|
### `show`
|
|
194
174
|
|
|
195
175
|
* Probe mpegts video _( kind of like ffprobe )_
|
|
196
|
-
|
|
176
|
+
|
|
177
|
+
```smalltalk
|
|
197
178
|
threefive3 show video.ts
|
|
198
179
|
```
|
|
199
180
|
___
|
|
200
181
|
### `version`
|
|
201
182
|
* Show version
|
|
202
|
-
|
|
183
|
+
|
|
184
|
+
```smalltalk
|
|
203
185
|
threefive3 version
|
|
204
186
|
```
|
|
205
187
|
___
|
|
@@ -6,6 +6,7 @@ scte35.hls hls.py
|
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
8
|
import datetime
|
|
9
|
+
import os
|
|
9
10
|
import sys
|
|
10
11
|
import time
|
|
11
12
|
from collections import deque
|
|
@@ -152,8 +153,10 @@ class Scte35Profile:
|
|
|
152
153
|
|
|
153
154
|
@staticmethod
|
|
154
155
|
def _clean(line):
|
|
156
|
+
'''
|
|
157
|
+
remove whitespace and quotes
|
|
158
|
+
'''
|
|
155
159
|
translate_map = {34: 94, 10: 94, 9: 94, 32: 94, 39: 94}
|
|
156
|
-
# translate " ", "\n", "\t", '"', "'" to ^ and delete.
|
|
157
160
|
return line.translate(translate_map).replace("^", "")
|
|
158
161
|
|
|
159
162
|
def clean_n_split(self, line):
|
|
@@ -209,13 +212,12 @@ class Scte35Profile:
|
|
|
209
212
|
|
|
210
213
|
def read_profile(self, pro_file):
|
|
211
214
|
"""
|
|
212
|
-
read_profile reads
|
|
215
|
+
read_profile reads hls.profile
|
|
213
216
|
"""
|
|
214
|
-
|
|
217
|
+
if os.path.isfile(pro_file):
|
|
215
218
|
with open(pro_file, "r", encoding="utf-8") as pro_handle:
|
|
216
219
|
self._parse_profile(pro_handle)
|
|
217
|
-
|
|
218
|
-
self.show_profile("Profile:")
|
|
220
|
+
self.show_profile("Profile:")
|
|
219
221
|
|
|
220
222
|
def set_pts(self, cue):
|
|
221
223
|
"""
|
|
@@ -272,7 +274,7 @@ class Scte35Profile:
|
|
|
272
274
|
"""
|
|
273
275
|
validate_splice_insert is named appropriately.
|
|
274
276
|
"""
|
|
275
|
-
line = self._is_splice_insert_cueout(
|
|
277
|
+
line = self._is_splice_insert_cueout(cue)
|
|
276
278
|
if not line:
|
|
277
279
|
line = "#EXT-X-CUE-IN\n"
|
|
278
280
|
return line
|
|
@@ -892,7 +894,7 @@ class CuePuller:
|
|
|
892
894
|
|
|
893
895
|
def chk_window_size(self, lines):
|
|
894
896
|
"""
|
|
895
|
-
|
|
897
|
+
mk_window_size sets the sliding window size
|
|
896
898
|
for the output to match that off the input and
|
|
897
899
|
determine how long to keep media data info
|
|
898
900
|
for segments.
|
|
@@ -121,8 +121,10 @@ class Segment(Stream):
|
|
|
121
121
|
decode a mpegts segment.
|
|
122
122
|
"""
|
|
123
123
|
super().decode(func=self.show_cue)
|
|
124
|
-
|
|
125
|
-
|
|
124
|
+
if self.start:
|
|
125
|
+
self.pts_start = self.as_90k(self.start.popitem()[1])
|
|
126
|
+
self.pts_last = self.as_90k(list(self.maps.prgm_pts.items())[0][1])
|
|
127
|
+
self.duration = round(self.pts_last - self.pts_start, 6)
|
|
128
|
+
|
|
126
129
|
if self.tmp:
|
|
127
130
|
os.unlink(self.tmp)
|
|
128
|
-
self.duration = round(self.pts_last - self.pts_start, 6)
|
|
@@ -449,21 +449,18 @@ class Stream:
|
|
|
449
449
|
head_size += afl + 1 # +1 for afl byte
|
|
450
450
|
return pkt[head_size:]
|
|
451
451
|
|
|
452
|
-
def _pmt_pid(self, pkt, pid
|
|
452
|
+
def _pmt_pid(self, pkt, pid):
|
|
453
453
|
if pid in self.pids.pmt:
|
|
454
454
|
pay = self._parse_payload(pkt)
|
|
455
|
-
|
|
456
|
-
return outdata
|
|
455
|
+
self._parse_pmt(pay, pid)
|
|
457
456
|
|
|
458
|
-
def _pat_pid(self, pay, pid
|
|
457
|
+
def _pat_pid(self, pay, pid):
|
|
459
458
|
if pid == self.pids.PAT_PID:
|
|
460
|
-
|
|
461
|
-
return outdata
|
|
459
|
+
self._parse_pat(pay)
|
|
462
460
|
|
|
463
|
-
def _sdt_pid(self, pay, pid,
|
|
461
|
+
def _sdt_pid(self, pay, pid,):
|
|
464
462
|
if pid == self.pids.SDT_PID:
|
|
465
|
-
|
|
466
|
-
return outdata
|
|
463
|
+
self._parse_sdt(pay)
|
|
467
464
|
|
|
468
465
|
def _parse_tables(self, pkt, pid):
|
|
469
466
|
"""
|
|
@@ -471,14 +468,11 @@ class Stream:
|
|
|
471
468
|
PAT, PMT, and SDT tables
|
|
472
469
|
based on pid of the pkt
|
|
473
470
|
"""
|
|
474
|
-
|
|
471
|
+
self._pmt_pid(pkt, pid,)
|
|
475
472
|
pay = self._parse_payload(pkt)
|
|
476
|
-
if self._same_as_last(pay, pid):
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
outdata = self._pat_pid(pay, pid, outdata)
|
|
480
|
-
outdata = self._sdt_pid(pay, pid, outdata)
|
|
481
|
-
return outdata
|
|
473
|
+
if not self._same_as_last(pay, pid):
|
|
474
|
+
self._pat_pid(pay, pid)
|
|
475
|
+
self._sdt_pid(pay, pid)
|
|
482
476
|
|
|
483
477
|
def _parse_info(self, pkt):
|
|
484
478
|
"""
|
|
@@ -508,6 +502,7 @@ class Stream:
|
|
|
508
502
|
pid = self._parse_info(pkt)
|
|
509
503
|
if pid in self.pids.pcr:
|
|
510
504
|
self._chk_pcr(pkt, pid)
|
|
505
|
+
if self._pusi_flag(pkt):
|
|
511
506
|
self._chk_pts(pkt, pid)
|
|
512
507
|
return self._chk_scte35(pkt, pid)
|
|
513
508
|
|
|
@@ -515,7 +510,7 @@ class Stream:
|
|
|
515
510
|
# return pid in self.pids.scte35.union(self.pids.maybe_scte35) # union sucks. 4.47 secs
|
|
516
511
|
# return (pid in self.pids.scte35 or pid in self.pids.maybe_scte35) # 3.37 secs
|
|
517
512
|
return pid in (self.pids.scte35 or self.pids.maybe_scte35) # 3.326 secs
|
|
518
|
-
# return pid in (self.pids.scte35|self.pids.maybe_scte35) # wtf? 4.128 secs
|
|
513
|
+
# return pid in (self.pids.scte35|self.pids.maybe_scte35) # wtf? 4.128 secs
|
|
519
514
|
|
|
520
515
|
def _chk_partial(self, pay, pid, sep):
|
|
521
516
|
if pid in self.maps.partial:
|
|
@@ -668,9 +663,7 @@ class Stream:
|
|
|
668
663
|
self.maps.prgm[program_number] = ProgramInfo()
|
|
669
664
|
pinfo = self.maps.prgm[program_number]
|
|
670
665
|
pinfo.pid = pid
|
|
671
|
-
print(pid)
|
|
672
666
|
pinfo.pcr_pid = pcr_pid
|
|
673
|
-
print(pcr_pid)
|
|
674
667
|
self.pids.pcr.add(pcr_pid)
|
|
675
668
|
self.maps.pid_prgm[pcr_pid] = program_number
|
|
676
669
|
proginfolen = self._parse_length(pay[10], pay[11])
|
|
@@ -686,7 +679,7 @@ class Stream:
|
|
|
686
679
|
"""
|
|
687
680
|
# 5 bytes for stream_type info
|
|
688
681
|
chunk_size = 5
|
|
689
|
-
end_idx = (idx + si_len) -
|
|
682
|
+
end_idx = (idx + si_len) -4
|
|
690
683
|
while idx < end_idx:
|
|
691
684
|
stream_type, pid, ei_len = self._parse_stream_type(pay, idx)
|
|
692
685
|
pinfo = self.maps.prgm[program_number]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: threefive3
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.13
|
|
4
4
|
Summary: threefive continued.
|
|
5
5
|
Home-page: https://github.com/superkabuki/scte35
|
|
6
6
|
Author: Adrian of Doom
|
|
@@ -22,76 +22,52 @@ Requires-Dist: m3ufu>=0.0.89
|
|
|
22
22
|
Requires-Dist: sideways>=0.0.23
|
|
23
23
|
Requires-Dist: pyaes
|
|
24
24
|
|
|
25
|
-
[Cue Class
|
|
25
|
+
[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)
|
|
26
26
|
|
|
27
|
-

|
|
28
27
|
|
|
29
|
-
#
|
|
28
|
+
# threefive3
|
|
29
|
+
SCTE-35 Parser ✅
|
|
30
|
+
SCTE-35 Encoder ✅
|
|
31
|
+
SCTE-35 HLS ✅
|
|
32
|
+
SCTE-35 Xml ✅
|
|
33
|
+
SCTE-35 Cli ✅
|
|
34
|
+
SCTE-35 library ✅
|
|
35
|
+
<br>
|
|
36
|
+
<br>
|
|
37
|
+
# What people are saying about threefive3:
|
|
30
38
|
|
|
31
|
-
|
|
32
|
-
#### Use like this
|
|
33
|
-
```js
|
|
34
|
-
threefive3 hls https://example.com/master.m3u8
|
|
35
|
-
or
|
|
36
|
-
threefive3 hls help
|
|
37
|
-
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
# Why threefive3, why not just threefive?
|
|
39
|
+
<br>
|
|
41
40
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
41
|
+
_I was satisfied with everything, only a linear entrance of.... there was a bomb with him._ ~ __Suzy in Swanee__
|
|
42
|
+
<br>
|
|
43
|
+
___
|
|
44
|
+
_A little bigger than i thought, but lighter._ ~ __Bob in Buford__
|
|
45
|
+
<br>
|
|
46
|
+
___
|
|
47
|
+
_Class! I choked very much, took it for the dacha, as an easily transported option, the sound was just hurt! And generally listen to music. Perfectly pumps speakers from ancient muses. Center Sony! Without distortion, background noise, detailed sound. In short, who does not need highend much, so I recommend it!_
|
|
48
|
+
~ __Larry in Lawrenceville__
|
|
49
|
+
<br>
|
|
50
|
+
___
|
|
51
|
+
_It's good, it's good. It's good. It's good. It's good. It's good. It's good. It's good. It's good. It's good_
|
|
52
|
+
~ __Connie in Columbia__
|
|
53
|
+
<br>
|
|
54
|
+
___
|
|
50
55
|
|
|
51
|
-
|
|
52
|
-
|
|
56
|
+
# FAQ
|
|
57
|
+
* Q. What is the latest version?
|
|
53
58
|
|
|
59
|
+
* A. `v3.0.13`
|
|
60
|
+
---
|
|
61
|
+
* Q. How do I upgrade my code from threefive to the __more powerful super advanced threefive3?__
|
|
54
62
|
|
|
55
|
-
|
|
56
|
-
> Despite making a lot of changes, the api remains. threefive3 is pretty much a drop in replacement for threefive. I used sed to upgrade my code.
|
|
63
|
+
* A. `sed.`
|
|
57
64
|
```js
|
|
58
65
|
sed -i 's/threefive/threefive3/g'
|
|
59
66
|
```
|
|
60
|
-
> One thing to note, calling load or decode is no longer necessary for the Cue class, however, the methods are there in case you do call them.
|
|
61
|
-
>
|
|
62
|
-
>
|
|
63
|
-
# Is threefive3 faster than threefive?
|
|
64
|
-
### `threefive` vs. `threefive3` vs. `threefive3 next release`
|
|
65
|
-
#
|
|
66
|
-

|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
* _testing was done on a beatup chrome book reporting 5GB of RAM running Debian Sid and PyPy 7.3.11_
|
|
72
|
-
|
|
73
67
|
---
|
|
68
|
+
* Q. Does threefive3 have super cool new features?
|
|
74
69
|
|
|
75
|
-
|
|
76
|
-
* This is super cool.
|
|
77
|
-
* Does not generate Fatal errors, it won't break your process.
|
|
78
|
-
* Displays what is in error and how to correct it.
|
|
79
|
-
* Works in the cli
|
|
80
|
-
* Works in code.
|
|
81
|
-

|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
# Issues and Bugs.
|
|
85
|
-
* If you think you have a bug, I'll quickly fix it, but first I need you to prove it to me. __Show me the entire error message, the code you're running, and if the SCTE-35 is in video, the video stream__. You think your stream has proprietary data, we call those UPIDS. I am not going to spend my time trying to guess what your issue might be because you don't trust me.
|
|
86
|
-
* Why am I being such a dick about this? Because nine out of ten issues opened are not bugs at all or even related to threefive3. Most of them are SCTE-35 questions.
|
|
87
|
-
* I am not here to tutor you on SCTE-35. I do not work for SCTE.
|
|
88
|
-
---
|
|
89
|
-
# Special Request and Contract Work.
|
|
90
|
-
* If need some work done, this is what I do for a living, you can hire me, it's usually a month or two wait before I have an opening.
|
|
91
|
-
* SCTE-35 is not easy to learn, there is over 1000 pages of specs you really need understand. ISO 13818,RFC 4326, SCTE-30,SCTE-35, SCTE-67, SCTE-104, SCTE-214, HLS, DAS and few others.
|
|
92
|
-
* It reminds me of DNS or Sendmail configurations. It's a lot turn learn, but once you get things setup, you can pretty forget about it.
|
|
93
|
-
* I know SCTE-35 really really well. It's all I've for the last five years. I'm probably not the best SCTE-35 guy, but I'm the top ten, if not the top five.
|
|
94
|
-
* If you want to discuss your project open an issue and I'll send you my contact info.
|
|
70
|
+
* A. `Yes.`
|
|
95
71
|
---
|
|
96
72
|
|
|
97
73
|
# `Install`
|
|
@@ -112,11 +88,10 @@ make install
|
|
|
112
88
|
___
|
|
113
89
|
|
|
114
90
|
# `The Cli tool`
|
|
115
|
-
> The cli
|
|
91
|
+
> The cli polls stdin and that allows it to autodetect the SCTE-35 format as well as MPEGTS steams. Now every SCTE-35 data format, except hls, is autodetected on the commandline, as well as stdin.<br>HLS requires the `hls` ketyword.
|
|
116
92
|
|
|
117
93
|
### The cli tool installs automatically with pip or the Makefile.
|
|
118
94
|
|
|
119
|
-
|
|
120
95
|
* [__SCTE-35 Inputs__](#inputs)
|
|
121
96
|
* [__SCTE-35 Outputs__](#outputs)
|
|
122
97
|
* [Parse __MPEGTS__ streams for __SCTE-35__](#streams)
|
|
@@ -125,7 +100,6 @@ ___
|
|
|
125
100
|
* [Display raw __SCTE-35 packets__ from __video streams__](#packets)
|
|
126
101
|
* [__Repair SCTE-35 streams__ changed to __bin data__ by __ffmpeg__](#sixfix)
|
|
127
102
|
|
|
128
|
-
|
|
129
103
|
# `Inputs`
|
|
130
104
|
|
|
131
105
|
* Most __inputs__ are __auto-detected.__
|
|
@@ -140,9 +114,9 @@ ___
|
|
|
140
114
|
| __HLS__ |`threefive3 hls https://example.com/master.m3u8` |
|
|
141
115
|
| __JSON__ |`threefive3 < json.json` |
|
|
142
116
|
| __Xml__ | `threefive3 < xml.xml` |
|
|
143
|
-
| __Xmlbin__ | `threefive3 < xmlbin.xml` |
|
|
117
|
+
| __Xmlbin__ | `js threefive3 < xmlbin.xml` |
|
|
144
118
|
|
|
145
|
-
# Streams
|
|
119
|
+
# `Streams`
|
|
146
120
|
|
|
147
121
|
|Protocol | Cli Example |
|
|
148
122
|
|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
@@ -174,56 +148,64 @@ ___
|
|
|
174
148
|
|
|
175
149
|
### `hls`
|
|
176
150
|
* parse hls manifests and segments for SCTE-35
|
|
177
|
-
```
|
|
151
|
+
```smalltalk
|
|
178
152
|
threefive3 hls https://example.com/master.m3u8
|
|
179
153
|
```
|
|
180
154
|
___
|
|
181
155
|
### `Iframes`
|
|
182
156
|
* Show iframes PTS in an MPEGTS video
|
|
183
|
-
|
|
157
|
+
|
|
158
|
+
```smalltalk
|
|
184
159
|
threefive3 iframes https://example.com/video.ts
|
|
185
160
|
```
|
|
186
161
|
___
|
|
187
162
|
### `packets`
|
|
188
163
|
* Print raw SCTE-35 packets from multicast mpegts video
|
|
189
|
-
|
|
164
|
+
|
|
165
|
+
```smalltalk
|
|
190
166
|
threefive3 packets udp://@235.35.3.5:3535
|
|
191
167
|
```
|
|
192
168
|
___
|
|
193
169
|
### `proxy`
|
|
194
170
|
* Parse a https stream and write raw video to stdout
|
|
195
|
-
|
|
171
|
+
|
|
172
|
+
```smalltalk
|
|
196
173
|
threefive3 proxy video.ts
|
|
197
174
|
```
|
|
198
175
|
___
|
|
199
176
|
### `pts`
|
|
200
177
|
* Print PTS from mpegts video
|
|
201
|
-
|
|
202
|
-
|
|
178
|
+
|
|
179
|
+
```smalltalk
|
|
180
|
+
threefive3 pts video.ts
|
|
203
181
|
```
|
|
204
182
|
___
|
|
205
183
|
### `sidecar`
|
|
206
184
|
* Parse a stream, write pts,write SCTE-35 Cues to sidecar.txt
|
|
207
|
-
|
|
208
|
-
|
|
185
|
+
|
|
186
|
+
```smalltalk
|
|
187
|
+
threefive3 sidecar video.ts
|
|
209
188
|
```
|
|
210
189
|
___
|
|
211
190
|
### `sixfix`
|
|
212
191
|
* Fix SCTE-35 data mangled by ffmpeg
|
|
213
|
-
|
|
214
|
-
|
|
192
|
+
|
|
193
|
+
```smalltalk
|
|
194
|
+
threefive3 sixfix video.ts
|
|
215
195
|
```
|
|
216
196
|
___
|
|
217
197
|
### `show`
|
|
218
198
|
|
|
219
199
|
* Probe mpegts video _( kind of like ffprobe )_
|
|
220
|
-
|
|
200
|
+
|
|
201
|
+
```smalltalk
|
|
221
202
|
threefive3 show video.ts
|
|
222
203
|
```
|
|
223
204
|
___
|
|
224
205
|
### `version`
|
|
225
206
|
* Show version
|
|
226
|
-
|
|
207
|
+
|
|
208
|
+
```smalltalk
|
|
227
209
|
threefive3 version
|
|
228
210
|
```
|
|
229
211
|
___
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|