AutoHotkey Community

It is currently May 26th, 2012, 2:24 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: January 19th, 2009, 8:01 pm 
Offline

Joined: September 28th, 2007, 7:23 pm
Posts: 37
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
}


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 20th, 2009, 5:11 am 
Offline

Joined: May 2nd, 2006, 11:16 pm
Posts: 800
Location: Greeley, CO
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.

_________________
Image
SoggyDog
Dwarf Fortress:
"The most intriguing game I've ever played."


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 20th, 2009, 4:02 pm 
Offline

Joined: September 28th, 2007, 7:23 pm
Posts: 37
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 20th, 2009, 4:51 pm 
*cough* Y.A.S.U./Daemon *cough*


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 20th, 2009, 6:58 pm 
Offline

Joined: April 19th, 2005, 10:26 am
Posts: 2249
Location: switzerland
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%"


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google Feedfetcher, SKAN and 12 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group