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

Play DVDs automatically on insertion in VLC media player Apps
Here's how to get VLC media player to play a DVD automatically on insertion in Mac OS X. First, create and save this AppleScript:
tell application "VLC"
  OpenURL "dvdnav:///dev/rdisk1"
  play
end tell
Next, open System Preferences, and go to the CDs & DVDs tab. For the When you insert a video DVD option, in the drop down menu select Run Script, and then select the AppleScript you just saved. That's it!
    •    
  • Currently 2.80 / 5
  You rated: 2 / 5 (5 votes cast)
 
[18,595 views]  

Play DVDs automatically on insertion in VLC media player | 11 comments | Create New Account
Click here to return to the 'Play DVDs automatically on insertion in VLC media player' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Play DVDs automatically on insertion in VLC media player
Authored by: sys0p on Sep 18, '07 09:19:45AM

why would you want to use VLC and not the DVD player ?



[ Reply to This | # ]
Play DVDs automatically on insertion in VLC media player
Authored by: michalc on Sep 18, '07 09:32:10AM
Several reasons for using VLC to play DVDs for me:
  • So I only one program for all my video playing.
  • I can skip those pesky copyright/anti-piracy messages and go straight to the menu
  • I like using the slider to move backward/forward through a chapter
  • Occasionally I would like to grab a frame from a DVD as an image. Using the DVD player that comes with OS X, the screen-grab utility is disabled. VLC doesn't disable it, and I've just noticed it even has a handy "Screen Grap" tool in one of the menus
Michal.

[ Reply to This | # ]
You wouldn't unless you wanted to do more than watch...
Authored by: sr105 on Sep 18, '07 09:45:24AM

other than that, VLC uses 2x or more cpu than DVD Player to play a dvd (on my machine, ymmv).



[ Reply to This | # ]
You wouldn't unless you wanted to do more than watch...
Authored by: michalc on Sep 18, '07 09:52:19AM

I've just very briefly tested my machine, and VLC used between 25% to 30% of my CPU when playing a DVD (Mary Poppins in my case!), while DVD Player uses 35% to 40%. I don't know if it makes a difference, but I'm on a PPC, and I'm using the PPC build of VLC, not the Universal Binary.

Michal.



[ Reply to This | # ]
Play DVDs automatically on insertion in VLC media player
Authored by: spoonerist on Sep 18, '07 04:47:25PM

VLC can be used to play foreign DVDs, while the DVD player is region locked.



[ Reply to This | # ]
Play DVDs automatically on insertion in VLC media player: Updated Script
Authored by: michalc on Sep 18, '07 09:46:37AM
I've just realised that the AppleScript I gave does not work if VLC was open and was used to play another video before the DVD was inserted. In such a case the original video played gets played again. The solution is to add a "next" command to the AppleScript":
tell application "VLC"
	OpenURL "dvdnav:///dev/rdisk1"
	play
	next
end tell
This should hopefully now work in all cases.

[ Reply to This | # ]
Play DVDs automatically on insertion in VLC media player
Authored by: tonyo on Sep 19, '07 04:28:31PM
For the When you insert a video DVD option, in the drop down menu select Run Script, and then select the AppleScript you just saved. That's it!

Why don't you just choose VLC in that menu, instead of the applescript? That's what I do to launch HandBrake on insert instead of DVD player. Just seems like an unneeded step. Am I missing somethin'?

[ Reply to This | # ]

Play DVDs automatically on insertion in VLC media player
Authored by: michalc on Sep 20, '07 01:47:48AM

If you select VLC in the drop down box, then it does run when a DVD is inserted, but it doesn't play the DVD. (On my system at least) The script is needed to tell VLC to actually start playing the DVD. Sorry - perhaps I should have explained that in the hint.

Michal.



[ Reply to This | # ]
Play DVDs automatically on insertion in VLC media player
Authored by: makip on Sep 21, '07 09:06:59PM

I find its nice to have VLC fire up when you insert the disc, then hit play on the apple remote from the couch when ready to start watching.
If you dont have a remote, then space or enter should kick the disc off.



[ Reply to This | # ]
Play DVDs automatically on insertion in VLC media player
Authored by: petertheartist on Dec 28, '10 07:09:07PM

I know this is an old thread, but, I could never get this script to work. The rdisk number for my optical drive was always changing, depending on what external hard drives, or flash drives were connected, or if my external burner had a disk in it at the time, etc.
So I worked out this script which will work regardless. (I think you need UI scripting turned on, mine was already on):

tell application "VLC"
activate
end tell
tell application "System Events"
key down command
keystroke "d"
key up command
delay 3
keystroke return
tell application "VLC"
play
fullscreen
end tell
end tell



[ Reply to This | # ]
Play DVDs automatically on insertion in VLC media player
Authored by: iMacThere4iAm on Jan 04, '12 04:21:12AM
Here is an alternative that doesn't require UI scripting. It should be faster and more reliable.
set devicename to do shell script "drutil status | grep -o /dev/disk.*"
set MRL to "dvdnav://" & devicename
tell application "VLC"
	OpenURL MRL
	play
	next
end tell


[ Reply to This | # ]