gmyth-stream/server/0.3/plugins/transcoders/mencoder.py
branchtrunk
changeset 739 517706c7003e
parent 738 293e6c9546e5
child 740 c73e1eb09a6f
     1.1 --- a/gmyth-stream/server/0.3/plugins/transcoders/mencoder.py	Fri Jun 01 15:24:34 2007 +0100
     1.2 +++ b/gmyth-stream/server/0.3/plugins/transcoders/mencoder.py	Fri Jun 01 15:36:11 2007 +0100
     1.3 @@ -102,7 +102,9 @@
     1.4      def _setup_mencoder_opts(self, args):
     1.5          args.append(self.mencoder_path)
     1.6  
     1.7 -        if self.args["outfile"] == "-" and self.args["type"]:
     1.8 +        if self.args["type"] and self.args["type"] == "tv":
     1.9 +            self._arg_append(args, self.args["tv"])
    1.10 +        elif self.args["outfile"] == "-" and self.args["type"]:
    1.11              args.append(self.args["input"])
    1.12          else:
    1.13              args.append("-")
    1.14 @@ -162,14 +164,13 @@
    1.15              outfmt = self.params_first("outfmt", "yuy2")
    1.16              vdev = self.params_first("vdev", "/dev/video0")
    1.17              adev = self.params_first("adev", "/dev/dsp")
    1.18 -            tv = "tv:// -v -tv driver=%s:norm=%s:channel=%s:" \
    1.19 -                 "chanlist=%s:width=%s:height=%s:outfmt=%s:" \
    1.20 -                 "device=%s:adevice=%s" % (driver, norm,
    1.21 -                                           channel, chanlist,
    1.22 -                                           self.args["width"],
    1.23 -                                           self.args["height"],
    1.24 -                                           outfmt, vdev, adev)
    1.25 -            self.args["input"] = tv.split(" ")
    1.26 +            self.args["tv"] = "tv:// -v -tv driver=%s:norm=%s:channel=%s:" \
    1.27 +                              "chanlist=%s:width=%s:height=%s:outfmt=%s:" \
    1.28 +                              "device=%s:adevice=%s" % (driver, norm,
    1.29 +                                                        channel, chanlist,
    1.30 +                                                        self.args["width"],
    1.31 +                                                        self.args["height"],
    1.32 +                                                        outfmt, vdev, adev)
    1.33      # _setup_filename()
    1.34  
    1.35  
    1.36 @@ -278,6 +279,7 @@
    1.37      # _run_mencoder()
    1.38  
    1.39      def start(self, outfd):
    1.40 +        print "mencoder_opts: %s" % self.mencoder_opts
    1.41          cmd = " ".join(self.mencoder_opts)
    1.42          self.log.debug(self.tid, "Plugin's tid: %s" % self.tid)
    1.43          self.log.debug(self.tid, "Mencoder: %s" % cmd)