1.1 --- a/gmyth-stream/server/0.2/plugins/transcoders/gmencoder.py Mon Apr 23 21:08:07 2007 +0100
1.2 +++ b/gmyth-stream/server/0.2/plugins/transcoders/gmencoder.py Thu Apr 26 22:33:00 2007 +0100
1.3 @@ -13,7 +13,6 @@
1.4 name = "gmencoder"
1.5 priority = -1
1.6 proc = None
1.7 - args = {}
1.8
1.9 def __init__(self, params):
1.10 server.Transcoder.__init__(self, params)
1.11 @@ -28,6 +27,9 @@
1.12 def _parser_params (self):
1.13 self._insert_param("-i", \
1.14 "%s://%s" % (self.params_first("uri_prefix", "file"), self.params_first("uri_path", "")))
1.15 +
1.16 + #self._insert_param("-i", self.params_first("uri", ""))
1.17 +
1.18 self._insert_param("--video-encode", self.params_first("ve", ""))
1.19 self._insert_param("--video-opts", "bitrate=200,pass=2,quantizer=5")
1.20 self._insert_param("--video-fps", self.params_first("fps", ""))
1.21 @@ -35,8 +37,8 @@
1.22 self._insert_param("--video-height", self.params_first("height", ""))
1.23 self._insert_param("--audio-encode", self.params_first("ae", ""))
1.24 self._insert_param("--output-element", "fdsink")
1.25 - # _parse_params
1.26 -
1.27 + # _parse_params
1.28 +
1.29 def start(self, outfd):
1.30 self.opts.append (self.gmencoder_path)
1.31 self._parser_params ()
1.32 @@ -44,17 +46,16 @@
1.33 self.opts.append ("fd=%d" % outfd.fileno())
1.34
1.35 cmd = " ".join(self.opts)
1.36 - self.log.info ("Gmemconder: %s", cmd)
1.37 + self.log.info ("GMencoder: %s", cmd)
1.38
1.39 try:
1.40 self.proc = subprocess.Popen(self.opts, stdin=subprocess.PIPE)
1.41 except Exception, e:
1.42 - self.log.error("Error executing gmencoder: %s" % e)
1.43 + self.log.error("Error executing GMencoder: %s" % e)
1.44 return False
1.45
1.46 try:
1.47 self.proc.wait()
1.48 -
1.49 except Exception, e:
1.50 self.log.error("Problems handling data: %s" % e)
1.51 return False
1.52 @@ -65,7 +66,7 @@
1.53
1.54 def stop(self):
1.55 if self.proc:
1.56 - self.log.info ("STOP")
1.57 + self.log.info ("STOPed GMencoder plugin")
1.58 try:
1.59 self.proc.stdin.write ("QUIT\n")
1.60 except Exception, e: