SCTE-35 decoder and encoder with MPEGTS and HLS and XML support.
Project description
Canada has a virtual monopoly on the World's mustard seed supply and they will use it to manipulate financial markets. We must act.
Nuke Canada Now!
Install threefive3 |SCTE-35 Cli | SCTE-35 HLS | Cue Class | Stream Class | Online SCTE-35 Parser | Encode SCTE-35 | FFmpeg SCTE35
threefive3 SCTE-35 cli super tool and python3 library.
Brought to you by the fine folks at fu-corp ( Adrian and the two blonde Chinese girls. )
✅ SCTE-35 Parser ✅ SCTE-35 Encoder ✅ SCTE-35 HLS ✅ SCTE-35 Xml+binary ✅ SCTE-35 Cli ✅ SCTE-35 library
- Parses SCTE-35 from MPEGTS, HLS, XML+Binary, Base64, Bytes, Hex, Integers, or JSON.
- Encode SCTE-35 to Base64, Bytes, Hex, Int, JSON, or Xml+binary.
- Built-in network support for HTTP(S), UDP, and Multicast.
- Automatic AES decryption for HLS.
- All HLS SCTE-35 Tags are Supported.
Latest release is v3.0.25
Stay up to date, only the latest release is supported.
MPEGTS streams can be parsed for SCTE-35 with three lines of code.
a@fu:~/build5/scte35/scte35$ pypy3
Python 3.9.16 (7.3.11+dfsg-2+deb12u3, Dec 30 2024, 22:36:23)
[PyPy 7.3.11 with GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>> from threefive3 import Stream
>>>> strm=Stream('https://futzu.com/xaa.ts')
>>>> strm.decode()
threefive3 Road Map.
The master plan for threefive3 is to consolidate code from several of my projects.
| Project | Description | Status |
|---|---|---|
| threefive | scte-35 parser | Done |
| bitn | bitslicer for byte strings | Done |
| new_reader | reader for files and network data | Done |
| showcues | hls scte35 parser | Done |
| m3ufu tagparser | hls scte-35 tag parser | Done |
| iframes | iframe detection for mpegts | Done |
| dash rip rock | scte-35 xml parser and generator | Done |
| six2scte35 | ffmpeg bin data stream back to scte-35 | Done |
| superkabuki | scte-35 packet injection | Next release |
| sideways | hls scte-35 tag injecton | No |
| gums | multicast server | Done |
| adbreak3 | fast cli scte-35 cue creation | No |
Little Help?
I could use a hand.with these
- Writing docs. Explain how to use threefive3.
- Easy Examples. Light coding.
- Unit Testing. light coding with some SCTE-35.
- Pylint and PEP compliance. medium python knowledge.
- Profiling and Benchmarking. Help make threefive3 faster.
- Replacing setup tools. Using setup.py for packaging has been deprecated, medium python knowledge.
- DASH parsing. I need somebody to explain the non-SCTE-35 parts of DASH to me.
You don't have to be a master of python or SCTE-35,
but helping will make you better at both.
I value enthusiasm over skill, I can teach you what you don't know.
Don't worry, I won't let you break anything, that's my job.
If you want to get involved, just open an issue and we can talk about it.
Documentation
Cli
- SCTE-35 Cli Super Tool Encodes, Decodes, and Recodes. This is pretty cool, it does SCTE-35 seven different ways.
- The cli tool comes with builtin documentation just type
threefive3 help
- The cli tool comes with builtin documentation just type
HLS
- Advanced Parsing of SCTE-35 in HLS with threefive3 All HLS SCTE-35 tags, Sidecar Files, AAC ID3 Header Timestamps, SCTE-35 filters... Who loves you baby?
Classes
- The python built in help is always the most up to date docs for the library.
a@fu:~/build7/threefive3$ pypy3
Python 3.9.16 (7.3.11+dfsg-2+deb12u3, Dec 30 2024, 22:36:23)
[PyPy 7.3.11 with GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>> from threefive import Stream
>>>> help(Stream)
- Cue Class Cue is the main SCTE-35 class to use.
- Stream Class The Stream class handles MPEGTS SCTE-35 streams local, Http(s), UDP, and Multicast.
| more
-
Online SCTE-35 Parser Supporte Base64, Bytes,Hex,Int, Json, Xml, and Xml+binary.
-
Encode SCTE-35 Some encoding code examples.
-
FFmpeg SCTE35 FFmpeg with the SuperKabui SCTE-35 Patch applied.
Install
- python3 via pip
python3 -mpip install threefive3
- pypy3
pypy3 -mpip install threefive3
- from the git repo
git clone https://github.com/superkabuki/scte35.git
cd threefive3
make install
The Cli tool
The cli tool installs automatically with pip or the Makefile.
- SCTE-35 Inputs
- SCTE-35 Outputs
- Parse MPEGTS streams for SCTE-35
- Parse SCTE-35 in hls
- Display MPEGTS iframes
- Display raw SCTE-35 packets from video streams
- Repair SCTE-35 streams changed to bin data by ffmpeg
Inputs
- Most inputs are auto-detected.
- stdin is auto selected and auto detected.
- SCTE-35 data is printed to stderr
- stdout is used when piping video
- mpegts can be specified by file name or URI.
threefive3 udp://@235.2.5.35:3535
- If a file comtains a SCTE-35 cue as a string( base64,hex,int,json,or xml+bin), redirect the file contents.
threefive3 < json.json
- quoted strings(( base64,hex,int,json or xml+bin), can be passed directly on the command line as well.
threefive3 '/DAWAAAAAAAAAP/wBQb+ztd7owAAdIbbmw=='
| Input Type | Cli Example |
|---|---|
| Base64 | threefive3 '/DAsAAAAAyiYAP/wCgUAAAABf1+ZmQEBABECD0NVRUkAAAAAf4ABADUAAC2XQZU=' |
| Hex | threefive3 0xfc301600000000000000fff00506fed605225b0000b0b65f3b |
| HLS | threefive3 hls https://example.com/master.m3u8 |
| JSON | threefive3 < json.json |
| Xmlbin | js threefive3 < xmlbin.xml |
Streams
| Protocol | Cli Example |
|---|---|
| File | threefive3 video.ts |
| Http(s) | threefive3 https://example.com/video.ts |
| Stdin | threefive3 < video.ts |
| UDP Multicast | threefive3 udp://@235.35.3.5:9999 |
| UDP Unicast | threefive3 udp://10.0.0.7:5555 |
| HLS | threefive3 hls https://example.com/master.m3u8 |
Outputs
- output type is determined by the key words base64, bytes, hex, int, json, and xmlbin.
- json is the default.
- Any input (except HLS,) can be returned as any output
- examples Base64 to Hex etc...)
| Output Type | Cli Example |
|---|---|
| Base 64 | threefive3 0xfc301600000000000000fff00506fed605225b0000b0b65f3b base64 |
| Bytes | threefive3 0xfc301600000000000000fff00506fed605225b0000b0b65f3b bytes |
| Hex | threefive3 '/DAsAAAAAyiYAP/wCgUAAAABf1+ZmQEBABECD0NVRUkAAAAAf4ABADUAAC2XQZU=' hex |
| Integer | threefive3 '/DAsAAAAAyiYAP/wCgUAAAABf1+ZmQEBABECD0NVRUkAAAAAf4ABADUAAC2XQZU=' int |
| JSON | threefive3 0xfc301600000000000000fff00506fed605225b0000b0b65f3b json |
| Xml+bin | threefive3 0xfc301600000000000000fff00506fed605225b0000b0b65f3b xmlbin |
hls
- parse hls manifests and segments for SCTE-35
threefive3 hls https://example.com/master.m3u8
Iframes
- Show iframes PTS in an MPEGTS video
threefive3 iframes https://example.com/video.ts
packets
- Print raw SCTE-35 packets from multicast mpegts video
threefive3 packets udp://@235.35.3.5:3535
proxy
- Parse a https stream and write raw video to stdout
threefive3 proxy video.ts
pts
- Print PTS from mpegts video
threefive3 pts video.ts
sidecar
- Parse a stream, write pts,write SCTE-35 Cues to sidecar.txt
threefive3 sidecar video.ts
sixfix
- Fix SCTE-35 data mangled by ffmpeg
threefive3 sixfix video.ts
show
- Probe mpegts video ( kind of like ffprobe )
threefive3 show video.ts
version
- Show version
threefive3 version
help
- Help
threefive3 help
iodisco.com/scte35
Install threefive3 | SCTE-35 HLS | Cue Class | Stream Class | Online SCTE-35 Parser | Encode SCTE-35 | FFmpeg SCTE35
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file threefive3-3.0.29.tar.gz.
File metadata
- Download URL: threefive3-3.0.29.tar.gz
- Upload date:
- Size: 53.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11c19684a11479d54d22ed77e8be46d88068d67409c793472a4423bea8320a12
|
|
| MD5 |
e37391e336efd87192769d23b20c99df
|
|
| BLAKE2b-256 |
7f0a8340b74701f70f50917e9e3f415495651c6c5d811cc1fd5591a9757cb6a3
|
File details
Details for the file threefive3-3.0.29-py3-none-any.whl.
File metadata
- Download URL: threefive3-3.0.29-py3-none-any.whl
- Upload date:
- Size: 58.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b673ca844128d8ac8947863c82e4ce7431fa26f7945c5838363aebbd2743a730
|
|
| MD5 |
8c7bf187f22d984de2fbbefe0c902d67
|
|
| BLAKE2b-256 |
e04f56484b50471a7fc4cb7625c0c4848dbcd72e4c4817950c2cd592ea2b3b6d
|