case hash["FileFormat"]
when /MP4/
commandString << "mp4 "
- when /AVI/
- commandString << "avi "
- when /OGM/
- commandString << "ogm "
when /MKV/
commandString << "mkv "
end
case hash["VideoEncoder"]
when /x264/
commandString << "x264"
- when /XviD/
- commandString << "xvid"
+ when /Theora/
+ commandString << "theora"
end
end
case hash["FileFormat"]
when /MP4/
commandString << "mp4"
- when /AVI/
- commandString << "avi"
- when /OGM/
- commandString << "ogm"
when /MKV/
commandString << "mkv"
end
end
#Subtitles
- if hash["Subtitles"] != "None"
+ if hash["Subtitles"] && hash["Subtitles"] != "None"
if hash["Subtitles"] == "Autoselect"
commandString << " --subtitle-scan"
else
if hash["UsesPictureFilters"] == 1
case hash["PictureDeinterlace"]
- when 1
- commandString << " --deinterlace=\"fast\""
when 2
- commandString << " --deinterlace=\slow\""
+ commandString << " --deinterlace=\"fast\""
when 3
- commandString << " --deinterlace=\"slower\""
+ commandString << " --deinterlace=\slow\""
when 4
+ commandString << " --deinterlace=\"slower\""
+ when 5
commandString << " --deinterlace=\"slowest\""
end
case hash["PictureDenoise"]
- when 1
- commandString << " --denoise=\"weak\""
when 2
- commandString << " --denoise=\"medium\""
+ commandString << " --denoise=\"weak\""
when 3
+ commandString << " --denoise=\"medium\""
+ when 4
commandString << " --denoise=\"strong\""
end
- if hash["PictureDetelecine"] == 1 then commandString << " --detelecine" end
- if hash["PictureDeblock"] == 1 then commandString << " --deblock" end
- if hash["VFR"].to_i == 1 then commandString << " --vfr" end
- if hash["PictureDecomb"] == 1 then commandString << " --decomb" end
+ if hash["PictureDetelecine"] == 2 then commandString << " --detelecine" end
+ if hash["PictureDeblock"] != 0 then commandString << " --deblock=" << hash["PictureDeblock"].to_s end
+ if hash["PictureDecomb"] == 2 then commandString << " --decomb" end
end
commandString << " --strict-anamorphic"
elsif hash["PicturePAR"] == 2
commandString << " --loose-anamorphic"
+ elsif hash["PicturePAR"] == 3
+ commandString << " --custom-anamorphic"
end
#Booleans
case hash["VideoEncoder"]
when /x264/
commandString << "x264"
- when /XviD/
- commandString << "xvid"
+ when /Theora/
+ commandString << "theora"
end
end
case hash["FileFormat"]
when /MP4/
commandString << "mp4"
- when /AVI/
- commandString << "avi"
- when /OGM/
- commandString << "ogm"
when /MKV/
commandString << "mkv"
end
end
#Subtitles
- if hash["Subtitles"] != "None"
+ if hash["Subtitles"] && hash["Subtitles"] != "None"
if hash["Subtitles"] == "Autoselect"
commandString << " --subtitle-scan"
else
if hash["UsesPictureFilters"] == 1
case hash["PictureDeinterlace"]
- when 1
- commandString << " --deinterlace=\"fast\""
when 2
- commandString << " --deinterlace=\slow\""
+ commandString << " --deinterlace=\"fast\""
when 3
- commandString << " --deinterlace=\"slower\""
+ commandString << " --deinterlace=\slow\""
when 4
+ commandString << " --deinterlace=\"slower\""
+ when 5
commandString << " --deinterlace=\"slowest\""
end
case hash["PictureDenoise"]
- when 1
- commandString << " --denoise=\"weak\""
when 2
- commandString << " --denoise=\"medium\""
+ commandString << " --denoise=\"weak\""
when 3
+ commandString << " --denoise=\"medium\""
+ when 4
commandString << " --denoise=\"strong\""
end
- if hash["PictureDetelecine"] == 1 then commandString << " --detelecine" end
- if hash["PictureDeblock"] == 1 then commandString << " --deblock" end
- if hash["VFR"].to_i == 1 then commandString << " --vfr" end
- if hash["PictureDecomb"] == 1 then commandString << " --decomb" end
+ if hash["PictureDetelecine"] == 2 then commandString << " --detelecine" end
+ if hash["PictureDeblock"] != 0 then commandString << " --deblock=" << hash["PictureDeblock"].to_s end
+ if hash["PictureDecomb"] == 2 then commandString << " --decomb" end
end
#Anamorphic
commandString << " --strict-anamorphic"
elsif hash["PicturePAR"] == 2
commandString << " --loose-anamorphic"
+ elsif hash["PicturePAR"] == 3
+ commandString << " --custom-anamorphic"
end
#Booleans
case hash["FileFormat"]
when /MP4/
commandString << " mux = " << "HB_MUX_MP4;\n "
- when /AVI/
- commandString << " mux = " << "HB_MUX_AVI;\n "
- when /OGM/
- commandString << " mux = " << "HB_MUX_OGM;\n "
when /MKV/
commandString << " mux = " << "HB_MUX_MKV;\n "
end
case hash["VideoEncoder"]
when /x264/
commandString << "HB_VCODEC_X264;\n "
- when /XviD/
- commandString << "HB_VCODEC_XVID;\n "
+ when /Theora/
+ commandString << "HB_VCODEC_THEORA;\n "
end
end
commandString << "job->vbitrate = " << hash["VideoAvgBitrate"] << ";\n "
when 2
commandString << "job->vquality = " << hash["VideoQualitySlider"].to_s << ";\n "
- commandString << "job->crf = 1;\n "
end
#FPS
if hash["UsesPictureFilters"] == 1
case hash["PictureDeinterlace"]
- when 1
+ when 2
commandString << "deinterlace = 1;\n "
commandString << "deinterlace_opt = \"-1\";\n "
- when 2
+ when 3
commandString << "deinterlace = 1;\n "
commandString << "deinterlace_opt = \"2\";\n "
- when 3
+ when 4
commandString << "deinterlace = 1;\n "
commandString << "deinterlace_opt = \"0\";\n "
- when 4
+ when 5
commandString << "deinterlace = 1;\n "
commandString << "deinterlace_opt = \"1:-1:1\";\n "
end
case hash["PictureDenoise"]
- when 1
+ when 2
commandString << "denoise = 1;\n "
commandString << "denoise_opt = \"2:1:2:3\";\n "
- when 2
+ when 3
commandString << "denoise = 1;\n "
commandString << "denoise_opt = \"3:2:2:3\";\n "
- when 3
+ when 4
commandString << "denoise = 1;\n "
commandString << "denoise_opt = \"7:7:5:5\";\n "
end
- if hash["PictureDetelecine"] == 1 then commandString << "detelecine = 1;\n " end
- if hash["PictureDeblock"] == 1 then commandString << "deblock = 1;\n " end
- if hash["VFR"].to_i == 1 then commandString << "vfr = 1;\n " end
- if hash["PictureDecomb"] == 1 then commandString << "decomb = 1;\n " end
+ if hash["PictureDetelecine"] == 2 then commandString << "detelecine = 1;\n " end
+ if hash["PictureDeblock"] != 0
+ then
+ commandString << "deblock = 1;\n "
+ commandString << "deblock_opt = \"" << hash["PictureDeblock"].to_s << "\";\n "
+ end
+ if hash["PictureDecomb"] == 2 then commandString << "decomb = 1;\n " end
end
commandString << "anamorphic_mode = 1;\n "
elsif hash["PicturePAR"] == 2
commandString << "anamorphic_mode = 2;\n "
+ elsif hash["PicturePAR"] == 3
+ commandString << "anamorphic_mode = 3;\n "
end
#Booleans
case hash["VideoEncoder"]
when /x264/
commandString << "x264 "
- when /XviD/
- commandString << "xvid "
+ when /Theora/
+ commandString << "theora "
end
end
case hash["FileFormat"]
when /MP4/
commandString << "mp4"
- when /AVI/
- commandString << "avi"
- when /OGM/
- commandString << "ogm"
when /MKV/
commandString << "mkv"
end
end
#Subtitles
- if hash["Subtitles"] != "None"
+ if hash["Subtitles"] && hash["Subtitles"] != "None"
if hash["Subtitles"] == "Autoselect"
commandString << " --subtitle-scan"
else
if hash["UsesPictureFilters"] == 1
case hash["PictureDeinterlace"]
- when 1
- commandString << " --deinterlace=\\\"fast\\\""
when 2
- commandString << " --deinterlace=\\\slow\\\""
+ commandString << " --deinterlace=\\\"fast\\\""
when 3
- commandString << " --deinterlace=\\\"slower\\\""
+ commandString << " --deinterlace=\\\slow\\\""
when 4
+ commandString << " --deinterlace=\\\"slower\\\""
+ when 5
commandString << " --deinterlace=\\\"slowest\\\""
end
case hash["PictureDenoise"]
- when 1
- commandString << " --denoise=\\\"weak\\\""
when 2
- commandString << " --denoise=\\\"medium\\\""
+ commandString << " --denoise=\\\"weak\\\""
when 3
+ commandString << " --denoise=\\\"medium\\\""
+ when 4
commandString << " --denoise=\\\"strong\\\""
end
- if hash["PictureDetelecine"] == 1 then commandString << " --detelecine" end
- if hash["PictureDeblock"] == 1 then commandString << " --deblock" end
- if hash["VFR"].to_i == 1 then commandString << " --vfr" end
- if hash["PictureDecomb"] == 1 then commandString << " --decomb" end
+ if hash["PictureDetelecine"] == 2 then commandString << " --detelecine" end
+ if hash["PictureDeblock"] != 0 then commandString << " --deblock=" << hash["PictureDeblock"].to_s end
+ if hash["PictureDecomb"] == 2 then commandString << " --decomb" end
end
#Anamorphic
commandString << " --strict-anamorphic"
elsif hash["PicturePAR"] == 2
commandString << " --loose-anamorphic"
+ elsif hash["PicturePAR"] == 3
+ commandString << " --custom-anamorphic"
end
#Booleans