-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to create SCTE messages? #7
Comments
You would think it would be straight forward, but like many things in computing, Complex cue messageshttps://github.com/futzu/scte35-threefive/blob/master/Encoding.md Simple Splice Insertthreefive.encode has some new encoding functions that I haven't announced yet, a@debian:~/build/clean/scte35-threefive$ pypy3
Python 3.8.13 (7.3.9+dfsg-5, Oct 30 2022, 09:55:31)
[PyPy 7.3.9 with GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>> from threefive import encode
>>>> help(encode)
Help on module threefive.encode in threefive:
NAME
threefive.encode - encode.py
DESCRIPTION
threefive.encode has helper functions for Cue encoding.
FUNCTIONS
mk_splice_insert(event_id, pts, duration=None)
mk_cue returns a Cue
with a Splice Insert.
splice_event_id = event_id
If duration is NOT set,
out_of_network_indicator False
time_specified_flag False
duration_flag False
splice_immediate_flag True
if duration IS set:
out_of_network_indicator True
time_specified_flag True
duration_flag True
splice_immediate_flag False
break_auto_return True
break_duration duration
pts_time pts
mk_splice_null()
mk_splice_null returns a Cue
with a Splice Null
mk_time_signal(pts=None)
mk_time_signal returns a Cue
with a Time Signal
if pts is NOT set:
time_specified_flag False
if pts IS set:
time_specified_flag True
pts_time pts
FILE
/home/a/build/clean/scte35-threefive/threefive/encode.py
a@debian:~/cuei$ pypy3
Python 3.8.13 (7.3.9+dfsg-5, Oct 30 2022, 09:55:31)
[PyPy 7.3.9 with GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>> from threefive.encode import mk_splice_insert
>>>> evnt_id= 9
>>>> pts = 29053.123456
>>>> duration = 300
>>>> cue =mk_splice_insert(evnt_id,pts,duration)
|
| encode(self)
| Cue.encode() converts SCTE35 data
| to a base64 encoded string.
|
| encode_as_hex(self)
| encode_as_hex returns self.bites as
| a hex string
|
| encode_as_int(self)
| encode_as_int returns self.bites as an int.
|
>>>> cue.encode()
'/DAlAAAAAAAAAP/wFAUAAAAJf+/+m9pkt/4Bm/zAAAkAAAAA5ftzmA=='
>>>> cue.encode_as_hex()
'0xfc302500000000000000fff01405000000097feffe9bda64b7fe019bfcc0000900000000e5fb7398'
>>>> cue.encode_as_int()
2104181392760166021170929920497819646350710275162000838308971042240028739408705486837725464851352 |
Hi @futzu , |
I am new to SCTE and need help on creating SCTE messages like below. I need to understand what does these string means and how I can create and use with this package.
Note: I have copied these messages from your examples.
I am able to insert them my livestream output using this package piping with ffmpeg.
Any help is highly appriciated.
Thank You
The text was updated successfully, but these errors were encountered: