def command(cls, session): command = [] if session.options.get("ffmpeg-ffmpeg"): command.append(session.options.get("ffmpeg-ffmpeg")) for cmd in command or cls.__commands__: if which(cmd): return cmd
def _check_cmd(self): if not self.cmd: raise StreamError("`cmd' attribute not set") cmd = which(self.cmd) if not cmd: raise StreamError("Unable to find `{0}' command".format(self.cmd)) return cmd
def is_usable(cls, session): cmd = session.options.get("rtmp-rtmpdump") return which(cmd) is not None