141 output: produces internal ffmpeg command list (empty command list on error) |
141 output: produces internal ffmpeg command list (empty command list on error) |
142 """ |
142 """ |
143 if not self.filename: |
143 if not self.filename: |
144 return None |
144 return None |
145 |
145 |
|
146 |
146 commands = [] |
147 commands = [] |
147 fn = "\\'".join(p for p in self.filename.split("'")) |
148 fn = "\\'".join(p for p in self.filename.split("'")) |
148 fn = fn.replace(" ", "\\ ") |
149 fn = fn.replace(" ", "\\ ") |
149 outfn = self.outfilebase + ".mkv" |
150 outfn = self.outfilebase + ".mkv" |
|
151 # double-check: pull the kill switch and exit if outfile exists already! |
|
152 # we do not want to overwrite files in accident (caused by automatic file naming) |
|
153 if len(glob.glob(outfn)) > 0: |
|
154 print "Output file exists: %s" % outfn |
|
155 print "NOT overwriting it!" |
|
156 return None |
150 outfn = "\\'".join(p for p in outfn.split("'")) |
157 outfn = "\\'".join(p for p in outfn.split("'")) |
151 outfn = outfn.replace(" ", "\\ ") |
158 outfn = outfn.replace(" ", "\\ ") |
152 |
159 |
153 cmd = ["ffmpeg", |
160 cmd = ["ffmpeg", |
154 "-ss 00:05:00", "-t 1", # search to 5 minutes, analyze 1 second |
161 "-ss 00:05:00", "-t 1", # search to 5 minutes, analyze 1 second |