-
Notifications
You must be signed in to change notification settings - Fork 30
Hi, I am having some problem scte encoding in my current application. First let me throw some light on what I am doing.
I have created one POIS server for SCTE35 conditioning. In one of the cases, I have to change the break duration of the in-band scte35 (Splice Insert) marker and send the new scte35. For eg. I am receiving a scte35 maker with duration 30 seconds so I will change it to 60 seconds re encode and send the updated marker.
As the duration of the marker has changed, I have to also require to recalculate the pts_time. pts_time is a required field to re-encode scte.
I don't know how to calculate it and I think this library dosen't have any method to calculate it(maybe I am wrong here).
Can someone please suggest as to how can I calculate pts_time with respect to break_duration ? I would be great if you can point out to any method that I can use.
I am not so much familiar with scte. My POIS server code is in python.
Thanks and have a great day!
All reactions
I have no idea what a POIS server is, but then again, there is a lot I don't know.
If you want to change the break_duration, just change the break duration and re-encode.
a@debian:~/tunein$pypy3 Python 3.9.16 (7.3.11+dfsg-2, Feb 06 2023, 16:52:03) [PyPy 7.3.11 with GCC 12.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>>> from threefive import Cue >>>> cue = Cue('/DBFAAAAAyiYAP/wFAUAAAABf+//uX+wrv4ApN46mZkBAQAgAh5DVUVJAAAAAH/AAACky\ 4ABCDEwMTAwMDAwNAAAAAArI1sl=') >>>> cue.decode() True >>>> cue.command.break_duration 120.053267 >>>> cue.command.break_duration = 180.0 >>>> cue.encode() '/DBFAAAAAyiYAP/wFAUAAAABf+//uX+wrv4A9zFAmZkBAQAgAh5DVUVJAAAAAH/A...
Replies: 2 comments
I have no idea what a POIS server is, but then again, there is a lot I don't know.
If you want to change the break_duration, just change the break duration and re-encode.
a@debian:~/tunein$pypy3 Python 3.9.16 (7.3.11+dfsg-2, Feb 06 2023, 16:52:03) [PyPy 7.3.11 with GCC 12.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>>> from threefive import Cue >>>> cue = Cue('/DBFAAAAAyiYAP/wFAUAAAABf+//uX+wrv4ApN46mZkBAQAgAh5DVUVJAAAAAH/AAACky\ 4ABCDEwMTAwMDAwNAAAAAArI1sl=') >>>> cue.decode() True >>>> cue.command.break_duration 120.053267 >>>> cue.command.break_duration = 180.0 >>>> cue.encode() '/DBFAAAAAyiYAP/wFAUAAAABf+//uX+wrv4A9zFAmZkBAQAgAh5DVUVJAAAAAH/AAACky4ABCDEwMTAwMDAwNAAAAACIOyLB' >>>> cue.command.break_duration 180.0 >>>>
If you have an associated splice in add the change in cue.command.break_duration of the splice out to the pts_time of the the splice in . In this example 180 - 120.053267 = 59.946733 I would to the splicein pts_time and re-encode.
(SpliceOut )cue.command.pts_time + cue.command.break_duration = (SpliceIn) cue.command.pts_time
All reactions
I looked up POIS server, and I found one using threefive, but a version from over a year ago.
I didn't know. :)
https://github.com/scunning1987/pois_reference_server
I strongly recommend using the latest threefive, it shouldn't break anything, but if something does, let me know and I'll help you sort it out.