0

I'm building a script to automatically run videos held on a windows server using VLC. I can get VLC to play files on my drives, but not from files held on a server. For example:

tell application "VLC" to open "smb://server01.ac.uk/videos/filename.avi"

fails with the message: cannot open file /smb://..../filename.avi (No such file or directory), while:

tell application "VLC"
    activate
    OpenURL "smb://server01.ac.uk/videos/filename.avi"
    play
end tell

yields open of 'smb://..../filename.avi' failed. Does anyone know the best way to achieve this? Thanks in advance.

2
  • 1
    Video players (and music players ) as a general rule do not handle the mounting/dismounting of remote volumes for file access, and rely on the OS to perform this task. for OSes that don't automatically handle samba addressing, this can be a big headache. The general answer is to mount the volume via FUSE, and point the application at the mount point on the localsystem. that way the App itself need not worry about how it was mounted, and need not care about sharing protocols like SMB, NFS, etc. figure out how to do that in applescript, and you should be golden. May 14, 2013 at 13:40
  • Thanks @Frank Thomas - if you put this in an answer I'll tick it.
    – geotheory
    May 14, 2013 at 14:44

1 Answer 1

1

The following script works for me:

try
    mount volume "smb://server01.ac.uk/videos/"
    set videoFolder to "/Volumes/server01.ac.uk/videos/"

    tell application "VLC"
        fullscreen
        open videoFolder
        next
    end tell
end try
1
  • wonderful, Glad you got it working! May 14, 2013 at 14:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .