Skip to content

Command line operation (macOS)

Gary Tyler edited this page Feb 22, 2020 · 4 revisions

Launch the media player

On macOS, the media player can be run from the terminal or shell script with the open command. Just give the path to the macOS application bundle (.app) as an argument. Because the application name SeeVR Player has a space in it, be sure to wrap the path with quotes, which causes path names that include spaces to be interpreted as one continuous name. For file paths that don't include any spaces, the quotes are redundant.

For example, with the media player installed in the macOS root Applications directory, run it from the terminal or shell script using:

open '/Applications/SeeVR Player.app'

Load media files at runtime

Media can be loaded into the playlist at runtime by specifying the media file paths as command line arguments. On macOS, add these arguments using the open command's --args flag, after the application path. With a video file called my_video.mp4 located on the active user's macOS desktop, the video can be loaded at runtime using:

open '/Applications/SeeVR Player.app' --args '~/Desktop/my_video.mp4'

Notice the ~ symbol at the start of the media path. When ~ is used at the start of a path, it acts like a shortcut to the user's home directory. So, if the macOS user's name is John, ~/Desktop would translate to /Users/John/Desktop. We don't use ~ at the start of '/Applications/SeeVR Player.app' because the Applications directory is located at the system root.

Load multiple media files at runtime

To load multiple media files at runtime, just separate the paths with a space. The files will be loaded in the order that they are declared. With 3 files video1.mp4, video2.mp4, video3.mp4, each located in a directory called media on the macOS user's desktop, load them all at runtime using:

open '/Applications/SeeVR Player.app' --args '~/Desktop/media/video1.mp4' '~/Desktop/media/video2.mp4' '~/Desktop/media/video3.mp4'

If passing a large quantity of media paths, backslashes can be used to continue command interpretation on the next line in your script. The command from the previous example can also be entered as:

open '/Applications/SeeVR Player.app' --args \
'~/Desktop/media/video1.mp4' \
'~/Desktop/media/video2.mp4' \
'~/Desktop/media/video3.mp4'

Media files located in the same directories can be loaded in bulk by just specifying the directory paths. To load all media files found in a directory on the macOS user's desktop called media, use:

open '/Applications/SeeVR Player.app' --args '~/Desktop/media'