Thursday, June 18, 2009

How to run multiple instances of VLC - Part II

Previously I wrote about how to run multiple instances of VLC but encountered an issue with file association. This issue has been resolved allowing to open multiple VLC instances by double-clicking on associated files. In addition, it allows for drag and drop as well.

Refer to the previous article "How to run multiple instances of VLC" for the setup up but use the new launcher script included below. Afterwards, I will discuss about File Association to complete the creation of this new VLC launcher.

Launcher Creation: Follow the previous article with the exception of using the following script instead.




set filecount to 0

on open filelist
repeat with i in filelist
set filecount to 1
do shell script "open -n -a /Applications/VLC.app " & quoted form of POSIX path of i & " &> /dev/null &"
-- open -n Opens a new instance of the application even if one is already running.
-- open -a Opens with the specified application.
-- "quoted form of" is added in case any spaces exist in file name
end repeat
end open

if filecount < 1 then
do shell script "open -n /Applications/VLC.app"
end if


File Association: To ensure your videos open with the new launcher you need to change the default application for all the movie types.
  1. Right-Click on a file with the extension type you would like to associate (.avi/.mpeg/.mov/.wmv/.mp4/etc.) and select Get Info.

  2. In the properties window, refer to the section Open with.

  3. Click on the drop-down list and select Other

  4. Select the VLC.app application where you previously copied the file. In the previous article, I referred to Macintosh/Users//Library/Scripts/VLC.app

  5. This particular file will now open with your new launcher. But to ensure the changes for all files with this file extenstion, click on Change All...



  6. You will have to repeat for each file extension type you would like to open with VLC.
By following this walkthrough guide, you can now enjoy multiple instances of VLC by simply double clicking on your media files. In addition, you can also drag and drop media files directly on the VLC icon you created in the dock (if you haven't created one, refer to the previous article "How to run multiple instances of VLC"). This finally completes this walkthrough guide explaining how to run multiple instances of VLC. I hope you find this useful.

Please do not hesitate to post your experience with this walkthrough guide.

8 comments:

  1. i made a new .app with the above script, but it does not open a new vlc for a new video file. it just adds the video file to the existing playlist. i can open multiple instances though.

    ReplyDelete
  2. Thanks for the feedback. I will have to experiment with that one. If I find a solution, will let you know.

    ReplyDelete
  3. I made the first one perfectly. But when I go to add other, I can select the script, but when I do change all it defaults back down to itunes.... Any ideas?

    ReplyDelete
  4. Part I & II - excellence! Thanks!

    ReplyDelete
  5. it doesn´t work for me. when i say "change for all" it take quicktime als default program :( any ideas about?

    ReplyDelete
  6. In the Get Info dialog box, whenever I clicked Change All button, it changed to choose default VLC.app

    ReplyDelete
  7. Your article very well and good, bringing inspiration to many. I hope people visit my website.
    Friv 11 | K7x |A10 Online |Firv |Yoob 5 .

    ReplyDelete
  8. There are things I can not understand but I will learn it. I think nothing is too late. Then I realized that I had improved a lot.
    http://colorswitchplay.com

    ReplyDelete