All pastes #761259 Raw Edit

leleobhz

public text v1 · immutable
·published 2007-11-04 19:09 UTC
rendered paste body
def mencoder(link,destin):
        test = (parse_asx(link))
        test = str(test[0])
        i= os.fork()
        process = subprocess.Popen(['mencoder', '-oac', 'copy', '-ovc', 'copy', '-o', destin, test], stdout=subprocess.PIPE)
        if i != 0:
                while process.returncode != "None":
                        aLine = process.stdout.readline()
                        if not aLine: break
                        if aLine > 100 or aLine < 0: break
                        percentage = aLine.split("\(")[1]
                        percentage = aLine.split("\)")[0]
                        percentage = re.match("[0-9]+%$",percentage)
                        percentage = percentage.replace("%","")
                        print (percentage+"\r")