diff -r daa61fffb811 -r 715f854a93cd gmyth-stream/server/plugins/transcoders/mencoder.py --- a/gmyth-stream/server/plugins/transcoders/mencoder.py Wed Aug 29 14:42:10 2007 +0100 +++ b/gmyth-stream/server/plugins/transcoders/mencoder.py Tue Jan 29 20:12:30 2008 +0000 @@ -42,7 +42,6 @@ self.args["local"] = params_first("local", False) self.args["language"] = params_first("language", False) self.args["subtitle"] = params_first("subtitle", False) - self.args["format"] = params_first("format", "mpeg1") self.args["outfile"] = params_first("outfile", "-") # input_opt @@ -50,16 +49,15 @@ self.args["input"] = params_first("uri", "-") # audio_opts - self.args["acodec"] = params_first("acodec", "mp2") - self.args["abitrate"] = params_first("abitrate", 192) - self.args["volume"] = params_first("volume", 5) + self.args["acodec"] = params_first("acodec", "mp3lame") + self.args["abitrate"] = params_first("abitrate", 128) + self.args["volume"] = params_first("volume", 9) # video_opts - self.args["mux"] = params_first("mux", "mpeg") self.args["fps"] = params_first("fps", 25) - self.args["vcodec"] = params_first("vcodec", "mpeg1video") - self.args["vbitrate"] = params_first("vbitrate", 400) - self.args["width"] = params_first("width", 320) + self.args["vcodec"] = params_first("vcodec", "msmpeg4v2") + self.args["vbitrate"] = params_first("vbitrate", 500) + self.args["width"] = params_first("width", 400) self.args["height"] = params_first("height", 240) # _setup_params() @@ -77,20 +75,17 @@ def _setup_video(self): - video = " -of %s" % self.args["mux"] - video += " -ofps %s" % self.args["fps"] + #video = " -of %s" % self.args["mux"] + video = " -ofps %s" % self.args["fps"] vcodec = self.args["vcodec"] if vcodec == "nuv" or vcodec == "xvid"\ or vcodec == "qtvideo" or vcodec == "copy": video += " -ovc %s" % vcodec else: - video += " -ovc lavc -lavcopts vcodec=%s:vbitrate=%s" % ( + video += " -ovc lavc -lavcopts vcodec=%s:vhq:vbitrate=%s" % ( vcodec, self.args["vbitrate"]) - if self.args["mux"] == "mpeg": - video += " -mpegopts format=%s" % self.args["format"] - video += " -vf scale=%s:%s" % (self.args["width"], self.args["height"]) return video # _setup_video() @@ -274,6 +269,7 @@ def _run_mencoder(self, input=None, output=None): try: + print self.mencoder_opts self.proc = subprocess.Popen(self.mencoder_opts, stdin=input, stdout=output, close_fds=True) except Exception, e: