def run(self): if not self.__check(): Log.e("Input file does not exists") self.__showErrorDialog("File path does not exists") return self.__runner = Runner(self.__outputFile) try: Log.i("Started recording") self.__runner.runCommand() except ChildProcessError: self.__showErrorDialog("Error running FFmpeg")
def runCommand(self): """ Running the command line with subprocess module, using the Log class to print some info and errors """ self.__run = subprocess.Popen(args=self.buildCommand(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True, preexec_fn=os.setsid) if not self.__processKilled: for _ in iter(self.__run.stdout.readlines, ""): pass self.__run.stdout.close() if self.__run.wait(): Log.e("Error occurred while running the PyRecorder Command line.") raise ChildProcessError("It's not working") return
from lib.logger import Log Log.setPrint(True) Log.d("Ok this function is working") Log.i("The video format suggested is .mp4") Log.e("Error parsing the video format") Log.w(f"Using mpeg4sc to parse the video : {10 ** 10}xdRG")
from lib.logger import Log from lib.planner import Planner startState = input("Enter the start state :: ") goalState = input("Enter the goal state :: ") print() planner = Planner(verbose=True) plan = planner.getPlan(startState=startState, goalState=goalState) Log.e(f"Final plane derived ::") for p in plan: Log.i(p)