Giter VIP home page Giter VIP logo

Comments (3)

futzu avatar futzu commented on July 16, 2024 1

try this out, it blanks out the sidecar file each time it loads the cues.

from x9k3 import X9K3
from new_reader import reader
from collections import deque
from operator import itemgetter

class X9K5(X9K3):

    def load_sidecar(self, file, pid):
        """
        load_sidecar reads (pts, cue) pairs from
        the sidecar file and loads them into X9K3.sidecar
        if live, blank out the sidecar file after cues are loaded.
        """
        if self.sidecar_file:
            with reader(file) as sidefile:
                for line in sidefile:
                    line = line.decode().strip().split("#", 1)[0]
                    if len(line):
                        pts, cue = line.split(",", 1)
                        if float(pts) >= self.pid2pts(pid):
                            if [float(pts), cue] not in self.sidecar:
                                print("loading",pts,cue)
                                self.sidecar.append([float(pts), cue])
                                self.sidecar = deque(
                                    sorted(self.sidecar, key=itemgetter(0))
                                )
                sidefile.close()
            if self.live:
                with open(self.sidecar_file,'w') as scf:
                    scf.close()



if __name__ == "__main__":
    stuff = X9K5()
    stuff.run()

from scte-35_hls_x9k3.

futzu avatar futzu commented on July 16, 2024

I'm sure it does crash if you delete the file its reading :)
TCP connect to send SCTE35 is called SCTE 104,
I just don't have the time to do all that any time soon.
If you want to hire me, I can do it for you.

hold on, I think I have an idea.....

from scte-35_hls_x9k3.

futzu avatar futzu commented on July 16, 2024

This fix is in 0.1.49

from scte-35_hls_x9k3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.