a/trunk/tubetutor/tubetutor.py | b/trunk/tubetutor/tubetutor.py | ||
---|---|---|---|
... |
... |
||
281 | 281 | ||
282 | # mux intro |
282 | # mux intro |
283 | r = ffmpeg.renderer() |
283 | r = ffmpeg.renderer() |
284 | r.resolution(resolution) |
284 | r.resolution(resolution) |
285 | r.filename(os.path.join(path, "tmp", "intro-concat.mkv")) |
285 | r.filename(os.path.join(path, "tmp", "intro-concat.mkv")) |
286 | r.mux(os.path.join(path, "tmp", "intro.mkv"), os.path.join("media", "intro.mp3")) |
286 | r.mux(os.path.join(path, "tmp", "intro.mkv"), os.path.join("media", "intro.mp3"), replace=(not ffmpeg.audio)) |
287 | videos.append(r.lastfilename) |
287 | videos.append(r.lastfilename) |
288 | r = ffmpeg.renderer() |
288 | r = ffmpeg.renderer() |
289 | r.resolution(resolution) |
289 | r.resolution(resolution) |
290 | |||
290 | else: |
291 | else: |
291 | params = " -scale %s!" % resolution.replace(":", "x") |
292 | params = " -scale %s!" % resolution.replace(":", "x") |
292 | params += " -font %s -weight 500 -pointsize 100" % ffmpeg.font |
293 | params += " -font %s -weight 500 -pointsize 100" % ffmpeg.font |
293 | params += " -draw \"gravity northwest fill white text 100,775 '%s'\"" % self.get_title() |
294 | params += " -draw \"gravity northwest fill white text 100,775 '%s'\"" % self.get_title() |
294 | params += " -scale %s!" % resolution.replace(":", "x") |
295 | params += " -scale %s!" % resolution.replace(":", "x") |
... |
... |
||
306 | continue |
307 | continue |
307 | if file.endswith(".txt"): |
308 | if file.endswith(".txt"): |
308 | description += "- %s" % r.add_text(file) |
309 | description += "- %s" % r.add_text(file) |
309 | if file.endswith(".mkv") or file.endswith(".mp4"): |
310 | if file.endswith(".mkv") or file.endswith(".mp4"): |
310 | r.add_video(file) |
311 | r.add_video(file) |
311 | r.concat(os.path.join(path, "tmp", "concat.mkv"), audio=True) |
312 | r.concat(os.path.join(path, "tmp", "concat.mkv"), audio=ffmpeg.audio) |
312 | #r.speedup(os.path.join(path, "tmp", "speedup.mkv"), 0.7) |
313 | r.speedup(os.path.join(path, "tmp", "speedup.mkv"), 0.7) |
313 | r.mux(os.path.join(path, "tmp", "main.mkv"), os.path.join("media", "back.mp3")) |
314 | r.mux(os.path.join(path, "tmp", "main.mkv"), os.path.join("media", "back.mp3"), replace=(not ffmpeg.audio)) |
314 | videos.append(r.lastfilename) |
315 | videos.append(r.lastfilename) |
315 | 316 | ||
316 | # outro |
317 | # outro |
317 | if os.path.exists(os.path.join("media", "outro.mkv")): |
318 | if os.path.exists(os.path.join("media", "outro.mkv")): |
318 | r = ffmpeg.renderer() |
319 | r = ffmpeg.renderer() |