--- mkdvd.pike-1.21	2003-11-01 08:38:18.000000000 -0800
+++ mkdvd.pike	2003-11-02 17:02:38.000000000 -0800
@@ -62,11 +62,13 @@
 array from_handler=({"\r\n","\n\r","\n"});
 array to_handler=({"\n\r","\n\r","\n\r"});
 
+int cpus=1;          // number of threads mpeg2enc should use
 int draft=0;         // draft mode
 int allow_480=0;     // nonstandard dvds
 string output="dvd"; // output directory
 float force_aspect=0.0;
 int force_video_bitrate=0; // video bitrate, in kbps
+int fontsize=40;     // font height
 int force_reencode=0;
 string tempdir;
 #define T(X) combine_path(tempdir, (X))
@@ -819,6 +821,7 @@
 	  "-f","8",
 	  "-B","260",
 	  "-V","230",
+	  "-M",(string)cpus,
 	  });
 
       if(draft)
@@ -1052,8 +1055,9 @@
   werror(" --blank       : Blank DVD-R before writing.\n");
   werror(" --iso         : Make an iso image.\n");
   werror(" -t/--title=t  : When burning / making iso, use this title.\n");
-  werror("                Defaults to the basename of the first file.\n");
-  werror("    --draft    : Minimum quality, maximum speed, for debugging/testing.\n");
+  werror("                 Defaults to the basename of the first file.\n");
+  werror(" --draft       : Minimum quality, maximum speed, for debugging/testing.\n");
+  werror(" --cpus=N      : Use N threads while encoding VOBs.\n");
   werror(" --original    : Include the original files on the DVD.\n");
   werror(" -o/--output=o : Output directory. (default: ./dvd)\n");
   werror(" --allow-480   : Currently for TiVo streams only, avoids resampling the\n");
@@ -1074,7 +1078,6 @@
   string fontname;
   string title_image;
   string title;
-  int fontsize=40;
   int xpos=-1;
   int ypos=-1;
   int burn=0;
@@ -1092,6 +1095,7 @@
       ({"burn",Getopt.NO_ARG,({"--burn","-b"})}),
       ({"blank",Getopt.NO_ARG,({"--blank"})}),
       ({"original",Getopt.NO_ARG,({"--original"})}),
+      ({"cpus",Getopt.HAS_ARG,({"--cpus"})}),
       ({"image",Getopt.HAS_ARG,({"--image","-i"})}),
       ({"title",Getopt.HAS_ARG,({"--title","-t"})}),
       ({"font",Getopt.HAS_ARG,({"--font","-f"})}),
@@ -1099,6 +1103,7 @@
       ({"aspect",Getopt.HAS_ARG,({"--aspect"})}),
       ({"darken",Getopt.HAS_ARG,({"--darken","-d"})}),
       ({"output",Getopt.HAS_ARG,({"--output","-o"})}),
+      ({"bitrate",Getopt.HAS_ARG,({"--bitrate"})}),
       ({"fontsize",Getopt.HAS_ARG,({"--fontsize",
 				    "--fontheight",
 				      "-h"})}),
@@ -1124,12 +1129,15 @@
 	case "blank": blank++; break;
 	case "iso": iso++; break;
 	case "original": original++; break;
+	case "cpus": cpus=opt[1]; break;
 	case "image": title_image=opt[1]; break;
 	case "title": title=opt[1]; break;
 	case "font":  fontname=opt[1]; break;
 	case "ypos":  ypos=(int)opt[1]; break;
 	case "darken":  darken=(float)opt[1]; break;
 	case "output": output=opt[1]; break;
+	case "fontsize": fontsize=(int)opt[1]; break;
+	case "bitrate": force_video_bitrate=(int)opt[1]; break;
       }
     }
 
