AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Rip w/ HandbrakeCLI (Up to 2 DVD's)

 
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
n00ge



Joined: 28 Sep 2007
Posts: 37

PostPosted: Mon Jan 19, 2009 7:01 pm    Post subject: Rip w/ HandbrakeCLI (Up to 2 DVD's) Reply with quote

I put together a quick gui script for ripping a couple dvd's with the HandbrakeCLI utility. Just change the settings at the top to match your setup. This converts the DVD's to m4v files.
Code:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; DVD Ripper
; Utilizes the HandbrakeCLI found @
; http://handbrake.fr/

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Customize this section for your setup
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Handbrake := "C:\Program Files (x86)\Handbrake\HandBrakeCLI.exe"
DVDDrive1 := "D:\"
DVDDrive2 := "E:\"
SaveTo := "F:\Movies\"


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Leave this section as-is
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
DVDDrive1Active = 0
DVDDrive2Active = 0

ifExist, % DVDDrive1 . "VIDEO_TS"
{
   DVDDrive1Active = 1
}
ifExist, % DVDDrive2 . "VIDEO_TS"
{
   DVDDrive2Active = 1
}

if(DVDDrive1Active = 1 && DVDDrive2Active = 1)
{
   Gui, Add, Text,, Movie Name [%DVDDrive1%]:
   Gui, Add, Text,, Movie Name [%DVDDrive2%]:
   Gui, Add, Edit, vMovieName1 ym  ; The ym option starts a new column of controls.
   Gui, Add, Edit, vMovieName2
   Gui, Add, Button, default, OK  ; The label ButtonOK (if it exists) will be run when the button is pressed.
   Gui, Show,, Handbrake DVD Queue
   return  ; End of auto-execute section. The script is idle until the user does something.
   
   ButtonOK:
   Gui, Submit  ; Save the input from the user to each control's associated variable.
   Run,%ComSpec% /c ""%Handbrake%" -i "%DVDDrive1%VIDEO_TS" -o "%SaveTo%%MovieName1%.m4v" -L -p -2 -T --preset="AppleTV" & "%Handbrake%" -i "%DVDDrive2%VIDEO_TS" -o "%SaveTo%%MovieName2%.m4v" -L -p -2 -T --preset="AppleTV""
   ExitApp
   
   GuiEscape:
   GuiClose:
   ExitApp
}
else if(DVDDrive1Active = 1)
{
   InputBox, MovieName, Movie Name, Please enter the movie name., , 300, 120
    if ErrorLevel
    {
       ExitApp
    } else
    {
       Run,%ComSpec% /c ""%Handbrake%" -i "D:\VIDEO_TS" -o "%SaveTo%%MovieName%.m4v" -L -p -2 -T --preset="AppleTV""
       ExitApp
    }
}
else if(DVDDrive2Active = 1)
{
   InputBox, MovieName, Movie Name, Please enter the movie name., , 300, 120
    if ErrorLevel
    {
       ExitApp
    } else
    {
       Run,%ComSpec% /c ""%Handbrake%" -i "%DVDDrive2%VIDEO_TS" -o "%SaveTo%%MovieName%.m4v" -L -p -2 -T --preset="AppleTV""
       ExitApp
    }
} else {
   MsgBox, No DVDs are found.
   ExitApp
}
Back to top
View user's profile Send private message
SoggyDog



Joined: 02 May 2006
Posts: 783
Location: Greeley, CO

PostPosted: Tue Jan 20, 2009 4:11 am    Post subject: Reply with quote

Is HandBrake intended to defeat copy protection?
Is there anything else required other than the CLI (and DLL) and the script?
Does Region matter?

Mind you, I didn't do much more than download the CLI and run the script,
but I got nothing but errors on both store-bought and home-brew DVDs.
_________________

SoggyDog
Dwarf Fortress:
"The most intriguing game I've ever played."
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
n00ge



Joined: 28 Sep 2007
Posts: 37

PostPosted: Tue Jan 20, 2009 3:02 pm    Post subject: Reply with quote

The latest version of Handbrake isn't able to defeat copy protection. They took that out in the last release. You can use Slysoft's AnyDVD in addition if you want to do that.

Were the errors you were getting from Handbrake or AutoHotKey? If they were AutoHotKey, make sure that you changed the config options at the top to match your settings.
Back to top
View user's profile Send private message
*cough*
Guest





PostPosted: Tue Jan 20, 2009 3:51 pm    Post subject: Reply with quote

*cough* Y.A.S.U./Daemon *cough*
Back to top
garry



Joined: 19 Apr 2005
Posts: 2214
Location: switzerland

PostPosted: Tue Jan 20, 2009 5:58 pm    Post subject: Reply with quote

thank you n00ge,
I used as DVD2MP4
easy example convert title 2 from DVD to MP4
(saveto=G:\movies\ ; Moviename1=xy.mp4 ; track=2)
Code:
      Runwait,%ComSpec% /k ""%Handbrake%" -i "%DVDDrive1%VIDEO_TS" -o "%SaveTo%%MovieName1%" -t %track%"
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group