threefive 3.0.81__tar.gz → 3.0.85__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. {threefive-3.0.81 → threefive-3.0.85}/PKG-INFO +57 -99
  2. {threefive-3.0.81 → threefive-3.0.85}/README.md +56 -98
  3. {threefive-3.0.81 → threefive-3.0.85}/pyproject.toml +2 -3
  4. {threefive-3.0.81 → threefive-3.0.85}/threefive/__init__.py +1 -2
  5. {threefive-3.0.81 → threefive-3.0.85}/threefive/base.py +6 -2
  6. {threefive-3.0.81 → threefive-3.0.85}/threefive/cli.py +36 -21
  7. {threefive-3.0.81 → threefive-3.0.85}/threefive/descriptors.py +172 -0
  8. {threefive-3.0.81 → threefive-3.0.85}/threefive/encode.py +1 -1
  9. {threefive-3.0.81 → threefive-3.0.85}/threefive/gums.py +3 -2
  10. {threefive-3.0.81 → threefive-3.0.85}/threefive/hls.py +1 -1
  11. {threefive-3.0.81 → threefive-3.0.85}/threefive/new_reader.py +3 -5
  12. {threefive-3.0.81 → threefive-3.0.85}/threefive/segment.py +2 -2
  13. {threefive-3.0.81 → threefive-3.0.85}/threefive/sixfix.py +5 -6
  14. {threefive-3.0.81 → threefive-3.0.85}/threefive/stream.py +211 -147
  15. {threefive-3.0.81 → threefive-3.0.85}/threefive/stuff.py +1 -1
  16. {threefive-3.0.81 → threefive-3.0.85}/threefive/superkabuki.py +1 -3
  17. {threefive-3.0.81 → threefive-3.0.85}/threefive/upids.py +1 -1
  18. {threefive-3.0.81 → threefive-3.0.85}/threefive/version.py +1 -1
  19. {threefive-3.0.81 → threefive-3.0.85}/threefive.egg-info/PKG-INFO +57 -99
  20. {threefive-3.0.81 → threefive-3.0.85}/LICENSE +0 -0
  21. {threefive-3.0.81 → threefive-3.0.85}/setup.cfg +0 -0
  22. {threefive-3.0.81 → threefive-3.0.85}/threefive/aac.py +0 -0
  23. {threefive-3.0.81 → threefive-3.0.85}/threefive/bitn.py +0 -0
  24. {threefive-3.0.81 → threefive-3.0.85}/threefive/bump.py +0 -0
  25. {threefive-3.0.81 → threefive-3.0.85}/threefive/commands.py +0 -0
  26. {threefive-3.0.81 → threefive-3.0.85}/threefive/crc.py +0 -0
  27. {threefive-3.0.81 → threefive-3.0.85}/threefive/crctable.py +0 -0
  28. {threefive-3.0.81 → threefive-3.0.85}/threefive/cue.py +0 -0
  29. {threefive-3.0.81 → threefive-3.0.85}/threefive/hlsprofile.py +0 -0
  30. {threefive-3.0.81 → threefive-3.0.85}/threefive/hlstags.py +0 -0
  31. {threefive-3.0.81 → threefive-3.0.85}/threefive/iframes.py +0 -0
  32. {threefive-3.0.81 → threefive-3.0.85}/threefive/packetdata.py +0 -0
  33. {threefive-3.0.81 → threefive-3.0.85}/threefive/pmt.py +0 -0
  34. {threefive-3.0.81 → threefive-3.0.85}/threefive/section.py +0 -0
  35. {threefive-3.0.81 → threefive-3.0.85}/threefive/segmentation.py +0 -0
  36. {threefive-3.0.81 → threefive-3.0.85}/threefive/speedo.py +0 -0
  37. {threefive-3.0.81 → threefive-3.0.85}/threefive/streamtypes.py +0 -0
  38. {threefive-3.0.81 → threefive-3.0.85}/threefive/throttle.py +0 -0
  39. {threefive-3.0.81 → threefive-3.0.85}/threefive/udp.py +0 -0
  40. {threefive-3.0.81 → threefive-3.0.85}/threefive/uxp.py +0 -0
  41. {threefive-3.0.81 → threefive-3.0.85}/threefive/xml.py +0 -0
  42. {threefive-3.0.81 → threefive-3.0.85}/threefive.egg-info/SOURCES.txt +0 -0
  43. {threefive-3.0.81 → threefive-3.0.85}/threefive.egg-info/dependency_links.txt +0 -0
  44. {threefive-3.0.81 → threefive-3.0.85}/threefive.egg-info/entry_points.txt +0 -0
  45. {threefive-3.0.81 → threefive-3.0.85}/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.81
3
+ Version: 3.0.85
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,55 +17,40 @@ Description-Content-Type: text/markdown
17
17
  License-File: LICENSE
18
18
  Dynamic: license-file
19
19
 
20
- ### It is now official, phase three of threefive's global domination has begun. Behold [threefive.js](https://github.com/keithah/threefive.js)
21
- _(ominous music plays in the background)_
22
-
23
20
  # [ threefive ]
24
21
 
25
- > _... If someone says they don't use threefive for SCTE-35, they're either drunk or they're lying_. <BR> ~Adrian
26
-
27
22
  ## https://github.com/superkabuki/threefive
28
-
29
23
  ### threefive is the industry leading SCTE-35 tool.
30
- #### Need to inject SCTE-35 into HLS? [X9k3.](https://github.com/superkabuki/x9k3)
31
24
 
32
- * __Decodes SCTE-35__ from `MPEGTS`✔ `Base64`✔ `Bytes`✔ `DASH`✔ `Hex` ✔ `HLS`✔ `Integers`✔ `JSON`✔ `XML`✔ `XML+Binary`✔
25
+ * In case you were wondering ....
33
26
 
34
- * __Encodes SCTE-35__ to `MPEGTS`✔ `Base64`✔ `Bytes`✔ `Hex`✔ `Integers`✔ `JSON`✔ `XML`✔ `XML+Binary`✔
27
+ <img width="672" height="586" alt="image" src="https://github.com/user-attachments/assets/0c327200-e1f0-4055-825f-349fe89c32d6" />
35
28
 
36
- * __Injects SCTE-35 Packets__ into `MPEGTS`✔.
37
29
 
38
- * __Network support__ for `HTTP(s)`✔ `Multicast`✔ `UDP`✔ `SRT`✔
39
30
 
40
- * __Built-in__ `Multicast Server`✔
41
-
42
- * __Automatic__ `AES decryption`✔
31
+ #### Need to inject SCTE-35 into HLS? [X9k3.](https://github.com/superkabuki/x9k3)
43
32
 
33
+ * __Decodes SCTE-35__ from `MPEGTS`✔ `Base64`✔ `Bytes`✔ `DASH`✔ `Hex` ✔ `HLS`✔ `Integers`✔ `JSON`✔ `XML`✔ `XML+Binary`✔
34
+
35
+ * __Encodes SCTE-35__ to `MPEGTS`✔ `Base64`✔ `Bytes`✔ `Hex`✔ `Integers`✔ `JSON`✔ `XML`✔ `XML+Binary`✔
44
36
  ___
45
37
 
46
38
 
47
-
48
- ### [ News ]
49
-
50
-
39
+ ## [ News ]
40
+ * __threefive.Stream.decode()__ now does __interpreter detection__ and uses __multiprocessing__ for __python3.11__ and __python3.14__ for a __serious speedup__.
41
+ * __Event Descriptors__ and __Property__ types from __the recently published 2026 SCTE-35 Specification part 2__ have been added.
51
42
  * __threefive no longer uses setuptools for packaging__ and I know you don't care.
52
- * __Python3 vs. Pypy3__ [__parsing SCTE35 with threefive__](https://github.com/superkabuki/threefive_is_scte35#python3-vs-pypy3-running-threefive) (watch the cool video)
53
43
  * __threefive now supports__ [__Secure Reliable Transport__](https://github.com/superkabuki/threefive_is_scte35/blob/main/README.md#threefive-now-supports-srt) (watch the cool video)
54
- * I have been __trying to setup threefive on readthedocs__,it's not going very well, but I'm working on it.
55
44
  ___
56
45
 
57
- ## [ Latest version is v3.0.81 ]
46
+ ## [ Latest version is v3.0.85 ]
58
47
 
59
- * threefive cyclomatic complexity score is 1.9337094499294782 _( that's better than the Python standard library)_ .
48
+ * threefive cyclomatic complexity score is 1.9337094499294782 _( that's better than the Python standard library)_ .
60
49
  * __threefive now has NO External Dependencies__
61
50
  * SRT and AES support is now optional
62
51
  * __threefive is fully python v3.14 compliant__
63
- * I fixed everything they broke/changed between v3.09 and 3.14.
64
- * 0 deprecation warnings.
65
52
  * __No more setup tools!__ threefive now uses a __toml file and a Makefile__ to generate packages,
66
53
  * I'm just trying to fit in with the cool python kids.
67
- * __fix__ for addressable tv Upids
68
- * __fix__ for private descriptor encoding and xml encoding.
69
54
  * __New__ the threefive cli tool has spun off several new cli tools. I had to split the cli up, the help was just way too long.
70
55
  * In addition to the __threefive__ cli you also get:
71
56
  * __scte35bump__ _adjust scte-35 pts in mpegts streams_
@@ -73,8 +58,47 @@ ___
73
58
  * __scte35hls__ _parse scte-35 from hls tags and segments_
74
59
  * __scte35inject__ _inject scte-35 packets into mpegts streams_
75
60
  * __gums__ _(the Grande Unified unicast and Multicast Server)_
76
-
77
- # [__[Examples]__](https://github.com/superkabuki/threefive/tree/main/examples)
61
+ ___
62
+
63
+ ### If you parse the output from the threefive cli....
64
+ * Comments, errors, and warnings, even printed comments, errors, and warnings, that are not the output, start with an octothorpe '#' and can be stripped, if needed, with sed.
65
+ ```sed
66
+ threefive video.ts 2>&1 | sed -n '/^\#/!p' -
67
+ ```
68
+
69
+ ### [ Speed Test ]
70
+ #### pypy3 vs. python3.11 vs. python3.14 running threefive 3.0.0x840c (_pre-release_)
71
+
72
+ * Using multiprocessing cuts parsing time in half for python 3.11 even more for python3.14
73
+
74
+ * single process pypy3 is still faster though.
75
+
76
+ * The test is to parse a 3.7 GB file for 286 SCTE-35 Cues.
77
+
78
+ * Results
79
+
80
+ | interpreter| time |
81
+ |------------|----------|
82
+ |__pypy3__ |__3.532 secs__|
83
+ |python3.11 |5.520 secs|
84
+ |python3.14 |5.521 secs|
85
+
86
+ * When I did the same test for threefive v3.0.83, pypy3 was 4.1 seconds, python3.11 was 10 seconds, and python3.14 was over 14 secs
87
+
88
+
89
+ ## [ Try these in your browser ]
90
+ #### Parse SCTE-35 in MPEGTS over HTTP, in your browser with[ Go, Wasm and Super Karate Death Car](https://bigcorp.ltd/gowasm)
91
+
92
+ #### Parse, edit, and convert SCTE-35 Cues in your browser with [fastcgi, python3, threefive, and nstuff](https://iodisco.com/scte35)
93
+
94
+ #### Parse SCTE-35 in MPEGTS over HTTP, in your browser with[ threefive.js,javascript, and a little sed](https://bigcorp.ltd/bread) just to keep things interesting.
95
+
96
+ #### Decode SCTE-35 data via Http request in a browser, with curl, or whatever with [Sassy](https://github.com/superkabuki/threefive_is_scte35/blob/main/sassy.md) , SCTE-35 as a Service.
97
+
98
+ ___
99
+ # [__[ Examples ]__](https://github.com/superkabuki/threefive/tree/main/examples)
100
+
101
+
78
102
 
79
103
  # [ Documentation ]
80
104
 
@@ -82,6 +106,7 @@ ___
82
106
  * [threefive SCTE-35 __Online Parser__](https://iodisco.com/scte35) hosted on my server_
83
107
  * [ SCTE-35 __Online Parser__ powered by threefive](http://www.domus1938.com/scte35parser) _another online parser powered by threefive_
84
108
  * [SCTE-35 __As a Service__](sassy.md) _if you can make an http request, you can parse SCTE-35, no install needed._
109
+
85
110
  * [__install__](#install)
86
111
  * __command line tools__
87
112
  * [ __threefive__](#cli) _decode SCTE-35 on the command line_
@@ -97,9 +122,7 @@ ___
97
122
  * [__Cue__ Class](https://github.com/superkabuki/threefive/blob/main/cue.md) _this class you'll use often_
98
123
  * [__Stream__ Class](https://github.com/superkabuki/threefive/blob/main/stream.md) _this is the class for parsing MPEGTS_
99
124
 
100
- * [Use __threefive to stream Multicast__](#-threefive-streams-multicast-its-easy-) _threefive is a multicast client and server_
101
125
  * [SCTE-35 __Sidecar Files__](https://github.com/superkabuki/SCTE-35_Sidecar_Files) _threefive supports SCTE-35 sidecar files_
102
- * [__SuperKabuki__ SCTE-35 MPEGTS __Packet Injection__](inject.md) _inject SCTE-35 into MPEGTS streams_
103
126
  * [SCTE-35 __HLS__](https://github.com/superkabuki/threefive/blob/main/hls.md) _parse SCTE-35 in HLS__
104
127
  * [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_
105
128
  * [__Encode__ SCTE-35](https://github.com/superkabuki/threefive/blob/main/encode.md) _threefive can encode SCTE-35 in every SCTE-35 format_
@@ -618,10 +641,8 @@ Type "help", "copyright", "credits" or "license" for more information.
618
641
  * [__SCTE-35 Inputs__](#inputs)
619
642
  * [__SCTE-35 Outputs__](#outputs)
620
643
  * [Parse __MPEGTS__ streams for __SCTE-35__](#streams)
621
- * [Parse __SCTE-35__ in __hls__](#hls)
622
644
  * [Display __MPEGTS__ __iframes__](#iframes)
623
645
  * [Display raw __SCTE-35 packets__ from __video streams__](#packets)
624
- * [__Repair SCTE-35 streams__ changed to __bin data__ by __ffmpeg__](#sixfix)
625
646
 
626
647
  #### `Inputs`
627
648
 
@@ -666,14 +687,12 @@ threefive '/DAWAAAAAAAAAP/wBQb+ztd7owAAdIbbmw=='
666
687
  | __Stdin__ | `threefive < video.ts` |
667
688
  | __UDP Multicast__| `threefive udp://@235.35.3.5:9999` |
668
689
  | __UDP Unicast__ | `threefive udp://10.0.0.7:5555` |
669
- | __HLS__ | `threefive hls https://example.com/master.m3u8`|
670
- | | |
671
690
 
672
691
 
673
692
  #### Outputs
674
693
  * output type is determined by the key words __base64, bytes, hex, int, json, and xmlbin__.
675
694
  * __json is the default__.
676
- * __Any input (except HLS,) can be returned as any output__
695
+ * __Any input can be returned as any output__
677
696
  * examples __Base64 to Hex__ etc...)
678
697
 
679
698
 
@@ -685,12 +704,6 @@ threefive '/DAWAAAAAAAAAP/wBQb+ztd7owAAdIbbmw=='
685
704
  | __Integer__ | `threefive '/DAsAAAAAyiYAP/wCgUAAAABf1+ZmQEBABECD0NVRUkAAAAAf4ABADUAAC2XQZU=' int` |
686
705
  | __JSON__ | `threefive 0xfc301600000000000000fff00506fed605225b0000b0b65f3b json ` |
687
706
  | __Xml+bin__ | `threefive 0xfc301600000000000000fff00506fed605225b0000b0b65f3b xmlbin ` |`
688
-
689
- #### `hls`
690
- * parse hls manifests and segments for SCTE-35
691
- ```smalltalk
692
- threefive hls https://example.com/master.m3u8
693
- ```
694
707
  ___
695
708
  #### `Iframes`
696
709
  * Show iframes PTS in an MPEGTS video
@@ -728,13 +741,7 @@ ___
728
741
  threefive sidecar video.ts
729
742
  ```
730
743
  ___
731
- #### `sixfix`
732
- * Fix SCTE-35 data mangled by ffmpeg
733
744
 
734
- ```smalltalk
735
- threefive sixfix video.ts
736
- ```
737
- ___
738
745
  #### `show`
739
746
 
740
747
  * Probe mpegts video _( kind of like ffprobe )_
@@ -758,54 +765,6 @@ ___
758
765
  ___
759
766
 
760
767
 
761
- ## [ threefive Streams Multicast, it's easy. ]
762
- * The threefive cli has long been a Multicast Receiver( client )
763
- * The cli now comes with a builtin Multicast Sender( server).
764
- * It's optimized for MPEGTS (1316 byte Datagrams) but you can send any video or file.
765
- * The defaults will work in most situations, you don't even have to set the address.
766
- * threefive cli also supports UDP Unicast Streaming.
767
-
768
- If you're tired of configuring strange kernel settings with sysctl trying to get multicast to work,<br>
769
- threefive multicast is written from scratch in raw sockets and autoconfigures most settings,<br>
770
- threefive adjusts the SO_RCVBUF, SO_SNDBUF, SO_REUSEADDR,SO_REUSEPORT,IP_MULTICAST_TTL and IP_MULTICAST_LOOP for you.<br>
771
- all you really need to do is make sure multicast is enabled on the network device, threefive can handle the rest.<br>
772
- ```js
773
- ip link set wlp2s0 multicast on
774
-
775
- ```
776
-
777
-
778
- ```js
779
- a@fu:~$ threefive mcast help
780
- usage: threefive mcast [-h] [-i INPUT] [-a ADDR] [-b BIND_ADDR] [-t TTL]
781
-
782
- optional arguments:
783
- -h, --help show this help message and exit
784
- -i INPUT, --input INPUT
785
- like "/home/a/vid.ts" or "udp://@235.35.3.5:3535" or
786
- "https://futzu.com/xaa.ts"
787
- [default:sys.stdin.buffer]
788
- -a ADDR, --addr ADDR Destination IP:Port [default:235.35.3.5:3535]
789
- -b BIND_ADDR, --bind_addr BIND_ADDR
790
- Local IP to bind [default:0.0.0.0]
791
- -t TTL, --ttl TTL Multicast TTL (1 - 255) [default:32]
792
- a@fu:~$
793
- ```
794
-
795
- * the video shows three streams being read and played from threefive's multicast, one stream is being converted to srt.
796
- * the command
797
- ```sh
798
- a@fu:~/scratch/threefive$ threefive mcast -i ~/mpegts/ms.ts
799
-
800
- ```
801
-
802
- https://github.com/user-attachments/assets/df95b8da-5ca6-4bf3-b029-c95204841e43
803
-
804
- * __threefive mcast__ sends __1316 byte datagrams__. Here's `tcpdump multicast`output.
805
-
806
- <img width="1126" height="679" alt="image" src="https://github.com/user-attachments/assets/b29f33c7-d35c-42be-95fb-2c6e72d1ab9b" />
807
-
808
- ___
809
768
 
810
769
 
811
770
  ## [iodisco.com/scte35](https://iodisco.com/scte35)
@@ -821,6 +780,5 @@ ___
821
780
  <img width="258" height="256" alt="image" src="https://github.com/user-attachments/assets/642cb803-9465-408e-bb6e-03549eb22d78" />
822
781
 
823
782
  ___
824
- [__Install__](#install) |[__SCTE-35 Cli__](#the-cli-tool) | [__SCTE-35 HLS__](https://github.com/superkabuki/threefive/blob/main/hls.md) | [__Cue__ Class](https://github.com/superkabuki/threefive/blob/main/cue.md) | [__Stream__ Class](https://github.com/superkabuki/threefive/blob/main/stream.md) | [__Online SCTE-35 Parser__](https://iodisco.com/scte35) | [__Encode SCTE-35__](https://github.com/superkabuki/threefive/blob/main/encode.md) | [__SCTE-35 Examples__](https://github.com/superkabuki/threefive/tree/main/examples)
825
- | [__SCTE-35 XML__ ](https://github.com/superkabuki/SCTE-35/blob/main/xml.md) and [More __XML__](node.md) | [__threefive runs Four Times Faster on pypy3__](https://pypy.org/) | [__SuperKabuki SCTE-35 MPEGTS Packet Injection__](inject.md)
826
-
783
+ [__Install__](#install) |[__SCTE-35 Cli__](#the-cli-tool) | [__Cue__ Class](https://github.com/superkabuki/threefive/blob/main/cue.md) | [__Stream__ Class](https://github.com/superkabuki/threefive/blob/main/stream.md) | [__Online SCTE-35 Parser__](https://iodisco.com/scte35) | [__SCTE-35 Examples__](https://github.com/superkabuki/threefive/tree/main/examples)
784
+ | [__SCTE-35 XML__ ](https://github.com/superkabuki/SCTE-35/blob/main/xml.md) and [More __XML__](node.md) | [__threefive runs Four Times Faster on pypy3__](https://pypy.org/)
@@ -1,52 +1,37 @@
1
- ### It is now official, phase three of threefive's global domination has begun. Behold [threefive.js](https://github.com/keithah/threefive.js)
2
- _(ominous music plays in the background)_
3
-
4
1
  # [ threefive ]
5
2
 
6
- > _... If someone says they don't use threefive for SCTE-35, they're either drunk or they're lying_. <BR> ~Adrian
7
-
8
3
  ## https://github.com/superkabuki/threefive
9
-
10
4
  ### threefive is the industry leading SCTE-35 tool.
11
- #### Need to inject SCTE-35 into HLS? [X9k3.](https://github.com/superkabuki/x9k3)
12
5
 
13
- * __Decodes SCTE-35__ from `MPEGTS`✔ `Base64`✔ `Bytes`✔ `DASH`✔ `Hex` ✔ `HLS`✔ `Integers`✔ `JSON`✔ `XML`✔ `XML+Binary`✔
6
+ * In case you were wondering ....
14
7
 
15
- * __Encodes SCTE-35__ to `MPEGTS`✔ `Base64`✔ `Bytes`✔ `Hex`✔ `Integers`✔ `JSON`✔ `XML`✔ `XML+Binary`✔
8
+ <img width="672" height="586" alt="image" src="https://github.com/user-attachments/assets/0c327200-e1f0-4055-825f-349fe89c32d6" />
16
9
 
17
- * __Injects SCTE-35 Packets__ into `MPEGTS`✔.
18
10
 
19
- * __Network support__ for `HTTP(s)`✔ `Multicast`✔ `UDP`✔ `SRT`✔
20
11
 
21
- * __Built-in__ `Multicast Server`✔
22
-
23
- * __Automatic__ `AES decryption`✔
12
+ #### Need to inject SCTE-35 into HLS? [X9k3.](https://github.com/superkabuki/x9k3)
24
13
 
14
+ * __Decodes SCTE-35__ from `MPEGTS`✔ `Base64`✔ `Bytes`✔ `DASH`✔ `Hex` ✔ `HLS`✔ `Integers`✔ `JSON`✔ `XML`✔ `XML+Binary`✔
15
+
16
+ * __Encodes SCTE-35__ to `MPEGTS`✔ `Base64`✔ `Bytes`✔ `Hex`✔ `Integers`✔ `JSON`✔ `XML`✔ `XML+Binary`✔
25
17
  ___
26
18
 
27
19
 
28
-
29
- ### [ News ]
30
-
31
-
20
+ ## [ News ]
21
+ * __threefive.Stream.decode()__ now does __interpreter detection__ and uses __multiprocessing__ for __python3.11__ and __python3.14__ for a __serious speedup__.
22
+ * __Event Descriptors__ and __Property__ types from __the recently published 2026 SCTE-35 Specification part 2__ have been added.
32
23
  * __threefive no longer uses setuptools for packaging__ and I know you don't care.
33
- * __Python3 vs. Pypy3__ [__parsing SCTE35 with threefive__](https://github.com/superkabuki/threefive_is_scte35#python3-vs-pypy3-running-threefive) (watch the cool video)
34
24
  * __threefive now supports__ [__Secure Reliable Transport__](https://github.com/superkabuki/threefive_is_scte35/blob/main/README.md#threefive-now-supports-srt) (watch the cool video)
35
- * I have been __trying to setup threefive on readthedocs__,it's not going very well, but I'm working on it.
36
25
  ___
37
26
 
38
- ## [ Latest version is v3.0.81 ]
27
+ ## [ Latest version is v3.0.85 ]
39
28
 
40
- * threefive cyclomatic complexity score is 1.9337094499294782 _( that's better than the Python standard library)_ .
29
+ * threefive cyclomatic complexity score is 1.9337094499294782 _( that's better than the Python standard library)_ .
41
30
  * __threefive now has NO External Dependencies__
42
31
  * SRT and AES support is now optional
43
32
  * __threefive is fully python v3.14 compliant__
44
- * I fixed everything they broke/changed between v3.09 and 3.14.
45
- * 0 deprecation warnings.
46
33
  * __No more setup tools!__ threefive now uses a __toml file and a Makefile__ to generate packages,
47
34
  * I'm just trying to fit in with the cool python kids.
48
- * __fix__ for addressable tv Upids
49
- * __fix__ for private descriptor encoding and xml encoding.
50
35
  * __New__ the threefive cli tool has spun off several new cli tools. I had to split the cli up, the help was just way too long.
51
36
  * In addition to the __threefive__ cli you also get:
52
37
  * __scte35bump__ _adjust scte-35 pts in mpegts streams_
@@ -54,8 +39,47 @@ ___
54
39
  * __scte35hls__ _parse scte-35 from hls tags and segments_
55
40
  * __scte35inject__ _inject scte-35 packets into mpegts streams_
56
41
  * __gums__ _(the Grande Unified unicast and Multicast Server)_
57
-
58
- # [__[Examples]__](https://github.com/superkabuki/threefive/tree/main/examples)
42
+ ___
43
+
44
+ ### If you parse the output from the threefive cli....
45
+ * Comments, errors, and warnings, even printed comments, errors, and warnings, that are not the output, start with an octothorpe '#' and can be stripped, if needed, with sed.
46
+ ```sed
47
+ threefive video.ts 2>&1 | sed -n '/^\#/!p' -
48
+ ```
49
+
50
+ ### [ Speed Test ]
51
+ #### pypy3 vs. python3.11 vs. python3.14 running threefive 3.0.0x840c (_pre-release_)
52
+
53
+ * Using multiprocessing cuts parsing time in half for python 3.11 even more for python3.14
54
+
55
+ * single process pypy3 is still faster though.
56
+
57
+ * The test is to parse a 3.7 GB file for 286 SCTE-35 Cues.
58
+
59
+ * Results
60
+
61
+ | interpreter| time |
62
+ |------------|----------|
63
+ |__pypy3__ |__3.532 secs__|
64
+ |python3.11 |5.520 secs|
65
+ |python3.14 |5.521 secs|
66
+
67
+ * When I did the same test for threefive v3.0.83, pypy3 was 4.1 seconds, python3.11 was 10 seconds, and python3.14 was over 14 secs
68
+
69
+
70
+ ## [ Try these in your browser ]
71
+ #### Parse SCTE-35 in MPEGTS over HTTP, in your browser with[ Go, Wasm and Super Karate Death Car](https://bigcorp.ltd/gowasm)
72
+
73
+ #### Parse, edit, and convert SCTE-35 Cues in your browser with [fastcgi, python3, threefive, and nstuff](https://iodisco.com/scte35)
74
+
75
+ #### Parse SCTE-35 in MPEGTS over HTTP, in your browser with[ threefive.js,javascript, and a little sed](https://bigcorp.ltd/bread) just to keep things interesting.
76
+
77
+ #### Decode SCTE-35 data via Http request in a browser, with curl, or whatever with [Sassy](https://github.com/superkabuki/threefive_is_scte35/blob/main/sassy.md) , SCTE-35 as a Service.
78
+
79
+ ___
80
+ # [__[ Examples ]__](https://github.com/superkabuki/threefive/tree/main/examples)
81
+
82
+
59
83
 
60
84
  # [ Documentation ]
61
85
 
@@ -63,6 +87,7 @@ ___
63
87
  * [threefive SCTE-35 __Online Parser__](https://iodisco.com/scte35) hosted on my server_
64
88
  * [ SCTE-35 __Online Parser__ powered by threefive](http://www.domus1938.com/scte35parser) _another online parser powered by threefive_
65
89
  * [SCTE-35 __As a Service__](sassy.md) _if you can make an http request, you can parse SCTE-35, no install needed._
90
+
66
91
  * [__install__](#install)
67
92
  * __command line tools__
68
93
  * [ __threefive__](#cli) _decode SCTE-35 on the command line_
@@ -78,9 +103,7 @@ ___
78
103
  * [__Cue__ Class](https://github.com/superkabuki/threefive/blob/main/cue.md) _this class you'll use often_
79
104
  * [__Stream__ Class](https://github.com/superkabuki/threefive/blob/main/stream.md) _this is the class for parsing MPEGTS_
80
105
 
81
- * [Use __threefive to stream Multicast__](#-threefive-streams-multicast-its-easy-) _threefive is a multicast client and server_
82
106
  * [SCTE-35 __Sidecar Files__](https://github.com/superkabuki/SCTE-35_Sidecar_Files) _threefive supports SCTE-35 sidecar files_
83
- * [__SuperKabuki__ SCTE-35 MPEGTS __Packet Injection__](inject.md) _inject SCTE-35 into MPEGTS streams_
84
107
  * [SCTE-35 __HLS__](https://github.com/superkabuki/threefive/blob/main/hls.md) _parse SCTE-35 in HLS__
85
108
  * [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_
86
109
  * [__Encode__ SCTE-35](https://github.com/superkabuki/threefive/blob/main/encode.md) _threefive can encode SCTE-35 in every SCTE-35 format_
@@ -599,10 +622,8 @@ Type "help", "copyright", "credits" or "license" for more information.
599
622
  * [__SCTE-35 Inputs__](#inputs)
600
623
  * [__SCTE-35 Outputs__](#outputs)
601
624
  * [Parse __MPEGTS__ streams for __SCTE-35__](#streams)
602
- * [Parse __SCTE-35__ in __hls__](#hls)
603
625
  * [Display __MPEGTS__ __iframes__](#iframes)
604
626
  * [Display raw __SCTE-35 packets__ from __video streams__](#packets)
605
- * [__Repair SCTE-35 streams__ changed to __bin data__ by __ffmpeg__](#sixfix)
606
627
 
607
628
  #### `Inputs`
608
629
 
@@ -647,14 +668,12 @@ threefive '/DAWAAAAAAAAAP/wBQb+ztd7owAAdIbbmw=='
647
668
  | __Stdin__ | `threefive < video.ts` |
648
669
  | __UDP Multicast__| `threefive udp://@235.35.3.5:9999` |
649
670
  | __UDP Unicast__ | `threefive udp://10.0.0.7:5555` |
650
- | __HLS__ | `threefive hls https://example.com/master.m3u8`|
651
- | | |
652
671
 
653
672
 
654
673
  #### Outputs
655
674
  * output type is determined by the key words __base64, bytes, hex, int, json, and xmlbin__.
656
675
  * __json is the default__.
657
- * __Any input (except HLS,) can be returned as any output__
676
+ * __Any input can be returned as any output__
658
677
  * examples __Base64 to Hex__ etc...)
659
678
 
660
679
 
@@ -666,12 +685,6 @@ threefive '/DAWAAAAAAAAAP/wBQb+ztd7owAAdIbbmw=='
666
685
  | __Integer__ | `threefive '/DAsAAAAAyiYAP/wCgUAAAABf1+ZmQEBABECD0NVRUkAAAAAf4ABADUAAC2XQZU=' int` |
667
686
  | __JSON__ | `threefive 0xfc301600000000000000fff00506fed605225b0000b0b65f3b json ` |
668
687
  | __Xml+bin__ | `threefive 0xfc301600000000000000fff00506fed605225b0000b0b65f3b xmlbin ` |`
669
-
670
- #### `hls`
671
- * parse hls manifests and segments for SCTE-35
672
- ```smalltalk
673
- threefive hls https://example.com/master.m3u8
674
- ```
675
688
  ___
676
689
  #### `Iframes`
677
690
  * Show iframes PTS in an MPEGTS video
@@ -709,13 +722,7 @@ ___
709
722
  threefive sidecar video.ts
710
723
  ```
711
724
  ___
712
- #### `sixfix`
713
- * Fix SCTE-35 data mangled by ffmpeg
714
725
 
715
- ```smalltalk
716
- threefive sixfix video.ts
717
- ```
718
- ___
719
726
  #### `show`
720
727
 
721
728
  * Probe mpegts video _( kind of like ffprobe )_
@@ -739,54 +746,6 @@ ___
739
746
  ___
740
747
 
741
748
 
742
- ## [ threefive Streams Multicast, it's easy. ]
743
- * The threefive cli has long been a Multicast Receiver( client )
744
- * The cli now comes with a builtin Multicast Sender( server).
745
- * It's optimized for MPEGTS (1316 byte Datagrams) but you can send any video or file.
746
- * The defaults will work in most situations, you don't even have to set the address.
747
- * threefive cli also supports UDP Unicast Streaming.
748
-
749
- If you're tired of configuring strange kernel settings with sysctl trying to get multicast to work,<br>
750
- threefive multicast is written from scratch in raw sockets and autoconfigures most settings,<br>
751
- threefive adjusts the SO_RCVBUF, SO_SNDBUF, SO_REUSEADDR,SO_REUSEPORT,IP_MULTICAST_TTL and IP_MULTICAST_LOOP for you.<br>
752
- all you really need to do is make sure multicast is enabled on the network device, threefive can handle the rest.<br>
753
- ```js
754
- ip link set wlp2s0 multicast on
755
-
756
- ```
757
-
758
-
759
- ```js
760
- a@fu:~$ threefive mcast help
761
- usage: threefive mcast [-h] [-i INPUT] [-a ADDR] [-b BIND_ADDR] [-t TTL]
762
-
763
- optional arguments:
764
- -h, --help show this help message and exit
765
- -i INPUT, --input INPUT
766
- like "/home/a/vid.ts" or "udp://@235.35.3.5:3535" or
767
- "https://futzu.com/xaa.ts"
768
- [default:sys.stdin.buffer]
769
- -a ADDR, --addr ADDR Destination IP:Port [default:235.35.3.5:3535]
770
- -b BIND_ADDR, --bind_addr BIND_ADDR
771
- Local IP to bind [default:0.0.0.0]
772
- -t TTL, --ttl TTL Multicast TTL (1 - 255) [default:32]
773
- a@fu:~$
774
- ```
775
-
776
- * the video shows three streams being read and played from threefive's multicast, one stream is being converted to srt.
777
- * the command
778
- ```sh
779
- a@fu:~/scratch/threefive$ threefive mcast -i ~/mpegts/ms.ts
780
-
781
- ```
782
-
783
- https://github.com/user-attachments/assets/df95b8da-5ca6-4bf3-b029-c95204841e43
784
-
785
- * __threefive mcast__ sends __1316 byte datagrams__. Here's `tcpdump multicast`output.
786
-
787
- <img width="1126" height="679" alt="image" src="https://github.com/user-attachments/assets/b29f33c7-d35c-42be-95fb-2c6e72d1ab9b" />
788
-
789
- ___
790
749
 
791
750
 
792
751
  ## [iodisco.com/scte35](https://iodisco.com/scte35)
@@ -802,6 +761,5 @@ ___
802
761
  <img width="258" height="256" alt="image" src="https://github.com/user-attachments/assets/642cb803-9465-408e-bb6e-03549eb22d78" />
803
762
 
804
763
  ___
805
- [__Install__](#install) |[__SCTE-35 Cli__](#the-cli-tool) | [__SCTE-35 HLS__](https://github.com/superkabuki/threefive/blob/main/hls.md) | [__Cue__ Class](https://github.com/superkabuki/threefive/blob/main/cue.md) | [__Stream__ Class](https://github.com/superkabuki/threefive/blob/main/stream.md) | [__Online SCTE-35 Parser__](https://iodisco.com/scte35) | [__Encode SCTE-35__](https://github.com/superkabuki/threefive/blob/main/encode.md) | [__SCTE-35 Examples__](https://github.com/superkabuki/threefive/tree/main/examples)
806
- | [__SCTE-35 XML__ ](https://github.com/superkabuki/SCTE-35/blob/main/xml.md) and [More __XML__](node.md) | [__threefive runs Four Times Faster on pypy3__](https://pypy.org/) | [__SuperKabuki SCTE-35 MPEGTS Packet Injection__](inject.md)
807
-
764
+ [__Install__](#install) |[__SCTE-35 Cli__](#the-cli-tool) | [__Cue__ Class](https://github.com/superkabuki/threefive/blob/main/cue.md) | [__Stream__ Class](https://github.com/superkabuki/threefive/blob/main/stream.md) | [__Online SCTE-35 Parser__](https://iodisco.com/scte35) | [__SCTE-35 Examples__](https://github.com/superkabuki/threefive/tree/main/examples)
765
+ | [__SCTE-35 XML__ ](https://github.com/superkabuki/SCTE-35/blob/main/xml.md) and [More __XML__](node.md) | [__threefive runs Four Times Faster on pypy3__](https://pypy.org/)
@@ -1,7 +1,7 @@
1
1
 
2
2
  [project]
3
3
  name = "threefive"
4
- version = "3.0.81"
4
+ version = "3.0.85"
5
5
  authors = [
6
6
  { name="AdrianofDoom", email="spam@iodisco.com" },
7
7
  ]
@@ -12,8 +12,6 @@ dependencies=[
12
12
 
13
13
  ]
14
14
 
15
-
16
-
17
15
  classifiers = [
18
16
  "Environment :: Console",
19
17
  "Operating System :: OS Independent",
@@ -22,6 +20,7 @@ classifiers = [
22
20
  "Programming Language :: Python :: Implementation :: PyPy",
23
21
  "Programming Language :: Python :: Implementation :: CPython",
24
22
  ]
23
+
25
24
  license = "Sleepycat"
26
25
  license-files = ["LICEN[CS]E*"]
27
26
 
@@ -3,8 +3,7 @@ threefive.__init__.py
3
3
  """
4
4
 
5
5
  from .version import version
6
-
7
- __version__ = version
6
+ __version__= version
8
7
 
9
8
  from .base import SCTE35Base
10
9
  from .cue import Cue
@@ -170,12 +170,16 @@ class SCTE35Base:
170
170
  def _b2l(val):
171
171
  if isinstance(val, SCTE35Base):
172
172
  val.kv_clean()
173
+ print(val)
173
174
  if isinstance(val, (list)):
174
- val = [_b2l(v) for v in val]
175
+ if val and isinstance(val[0], SCTE35Base):
176
+ val = [v.kv_clean() for v in val]
177
+ else:
178
+ val = [_b2l(v) for v in val]
175
179
  if isinstance(val, (dict)):
176
180
  val = {k: _b2l(v) for k, v in val.items()}
177
181
  if isinstance(val, (bytes, bytearray)):
178
- val = list(val)
182
+ val = val.decode()
179
183
  return val
180
184
 
181
185
  return {