Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

An AppleScript to play DVDs from the hard drive Apps
I've ripped the DVDs I play often (mostly yoga DVDs) to my hard drive (using MacTheRipper) so I don't have to dig around for the actual DVDs every day. I wanted a quick way to open these ripped discs with DVD Player, so I hacked together a simple AppleScript to do the job. This was adopted from a script found in the comments to this hint.

Instructions for using the script are included with the source code.

[robg adds: I haven't tested this one...]
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[14,792 views]  

An AppleScript to play DVDs from the hard drive | 11 comments | Create New Account
Click here to return to the 'An AppleScript to play DVDs from the hard drive' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Folder Action
Authored by: guardian34 on Jan 06, '06 07:31:41AM

There's a folder action for this over at MacScripter: How do I launch DVD Player by clicking on a folder?



[ Reply to This | # ]
Folder Action
Authored by: jbirk on Jan 06, '06 09:45:04AM

Sure, but the nice thing about this is that it is an app that you can drop a ripped movie folder onto and it will play from the enclosed TS_VIDEO volder.

While the other script is nice, it is then a folder action that you must attach to each ripped movie folder.



[ Reply to This | # ]
An AppleScript to play DVDs from the hard drive
Authored by: demmons65 on Jan 06, '06 09:58:43AM

Matinee will look at a folder ful of VIDEO_TS and parse out the name and lt you pick the title and play it for you.
http://matinee.dizandat.com/

Your script looks to have similar ability.

--
da v e

---
d a v e

http://www.hostwerks.com/~dave/



[ Reply to This | # ]
An AppleScript to play DVDs from the hard drive
Authored by: l.balint on Jan 06, '06 10:01:20AM

Or you can actually use this app instead: PlayVideoTS
http://www.macupdate.com/info.php/id/20141

---
I am hungarian. Visit Budapest! It 's nice city! :-)



[ Reply to This | # ]
An AppleScript to play DVDs from the hard drive
Authored by: mark hunte on Jan 06, '06 10:28:38AM
I save each of my Video_TS folders inside a named folders of each film
'~/Documents/mydvdrips'
a Slight edit lets you choose from a list of films in this folder when you run the script

on run
	tell application "Finder"
		try
			set biglist to {}
			set the_doc_folder to path to documents folder --(folder of the front window as string)
			set currFolder to folder "mydvdrips" of the_doc_folder as string
			say 1
			copy displayed name of (every item of folder currFolder whose (class is folder)) to end of biglist
			say 2
			set currFolder2 to choose from list biglist with prompt "Choose the Calendar to use" OK button name "Choose" without multiple selections allowed and empty selection allowed
			set currFolder to currFolder & currFolder2 & ":" as string
		on error
			display dialog "Error: " & the error_number & ". " & the error_message buttons {"OK"} default button 1
		end try
	end tell
	say 3
	get currFolder
	CD_to(currFolder, false)
end run

-- script run by draging file/folder to icon
on open (theList)
	set newWindow to false
	repeat with thePath in theList
		set thePath to thePath as string
		if not (thePath ends with ":") then
			set x to the offset of ":" in (the reverse of every character of thePath) as string
			set thePath to (characters 1 thru -(x) of thePath) as string
		end if
		CD_to(thePath, newWindow)
		set newWindow to true -- create window for any other files/folders
	end repeat
	return
end open

-- open and play the movie
on CD_to(theDir, newWindow)
	try
		tell application "DVD Player"
			activate
			if theDir ends with "VIDEO_TS:" then
				set videoTS to theDir as alias
			else
				set videoTS to theDir & "VIDEO_TS:" as alias
			end if
			open VIDEO_TS videoTS
			set viewer full screen to true
			play dvd
		end tell
	on error the error_message number the error_number
		display dialog "Error: " & the error_number & ". " & the error_message buttons {"OK"} default button 1
	end try
end CD_to 

---
mh

[ Reply to This | # ]

An AppleScript to play DVDs from the hard drive
Authored by: mark hunte on Jan 07, '06 08:51:01AM
Sorry Forgot to take out the
Say 1 
,
,Say 2
,
Say 3
.. bits in the script.
Just comment them out or remove them. I use them for debugging

---
mh

[ Reply to This | # ]

An AppleScript to play DVDs from the hard drive
Authored by: mark hunte on Jan 07, '06 11:18:03AM
Ok Dumb arse (me) ALSO did not test on more than one folder. just tried to use it and got an error. Thats fixed. in this
 on run
	tell application "Finder"
		try
			set biglist to {}
			set the_doc_folder to path to documents folder --(folder of the front window as string)
			set currFolder to folder "mydvdrips" of the_doc_folder as string
			set thecounter to 0
			repeat count of (every item of folder currFolder whose (class is folder)) times
				
				set thecounter to thecounter + 1
				copy displayed name of (item thecounter of folder currFolder whose (class is folder)) to end of biglist
			end repeat
			set currFolder2 to choose from list biglist with prompt "Choose the Calendar to use" OK button name "Choose" without multiple selections allowed and empty selection allowed
			set currFolder to currFolder & currFolder2 & ":" as string
			
			
		on error
			display dialog "Error: " & the error_number & ". " & the error_message buttons {"OK"} default button 1
		end try
	end tell
	
	get currFolder
	CD_to(currFolder, false)
end run

-- script run by draging file/folder to icon
on open (theList)
	set newWindow to false
	repeat with thePath in theList
		set thePath to thePath as string
		if not (thePath ends with ":") then
			set x to the offset of ":" in (the reverse of every character of thePath) as string
			set thePath to (characters 1 thru -(x) of thePath) as string
		end if
		CD_to(thePath, newWindow)
		set newWindow to true -- create window for any other files/folders
	end repeat
	return
end open

-- open and play the movie
on CD_to(theDir, newWindow)
	try
		tell application "DVD Player"
			activate
			if theDir ends with "VIDEO_TS:" then
				set videoTS to theDir as alias
			else
				set videoTS to theDir & "VIDEO_TS:" as alias
			end if
			open VIDEO_TS videoTS
			set viewer full screen to true
			play dvd
		end tell
	on error the error_message number the error_number
		display dialog "Error: " & the error_number & ". " & the error_message buttons {"OK"} default button 1
	end try
end CD_to

---
mh

[ Reply to This | # ]

Convet to DivX?
Authored by: allanmarcus on Jan 06, '06 01:23:46PM

I do the same thing, but I'm running out of space quick. Most movies are in the 3-6GB range. I can use Toast 7 to convert them to DivX at a size of about 1GB each, but I seem to lose 5.1 sound.

Anyone know how to convert a video_ts folder (main title only) to DivX and maintain the 5.1 digital sound? I'm not married to DivX either; any really good compression would be great.

Thanks,

Allan



[ Reply to This | # ]
Convet to DivX?
Authored by: gxw on Jan 06, '06 05:30:08PM

XviD will let you keep the 5.1 soundtrack.
search for Handbrake for the mac and Autogk for the pc.
both of these apps seem to work okay.



[ Reply to This | # ]
An AppleScript to play DVDs from the hard drive
Authored by: koffaoe on Jan 09, '06 09:00:29AM

I just press "apple-O" or "File, Open DVD Media" in DVD Player and open the videoTS-folder. I don't see the point of this hint.



[ Reply to This | # ]
An AppleScript to play DVDs from the hard drive
Authored by: mark hunte on Jan 09, '06 01:03:45PM

You can also Drag and drop.

But one point is This saves time, Navigating around

---
mh



[ Reply to This | # ]