Exemple #1
0
	#print glob(inputfiles);
	
	
	for moviefile in inputfiles:
		
		movie = cv.CaptureFromFile(moviefile)
		frame =  cv.QueryFrame(movie)
		framecount = 0

		if not prefix:
			slitscanner.setFilePrefix(os.path.basename(moviefile).split(".")[0])

		if not hadfirst:
			ratio = out_h / float(frame.width)
			lh = int((frame.height-crop) * ratio * stretch)
			slitscanner.setSlitWidth(lh)		
			framecount = 0
			line = [0,0]
			hadfirst = True
		
		# open and init log files
		if write_log_files:
			logfile = moviefile + ".log"
			if jp4:
				if not os.path.exists(logfile):
					logfile = moviefile[:-8] + ".avi.log"
					
			logreader = csv.reader(open(logfile,"rb"), delimiter=";")
			
			noMoreLogLine = False
			line = logreader.next()