Fumatic SCTE-35 Encoder/ Decoder for MPEGTS, HLS , DASH and everything else...
Project description
I wrote threefive because I couldn't find any SCTE-35 tools. There were a few libraries, but SCTE-35 wasn't their focus, and they required writing several hundred lines of code to do anything. I think a library should save you time.
Why sctefu, why not just threefive?
- Answer #1 Github F2A'ed out of my account, and I have no idea where I put the recovery codes. I have more than one Internet account, where I am supposed to keep all this data? Should I store in some company's cloud so they can read it or give it away to Eastern European script kiddies? F2A is complete nonsense. It doesn't matter how secure it is, if a security measure prevents me from accessing my account, that's not secure, that's locked out.
- Answer #2 Two repos with the same name, would be confusing.
- Answer #3 I wanted to rethink everything. After going through the code, I kept about 75% of it. I completely rewrote the Xml parser,I did a lot of work with the Cue class, HLS, and really tuned up the cli. The cli is amazing and super easy to use.
- Answer #4 I came up with a really cool name, but it wasn't available on pypi.org for a package name.
- Answer #5 Really, I was just getting a little bored with the whole thing, I just wanted to shake things up a little, keep it fun.
- Answer #6 Have you seen chewy Tic Tacs? They're just mini jelly beans.
- Answer #7 I'll tell you the truth, everything is a lie.
- Answer #8 Obama is a lizard. I'm not sure about his wife.
How do I upgrade my code to sctefu?
Despite making a lot of changes, the api remains. sctefu is pretty much a drop in replacement for threefive. I used sed to upgrade my code.
sed -e 's/threefive/sctefu/g'
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.
Is sctefu faster than threefive?
threefive vs. sctefu vs. sctefu next release
- testing was done on a beatup chrome book reporting 5GB of RAM running Debian Sid and PyPy 7.3.11
Now with Super Advanced Error Detection and Stuff.
- This is super cool.
- Does not generate Fatal errors, it won't break your process.
- Displays what is in error and how to correct it.
- Works in the cli
- Works in code.
Issues and Bugs.
- 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 the SCTE-35.
Special Requests
- If need some work done, this is what I do for a living, you can hire me.
- If you want to discuss your project open an issue and I'll send you my contact info.
Install
- python3 via pip
python3 -mpip install sctefu
- pypy3
pypy3 -mpip install sctefu
- from the git repo
git clone https://github.com/superkabuki/scte35.git
cd scte35
make install
The Cli tool
The cli audetects data being available on 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.HLS requires the
hlsketyword.
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
| Input Type | Cli Example |
|---|---|
| Base64 | sctefu '/DAsAAAAAyiYAP/wCgUAAAABf1+ZmQEBABECD0NVRUkAAAAAf4ABADUAAC2XQZU=' |
| Hex | sctefu 0xfc301600000000000000fff00506fed605225b0000b0b65f3b |
| HLS | sctefu hls https://example.com/master.m3u8 |
| JSON | sctefu < json.json |
| Xml | sctefu < xml.xml |
| Xmlbin | sctefu < xmlbin.xml |
Streams
| Protocol | Cli Example |
|---|---|
| File | sctefu video.ts |
| Http(s) | sctefu https://example.com/video.ts |
| Stdin | sctefu < video.ts |
| UDP Multicast | sctefu udp://@235.35.3.5:9999 |
| UDP Unicast | sctefu udp://10.0.0.7:5555 |
| HLS | sctefu hls https://example.com/master.m3u8 |
Outputs
- output type is determined by the key words base64, bytes, hex, int, json, xml, and xmlbin.
- json is the default.
- Any input (except HLS,) can be returned as any output
- examples Base64 to Hex, or Mpegts to Xml, etc...)
| Output Type | Cli Example |
|---|---|
| Base 64 | sctefu 0xfc301600000000000000fff00506fed605225b0000b0b65f3b base64 |
| Bytes | sctefu 0xfc301600000000000000fff00506fed605225b0000b0b65f3b bytes |
| Hex | sctefu '/DAsAAAAAyiYAP/wCgUAAAABf1+ZmQEBABECD0NVRUkAAAAAf4ABADUAAC2XQZU=' hex |
| Integer | sctefu '/DAsAAAAAyiYAP/wCgUAAAABf1+ZmQEBABECD0NVRUkAAAAAf4ABADUAAC2XQZU=' int |
| JSON | sctefu 0xfc301600000000000000fff00506fed605225b0000b0b65f3b json |
| Xml | sctefu '/DAsAAAAAyiYAP/wCgUAAAABf1+ZmQEBABECD0NVRUkAAAAAf4ABADUAAC2XQZU=' xml ` |
| Xml+bin | sctefu 0xfc301600000000000000fff00506fed605225b0000b0b65f3b xmlbin |
hls
- parse hls manifests and segments for SCTE-35
sctefu hls https://example.com/master.m3u8
Iframes
- Show iframes PTS in an MPEGTS video
sctefu iframes https://example.com/video.ts
packets
- Print raw SCTE-35 packets from multicast mpegts video
sctefu packets udp://@235.35.3.5:3535
proxy
- Parse a https stream and write raw video to stdout
sctefu proxy video.ts
pts
- Print PTS from mpegts video
sctefu pts video.ts
sidecar
- Parse a stream, write pts,write SCTE-35 Cues to sidecar.txt
sctefu sidecar video.ts
sixfix
- Fix SCTE-35 data mangled by ffmpeg
sctefu sixfix video.ts
show
- Probe mpegts video ( kind of like ffprobe )
sctefu show video.ts
version
- Show version
sctefu version
help
- Help
sctefu help
iodisco.com/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 sctefu-3.0.5.tar.gz.
File metadata
- Download URL: sctefu-3.0.5.tar.gz
- Upload date:
- Size: 50.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6876cd2e1f8da1b73ea42f9d2789d7d258572a72ee096f0e3fb6cc8e04800bb
|
|
| MD5 |
f017b08cb1af5d98351206c964a47e75
|
|
| BLAKE2b-256 |
4bfaa867debfe482dfe8284080de2b4704e3b750f4bcab80b82f5ecd3608b5fa
|
File details
Details for the file sctefu-3.0.5-py3-none-any.whl.
File metadata
- Download URL: sctefu-3.0.5-py3-none-any.whl
- Upload date:
- Size: 54.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ceb6774c3ecda5d814d3e1cf973289490a9184b7743772de1dffdbaa551ff607
|
|
| MD5 |
44e7606e61250e5bba85f8d384084016
|
|
| BLAKE2b-256 |
b1bcb2215698b4ec68699c991c69472a5bd5baea9db47883a9e88976180150e4
|