OSDN Git Service

WinGui:
[handbrake-jp/handbrake-jp-git.git] / scripts / manicure.rb
index 317ea05..f458aec 100755 (executable)
@@ -311,6 +311,10 @@ class Display
       else
         commandString << " -r " << hash["VideoFramerate"]
       end
+      
+      if hash["VideoFrameratePFR"] == 1
+        commandString << " --pfr "
+      end
     end
     
     #Audio tracks
@@ -330,7 +334,9 @@ class Display
       
       #Encoders
       case audioTrack["AudioEncoder"]
-        when /AC3 /
+        when /AC3 Pass/
+          audioEncoders << "copy:ac3"
+        when /AC3/
           audioEncoders << "ac3"
         when /AAC/
           audioEncoders << "faac"
@@ -554,6 +560,10 @@ class Display
       else
         commandString << " -r " << hash["VideoFramerate"]
       end
+      
+      if hash["VideoFrameratePFR"] == 1
+        commandString << " --pfr "
+      end
     end
     
     #Audio tracks
@@ -573,7 +583,9 @@ class Display
       
       #Encoders
       case audioTrack["AudioEncoder"]
-        when /AC3 /
+        when /AC3 Pass/
+          audioEncoders << "copy:ac3"
+        when /AC3/
           audioEncoders << "ac3"
         when /AAC/
           audioEncoders << "faac"
@@ -790,7 +802,12 @@ class Display
         commandString << "job->vrate_base = " << "1080000\n    "
       # Gotta add the rest of the framerates for completion's sake.
       end
-      commandString << "job->cfr = 1;\n    "
+      
+      if hash["VideoFrameratePFR"] == 1
+        commandString << "job->cfr = 2;\n    "
+      else
+        commandString << "job->cfr = 1;\n    "
+      end
     end
     
     #Audio tracks
@@ -810,7 +827,9 @@ class Display
 
       #Encoders
       case audioTrack["AudioEncoder"]
-        when /AC3 /
+        when /AC3 Pass/
+          audioEncoders << "copy:ac3"
+        when /AC3/
           audioEncoders << "ac3"
         when /AAC/
           audioEncoders << "faac"
@@ -969,12 +988,17 @@ class Display
     end
     
     #Anamorphic
-    if hash["PicturePAR"] == 1
-      commandString << "anamorphic_mode = 1;\n    "
-    elsif hash["PicturePAR"] == 2
-      commandString << "anamorphic_mode = 2;\n    "
-    elsif hash["PicturePAR"] == 3
-      commandString << "anamorphic_mode = 3;\n    "
+    if hash["PicturePAR"] != 0
+      commandString << "if( !anamorphic_mode )\n    "
+      commandString << "{\n    "
+      if hash["PicturePAR"] == 1
+        commandString << "    anamorphic_mode = 1;\n    "
+      elsif hash["PicturePAR"] == 2
+        commandString << "    anamorphic_mode = 2;\n    "
+      elsif hash["PicturePAR"] == 3
+        commandString << "    anamorphic_mode = 3;\n    "
+      end
+      commandString << "}\n    "
     end
     
     #Booleans
@@ -1061,6 +1085,10 @@ class Display
       else
         commandString << " -r " << hash["VideoFramerate"]
       end
+      
+      if hash["VideoFrameratePFR"] == 1
+        commandString << " --pfr "
+      end
     end
     
     #Audio tracks
@@ -1080,7 +1108,9 @@ class Display
       
       #Encoders
       case audioTrack["AudioEncoder"]
-        when /AC3 /
+        when /AC3 Pass/
+          audioEncoders << "copy:ac3"
+        when /AC3/
           audioEncoders << "ac3"
         when /AAC/
           audioEncoders << "faac"