def stop(self): if self.subsfile is not None and os.path.exists(self.subsfile): try: os.remove(self.subsfile) except Exception: pass ExternalProcess.stop(self)
def start(self, args): self.cmd = OMX_CMD if 'subtitles' in args: self.cmd = self.cmd + "--align center --subtitles '" + args[ 'subtitles'] + "' " fname = args['outfile'] #if fname.startswith('http'): # self.cmd = self.cmd + "'" + fname + "'" if not self._wait_input(fname): self._set_error("Omxplayer timed out waiting for input file") self.msg_halted() return else: pid = args['pid'] tail = "tail -f --pid=" + str( pid) + " --bytes=+0 \"" + fname + "\"" #self.cmd = tail + ' | ' + self.cmd + 'pipe:0' self.cmd = tail + ' | ' + 'omxplayer --hw --timeout 60s -o both --no-keys pipe:0 ' # Wait a bit for input cherrypy.log("OMXPROCESS: " + self.cmd) #print "self.cmd => " + self.cmd #f = open("/tmp/demofile3.txt", "w") #f.write(self.cmd) #f.close() time.sleep(10) ExternalProcess.start(self, args)
def stop(self): if os.path.exists(_CMD_FIFO): try: os.remove(_CMD_FIFO) except Exception: pass ExternalProcess.stop(self)
def __init__(self, url, quality='best'): ExternalProcess.__init__(self) cmd = [ 'livestreamer', url, quality, '--http-header', 'Client-ID=tq6hq1srip0i37ipzuscegt7viex9fh', '--output', OUT_FILE, '--player-fifo' ] self.cmd = cmd
def __init__(self, url, quality='best'): ExternalProcess.__init__(self) cmd = [ 'livestreamer', url, quality, '--output', OUT_FILE, '--player-fifo' ] self.cmd = cmd
def __init__(self, torrent, idx): ExternalProcess.__init__(self) cmd = ["node", "--max-old-space-size=128", "/usr/local/bin/peerflix"] # Avoid problems with downloading torrent files torrent = chanutils.torrent.torrent2magnet(torrent) cmd.append(torrent) cmd.append("-q") cmd.append("-r") cmd.append("-p") cmd.append(_PEERFLIX_PORT) if idx is not None and idx >= 0: cmd.append("-i") cmd.append(str(idx)) self.cmd = cmd
def start(self, args): self.cmd = OMX_CMD if 'subtitles' in args: self.cmd = self.cmd + "--align center --subtitles '" + args['subtitles'] + "' " fname = args['outfile'] if fname.startswith('http'): self.cmd = self.cmd + "'" + fname + "'" elif not self._wait_input(fname): self._set_error("Omxplayer timed out waiting for input file") self.msg_halted() return else: pid = args['pid'] tail = "tail -f --pid=" + str(pid) + " --bytes=+0 \"" + fname + "\"" self.cmd = tail + ' | ' + self.cmd + 'pipe:0' # Wait a bit for input time.sleep(5) ExternalProcess.start(self, args)
def stop(self): try: shutil.rmtree('/tmp/torrent-stream') except Exception: pass ExternalProcess.stop(self)
def __init__(self): ExternalProcess.__init__(self, True)
def start(self, args): if not os.path.exists(_CMD_FIFO): os.system("mkfifo " + _CMD_FIFO) ExternalProcess.start(self, args)
def __init__(self, url): ExternalProcess.__init__(self) self.url = url
def __init__(self, message): ExternalProcess.__init__(self) cmd = ['notify-send', '--expire-time', '10000', message] self.cmd = cmd
def __init__(self, subs): ExternalProcess.__init__(self) self.subs = subs self.subsfile = None
def __init__(self, cmd): ExternalProcess.__init__(self) cmd.insert(0, 'rtmpdump') cmd.append('-o') cmd.append(OUT_FILE) self.cmd = cmd