import subprocess class Reciever: def __init__(self, protocol: str, target: str) -> None: self.protocol = protocol # should be 'tcp' or 'udp' self.target = target def start(self): # currently there is no direct ffplay support in the ffmpeg package addr = self.protocol+ '://' + self.target + '?listen' self.proc = subprocess.Popen(['ffplay', '-fflags', 'nobuffer', '-flags', 'low_delay', '-f', 'mpegts', addr])