Saturday, June 6, 2009

How to run multiple instances of VLC

Have you ever wanted to run multiple instances of VLC at the same time? There are times where I like to keep an old football game going while watching a movie. But unfortunately, VLC has never provided this functionality although there are ways around.


First you could run the application from the command line to launch multiple instances. It is quite easy to do but if you watch videos often then it quickly becomes an inconvenience.

MacBook :~ mactimes$ /Applications/VLC.app/Contents/MacOS/VLC &

I've also heard of people making multiple copies of the application in order to run multiple instances of VLC.

There is an easier options. By following this guide, I will show you how to run multiple instances of the application. In addition, show you how to change a few settings so the changes are transparent.

This guide will be composed of 4 steps:
  1. Launcher creation
  2. Icon image update
  3. Copy launcher to dock
  4. File association???
note: It is assumed that VLC is installed. If not, please download and install it from the Mac VLC download page.

Launcher Creation:
  1. Start by opening Script Editor (Applications -> AppleScript -> Script Editor)

  2. In the upper window type the following command:



    do shell script "open -n /Applications/VLC.app"

    note: The "-n" refers to new so that you can open multiple applications

  3. Click "Compile" to analyze the script and check for errors

  4. Then save the script as "VLC" with the File Format changed to Application.



  5. You will end up with a launcher on your Desktop that looks like the following icon



  6. Launch the icon multiple times and you should get multiple instances of VLC
Icon Image Update: The default script icon is obviously not very attractive so lets change it to the VLC icon.
  1. Select the original VLC application in Finder.

  2. Right-Click on the VLC application icon and select Get Info.

  3. In the properties window, there is a small icon of the application in the upper left hand corner. Select this icon (you will see it highlighted).



  4. Copy the icon (Edit -> Copy or ⌘C) to your clipboard.

  5. Select the new VLC launcher on your desktop.

  6. Right-Click on the VLC launcher icon and select Get Info.

  7. In the properties window, go to the small icon in the upper left hand corner. Select this icon (you will see it highlighted).

  8. Paste the icon (Edit -> Paste or ⌘V) from your clipboard.

  9. The icon will change from the default script icon image to the VLC icon image.



  10. The icon on your desktop will also change from the default script icon image to the VLC icon image.


Copy launcher to dock:
  1. Open Finder and move the new VLC script to Macintosh/Users//Library/Scripts.

  2. Drag the new VLC script to your dock.

  3. Click on the dock icon to launch new instances of VLC.


File Association: To ensure your videos open with the new launcher you need to change the default application for all the movie types. I thought this would be easy to configure by just point the file extensions to the new VLC script but unfortunately it does not work. I will leave this a work in progress and post an update when I find a solution.


So there you go, a quick and easy solution to launching multiple instances of VLC. Its not perfect but it is much more convenient then launching the application from the command line. And when I find a solution for the file association I will keep you all updated. Just as a final note, this process should work for any application you would like to run multiple instances of.


10 comments:

Steven said...

Kinda long but it worked well.
It was well worth the time.
Thanks for the walkthrough.

Anonymous said...

You are the best. Is a follow up coming how
to link the script with a playlist?
VLC on Pc hast multi instances.
thanks ever so much.

Anonymous said...

Worked perfectly, thanks!

Newb @ MacTimes said...

Glad to hear that this was useful.

For Anonymous, unfortunately I do not use playlists. But that does not mean I cannot have a look to see if I can figure something out. Will let you know if I figure that one out, or potentially create a follow-up post.

Sashmo said...

Awesome. Works just great. I was just looking for how to do this last week.

Great Job. Confirmed works with 1.01

PiMpP said...

Thank you. Works great

tekbreak said...

Just a little help. With this code you can fix the problem of the FILE ASSOCIATION.

Change variable VLCdir to the folder containing VLC.app

on open selected_file
set VLCdir to "/Applications"
set source to POSIX path of selected_file
tell application "Terminal"
do script "\"" & VLCdir & "/VLC.app/Contents/MacOS/VLC\" \"" & source & "\""
quit saving no
end tell
end open

tekbreak said...

Sorry, I forgot to say that you have to copy&paste that code at the end of this site's original code

Anonymous said...

Thanks! I'm in the middle of switching to Mac from WinXP and couldn't figure this out.

Richard said...

I say thee THANKS! Indeed!

I switched to Mac from PC permanently about 2 years ago and have been looking for a solution ever since!

You the MAN!

I even used your script to add a specific file (a webcam) to the new playlist!

Post a Comment