]> code.delx.au - transcoding/commitdiff
Added the ability to set the episode name into the container
authorGreg Darke <greg+laptop@tsukasa.net.au>
Sat, 11 Oct 2008 05:20:28 +0000 (16:20 +1100)
committerGreg Darke <greg+laptop@tsukasa.net.au>
Sat, 11 Oct 2008 05:20:28 +0000 (16:20 +1100)
encode.py

index a356fc7e1062da6e2a0808aef21644951f5a1f79..74b6f981d3a3c3a944f9aa05b3bf58d8e52395fb 100755 (executable)
--- a/encode.py
+++ b/encode.py
@@ -56,6 +56,8 @@ class MencoderCommand(object):
                self.insertOptions(cmd)
                cmd += ["-ovc", p.vcodec, self.codec2opts[p.vcodec], "pass=2:"+p.vopts]
                cmd += ["-oac", p.acodec, self.codec2opts[p.acodec], p.aopts]
+               if self.opts.episode_name:
+                       cmd += ["-info", "name='%s'" % self.opts.episode_name]
                cmd += self.profile.extra
                cmd = self.substValues(cmd)
                return cmd
@@ -116,6 +118,7 @@ def parse_args():
        parser.add_option("--audioid", action="store", dest="audioid")
        parser.add_option("--subtitleid", action="store", dest="subtitleid")
        parser.add_option("--profile", action="store", dest="profile_name", default=profile_name)
+       parser.add_option("--episode-name", action="store", dest="episode_name")
        parser.add_option("--dump", action="store_true", dest="dump")
        try:
                opts, (input, output) = parser.parse_args(sys.argv[1:])