+ self.check_no_file("lossless.avi")
+
+ ofut = self.opts
+ self.opts = duplicate_opts(ofut)
+ ofut.input = "lossless.avi"
+ ofut.mplayer_done = True
+
+ def run(self):
+ fifo = False
+ if fifo:
+ os.mkfifo("lossless.avi")
+ o = self.opts
+ cmd = []
+ cmd += ["mencoder", self.opts.input, "-o", "lossless.avi"]
+ cmd += ["-noconfig", "all"]
+ cmd += ["-oac", "copy", "-ovc", "lavc", "-lavcopts", "vcodec=ffv1:autoaspect"]
+ insert_mplayer_options(cmd, self.opts)
+ cmd += ["-vf-add", "harddup"]
+ self.do_exec(cmd, wait=not fifo)
+
+
+
+class MPlayer(Command):
+ def init(self):
+ self.check_command("mplayer")
+ self.check_no_file("video.y4m")
+ self.check_no_file("audio.wav")
+
+ def run(self):
+ os.mkfifo("video.y4m")
+ os.mkfifo("audio.wav")
+ cmd = []
+ cmd += ["mplayer", self.opts.input]
+ cmd += ["-benchmark", "-noconsolecontrols", "-noconfig", "all"]
+ cmd += ["-vo", "yuv4mpeg:file=video.y4m"]
+ cmd += ["-ao", "pcm:waveheader:file=audio.wav"]
+ insert_mplayer_options(cmd, self.opts)
+ cmd += self.profile.mplayeropts
+ self.do_exec(cmd, wait=False)
+
+
+class MencoderCopyAC3(Command):
+ def init(self):
+ self.check_command("mplayer")
+ self.check_no_file("audio.ac3")
+ self.profile.audio_tmp = "audio.ac3"
+
+ def run(self):
+ cmd = []
+ cmd += ["mencoder", self.opts.input]
+ cmd += ["-noconfig", "all"]
+ cmd += ["-ovc", "copy", "-oac", "copy"]
+ cmd += ["-of", "rawaudio", "-o", "audio.ac3"]
+ insert_mplayer_options(cmd, self.opts)
+ self.do_exec(cmd)
+
+
+class X264(Command):
+ def init(self):
+ self.check_command("x264")
+ self.profile.video_tmp = "video.h264"