diff options
author | jbrjake <[email protected]> | 2007-12-07 18:42:14 +0000 |
---|---|---|
committer | jbrjake <[email protected]> | 2007-12-07 18:42:14 +0000 |
commit | 00e6db9ff1c1d2b2ec0999f71e9795da18c24155 (patch) | |
tree | 5feb686c7e24c7fd43d3ba42f3f97911b89bb80b | |
parent | d9d88b0d8dd28b9fac27ece0461a3a09e86e0b9a (diff) |
Adds parsing of picture filter settings.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1106 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rwxr-xr-x | scripts/manicure.rb | 125 |
1 files changed, 120 insertions, 5 deletions
diff --git a/scripts/manicure.rb b/scripts/manicure.rb index d806f84b7..9e6eb55e1 100755 --- a/scripts/manicure.rb +++ b/scripts/manicure.rb @@ -301,10 +301,37 @@ class PresetClass commandString << " -s " commandString << hash["Subtitles"] end + + #Video Filters + if hash["UsesPictureFilters"].to_i == 1 + + case hash["PictureDeinterlace"].to_i + when 1 + commandString << " --deinterlace=\"fast\"" + when 2 + commandString << " --deinterlace=\slow\"" + when 3 + commandString << " --deinterlace=\"slower\"" + when 4 + commandString << " --deinterlace=\"slowest\"" + end + + case hash["PictureDenoise"].to_i + when 1 + commandString << " --denoise=\"weak\"" + when 2 + commandString << " --denoise=\"medium\"" + when 3 + commandString << " --denoise=\"strong\"" + end + if hash["PictureDetelecine"].to_i == 1 then commandString << " --detelecine" end + if hash["PictureDeblock"].to_i == 1 then commandString << " --deblock" end + if hash["VFR"].to_i == 1 then commandString << " --vfr" end + end + #Booleans if hash["ChapterMarkers"].to_i == 1 then commandString << " -m" end - if hash["PictureDeinterlace"].to_i == 1 then commandString << " -d" end if hash["PicturePAR"].to_i == 1 then commandString << " -p" end if hash["VideoGrayScale"].to_i == 1 then commandString << " -g" end if hash["VideoTwoPass"].to_i == 1 then commandString << " -2" end @@ -414,10 +441,37 @@ class PresetClass commandString << " -s " commandString << hash["Subtitles"] end + + #Video Filters + if hash["UsesPictureFilters"].to_i == 1 + case hash["PictureDeinterlace"].to_i + when 1 + commandString << " --deinterlace=\"fast\"" + when 2 + commandString << " --deinterlace=\slow\"" + when 3 + commandString << " --deinterlace=\"slower\"" + when 4 + commandString << " --deinterlace=\"slowest\"" + end + + case hash["PictureDenoise"].to_i + when 1 + commandString << " --denoise=\"weak\"" + when 2 + commandString << " --denoise=\"medium\"" + when 3 + commandString << " --denoise=\"strong\"" + end + + if hash["PictureDetelecine"].to_i == 1 then commandString << " --detelecine" end + if hash["PictureDeblock"].to_i == 1 then commandString << " --deblock" end + if hash["VFR"].to_i == 1 then commandString << " --vfr" end + end + #Booleans if hash["ChapterMarkers"].to_i == 1 then commandString << " -m" end - if hash["PictureDeinterlace"].to_i == 1 then commandString << " -d" end if hash["PicturePAR"].to_i == 1 then commandString << " -p" end if hash["VideoGrayScale"].to_i == 1 then commandString << " -g" end if hash["VideoTwoPass"].to_i == 1 then commandString << " -2" end @@ -551,9 +605,43 @@ class PresetClass commandString << hash["x264Option"] << "\");\n\t" end + #Video Filters + if hash["UsesPictureFilters"].to_i == 1 + + case hash["PictureDeinterlace"].to_i + when 1 + commandString << "deinterlace = 1;\n\t" + commandString << "deinterlace_opt = \"-1\";\n\t" + when 2 + commandString << "deinterlace = 1;\n\t" + commandString << "deinterlace_opt = \"0\";\n\t" + when 3 + commandString << "deinterlace = 1;\n\t" + commandString << "deinterlace_opt = \"2:-1:1\";\n\t" + when 4 + commandString << "deinterlace = 1;\n\t" + commandString << "deinterlace_opt = \"1:-1:1\";\n\t" + end + + case hash["PictureDenoise"].to_i + when 1 + commandString << "denoise = 1;\n\t" + commandString << "denoise_opt = \"2:1:2:3\";\n\t" + when 2 + commandString << "denoise = 1;\n\t" + commandString << "denoise_opt = \"3:2:2:3\";\n\t" + when 3 + commandString << "denoise = 1;\n\t" + commandString << "denoise_opt = \"7:7:5:5\";\n\t" + end + + if hash["PictureDetelecine"].to_i == 1 then commandString << "detelecine = 1;\n\t" end + if hash["PictureDeblock"].to_i == 1 then commandString << "deblock = 1;\n\t" end + if hash["VFR"].to_i == 1 then commandString << "vfr = 1;\n\t" end + end + #Booleans if hash["ChapterMarkers"].to_i == 1 then commandString << "job->chapter_markers = 1;\n\t" end - if hash["PictureDeinterlace"].to_i == 1 then commandString << "job->deinterlace = 1;\n\t" end if hash["PicturePAR"].to_i == 1 then commandString << "pixelratio = 1;\n\t" end if hash["VideoGrayScale"].to_i == 1 then commandString << "job->grayscale = 1;\n\t" end if hash["VideoTwoPass"].to_i == 1 then commandString << "twoPass = 1;\n\t" end @@ -665,10 +753,37 @@ class PresetClass commandString << " -s " commandString << hash["Subtitles"] end - + + #Video Filters + if hash["UsesPictureFilters"].to_i == 1 + + case hash["PictureDeinterlace"].to_i + when 1 + commandString << " --deinterlace=\"fast\"" + when 2 + commandString << " --deinterlace=\slow\"" + when 3 + commandString << " --deinterlace=\"slower\"" + when 4 + commandString << " --deinterlace=\"slowest\"" + end + + case hash["PictureDenoise"].to_i + when 1 + commandString << " --denoise=\"weak\"" + when 2 + commandString << " --denoise=\"medium\"" + when 3 + commandString << " --denoise=\"strong\"" + end + + if hash["PictureDetelecine"].to_i == 1 then commandString << " --detelecine" end + if hash["PictureDeblock"].to_i == 1 then commandString << " --deblock" end + if hash["VFR"].to_i == 1 then commandString << " --vfr" end + end + #Booleans if hash["ChapterMarkers"].to_i == 1 then commandString << " -m" end - if hash["PictureDeinterlace"].to_i == 1 then commandString << " -d" end if hash["PicturePAR"].to_i == 1 then commandString << " -p" end if hash["VideoGrayScale"].to_i == 1 then commandString << " -g" end if hash["VideoTwoPass"].to_i == 1 then commandString << " -2" end |