Skip to main content

threefive continued.

Project description

threefive3 SCTE-35 cli super tool and python3 library.

✅ SCTE-35 Parser ✅ SCTE-35 Encoder ✅ SCTE-35 HLS ✅ SCTE-35 Xml ✅ SCTE-35 Cli ✅ SCTE-35 library

  • Parses SCTE-35 from MPEGTS, HLS, XML, XML+Binary, Base64, Bytes, Hex, Integers, or JSON.
  • Encode SCTE-35 to Base64, Bytes, Hex, Int, JSON, Xml, 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.19

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()

Heads Up!

threefive3 is a lot to do by myself, in my spare time. I'm going to impose on y'all a little.

I am currently working on error reporting. I am trying to aggregate the errors into each object, so if you have multiple errors, you can get them all at once, rather than one at a time. I need to try some stuff so I can see how it works and how it fails. If I have to do this alone, it will take much longer than if y'all help me. I will probably push a couple releases this week, I need you to use then. Be a good citizen and get involved. That's what makes open source work.

Documentation

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)

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.

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,xml or xml+bin), redirect the file contents.
  threefive3 < json.json  

  threefive3 < xml.xml

  cat xml.xml | threefive3
  • quoted strings(( base64,hex,int,json,xml 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
Xml threefive3 < xml.xml
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, 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 threefive3 0xfc301600000000000000fff00506fed605225b0000b0b65f3b base64
Bytes threefive3 0xfc301600000000000000fff00506fed605225b0000b0b65f3b bytes
Hex threefive3 '/DAsAAAAAyiYAP/wCgUAAAABf1+ZmQEBABECD0NVRUkAAAAAf4ABADUAAC2XQZU=' hex
Integer threefive3 '/DAsAAAAAyiYAP/wCgUAAAABf1+ZmQEBABECD0NVRUkAAAAAf4ABADUAAC2XQZU=' int
JSON threefive3 0xfc301600000000000000fff00506fed605225b0000b0b65f3b json
Xml threefive3 '/DAsAAAAAyiYAP/wCgUAAAABf1+ZmQEBABECD0NVRUkAAAAAf4ABADUAAC2XQZU=' xml `
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

image


iodisco.com/scte35

image


Install |SCTE-35 Cli |SCTE-35 Xml | Cue Class | Stream Class | Online SCTE-35 Parser | Encode SCTE-35 FFmpeg SCTE35

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

threefive3-3.0.19.tar.gz (52.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

threefive3-3.0.19-py3-none-any.whl (57.2 kB view details)

Uploaded Python 3

File details

Details for the file threefive3-3.0.19.tar.gz.

File metadata

  • Download URL: threefive3-3.0.19.tar.gz
  • Upload date:
  • Size: 52.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for threefive3-3.0.19.tar.gz
Algorithm Hash digest
SHA256 66f18422daeda19038c87a8af72c3907684b804e8d0f2c45b7d8973a4ee09dc8
MD5 b0494118d21880364a20418449789b55
BLAKE2b-256 afaa575322fc2fc4639b745377fd656ab5414878d316db8fe47017433e0b3dab

See more details on using hashes here.

File details

Details for the file threefive3-3.0.19-py3-none-any.whl.

File metadata

  • Download URL: threefive3-3.0.19-py3-none-any.whl
  • Upload date:
  • Size: 57.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for threefive3-3.0.19-py3-none-any.whl
Algorithm Hash digest
SHA256 980d6c535cc738dc559a346c447268092e08f65d18c0089ed12e4b5bc42638f9
MD5 da7131153f1067364d49602bef7f4573
BLAKE2b-256 3893d74107463a252154870ca836fb52cf781ec63ef8ed4a382a03be779da464

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page