Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Echo offSetlocal enableextensions
- ::*********************************************************************************************
- ::*** AutoRipDVD is brought to you by Spinalcracker
- ::*********************************************************************************************
- ::
- ::*********************************************************************************************
- ::*** Change the following variables to match your setup
- ::*********************************************************************************************
- ::
- ::*** DriveLetter=The drive letter of your DVD or Blu-Ray drive ie. D: or G: etc
- ::
- ::------------------------------
- Set DriveLetter=D:
- ::------------------------------
- ::
- ::*** RipDir=Where you want your DVD ripped to ie. your xbmc movie folder *BE SURE TO INCLUDE TRAILING \
- ::
- ::------------------------------
- Set RipDir=C:\Documents and Settings\user1\My Documents\My Videos\
- ::------------------------------
- ::
- ::*** IntDir=Where you installed MakeMKV to
- ::
- ::----------------------------------------
- Set IntDir=C:\Program Files\MakeMKV\
- ::----------------------------------------
- ::
- ::*** ScriptPath=Where the files for this script are located with trailing "\" ie. Where AutoRipComplete.vbs & Beep.vbs are located *BE SURE TO INCLUDE TRAILING \
- ::
- ::------------------------------------
- Set ScriptPath=C:\Program Files (x86)\AutoRipDVD\
- ::------------------------------------
- ::
- ::*** RipMinSeconds=Minimum time in seconds that should be ripped off disk to avoid getting previews etc. Default is 3600 seconds or 1 hour
- ::
- ::---------------------
- Set RipMinSeconds=3600
- ::---------------------
- ::
- ::*** Using Handbrake to compress - Yes or No?
- ::
- ::------------------------------------
- Set Handbrake=yes
- ::------------------------------------
- ::
- ::*** Sets the install path to handbrake
- ::
- ::------------------------------------
- Set Handbrakepath=C:\Program Files\Handbrake
- ::------------------------------------
- ::
- ::*** Sets the level of compression in Handbrake so unless you really know what you are doing, do NOT adjust this next setting!
- ::
- ::------------------------------------
- Set X264=b-adapt=2:rc-lookahead=50:me=umh:bframes=5:ref=6:direct=auto:trellis=2:subq=10:psy-rd=1.0,0.10:analyse=all
- ::------------------------------------
- ::
- ::*** Sets the format of the new compressed file, so again, unless you know what you are doing, please leave it as mkv!
- ::
- ::------------------------------------
- Set FORMAT=--optimize --format mkv
- ::------------------------------------
- ::
- ::*** Sets the quality to something visually appealing but in a small files size - play with this if your outcome isn't to your liking
- ::
- ::------------------------------------
- Set QUALITY=--ab 160 --mixdown stereo --quality 23 -e x264 -x %X264%
- ::------------------------------------
- ::
- ::*** Sets the output to 720p resolution - change if you prefer something else
- ::
- ::------------------------------------
- Set SIZE=--width 1280 --height 720
- ::------------------------------------
- ::
- ::*********************************************************************************************
- ::*********************************************************************************************
- ::******* DO NOT EDIT ANYTHING BELOW THIS!!!!!!************************************************
- ::*********************************************************************************************
- ::*********************************************************************************************
- ::For /f %%# In ('Mountvol^|Findstr [d-z]:\\') Do (
- :: Fsutil fsinfo drivetype %%#|Find "CD-ROM">Nul&&(Set "CDROM=%%~d#"))
- ::If Not Defined CDROM call :NoDrive
- for /f "tokens=1-5*" %%1 in ('vol %DriveLetter%') do (
- set volid=%%6 & goto processcontd
- )
- :processcontd
- set nospace=%volid%
- echo [%nospace%]
- echo.
- for /f "tokens=* delims= " %%A in ('echo %nospace% ') do set nospace=%%A
- set nospace=%nospace:~0,-1%
- echo [%nospace%]
- set volid=%nospace%
- echo: %volid%
- set str=%volid%
- echo.%str%
- set str=%str:_= %
- echo.%str%
- set volid=%str%
- If "%volid%"=="_= " call :NoDrive
- Echo:Ripping %volid% now...
- mkdir "%RipDir%%volid%"
- cd /d "%ScriptPath%"
- OSDAutoRip.hta
- cd /d "%IntDir%"
- makemkvcon.exe --minlength=%RipMinSeconds% mkv disc:0 all "%RipDir%%volid%"
- SET _tmpPath="%RipDir%%volid%"
- cd /d %_tmpPath%
- for %%i in ("title*.mkv") do (set fname=%%i) & call :rename
- If %Handbrake%==Yes call :HBEncode
- cd /d "%ScriptPath%"
- AutoRipComplete.vbs
- cscript Beep.vbs
- exit
- :NoDrive
- cd /d "%ScriptPath%"
- cscript Beep.vbs
- NoDiskDrive.hta
- AutoRipComplete.vbs
- exit
- :HBEncode
- cd /d "%Handbrakepath%"
- HandBrakeCLI -v0 -i "%RipDir%%volid%" -o "%RipDir%%volid%\%volid% 720p.mkv" %FORMAT% %QUALITY% %SIZE%
- cd /d %_tmpPath%
- del "%volid%_*.mkv"
- :rename
- ::Cuts off 1st 5 characters of fname, then appends prefix
- ren %fname% "%volid%"_%fname:~5%
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement