Page 1 of 1

Launching VLC in Fullscreen from Terminal

Posted: 04 Jul 2012 08:40
by Pluto is a Planet
Hi, I don't seem to be able to launch VLC in fullscreen from the terminal. I can open it and it'll play a video no problem, but it doesn't go to fullscreen with either the extra -f or --fullscreen parameters. I have to manually click the button. It is listed in the terminal as an available option for VLC, and it does work for Windows.

There are two things to note as extra details that I don't think will matter but... First is I just copied the VLC.app folder onto a disk and this is how I've been using VLC when encountering this problem. It was installed on the same computer but in a different directory before. Second is the version of OS X being used is 10.7.4. I haven't tested it on any other Macs.

Here is the output when trying to play a regular video (and succeeding, but not in fullscreen):

Code: Select all

VLC media player 2.0.1 Twoflower (revision 2.0.1-0-gf432547) [0x10020a640] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface. Fontconfig error: Cannot load default config file Fontconfig error: Cannot load default config file Fontconfig error: Cannot load default config file
Btw, the command I'm running is basically: VLC.app/Contents/MacOS/VLC "video file" -f --play-and-stop

Please reply if you know the solution to this issue!

Re: Launching VLC in Fullscreen from Terminal

Posted: 04 Jul 2012 17:30
by fkuehne
This feature isn't supported on the Mac at this point, so except for hacking the source, there is nothing you can do about it at this point. Sorry about. Let's see if we can fix it :-)

Re: Launching VLC in Fullscreen from Terminal

Posted: 04 Jul 2012 20:51
by Pluto is a Planet
Thanks for letting me know! I'm launching VLC from another app though, so is it possible to send something to VLC with an output stream to make it fullscreen?

Re: Launching VLC in Fullscreen from Terminal

Posted: 04 Jul 2012 23:32
by fkuehne
Yeah, you can send the respective Apple Event / AppleScript command to turn fullscreen mode after it launched.

Re: Launching VLC in Fullscreen from Terminal

Posted: 06 Jul 2012 03:32
by Pluto is a Planet
Thanks a ton, I got it working! For future reference, this is what I did...

I opened AppleScript Editor, used the following, and saved as an application:

Code: Select all

tell application "VLC" activate end tell tell application "System Events" keystroke "f" using {command down} end tell
When I launched VLC, it would always open in the background, so that's why I included the first half.

Furthermore, whenever VLC's directory changed, the AppleScript wouldn't work the first time because VLC took extra time to load or something, but it would after a little bit of time. So with my app, I saved in a text file where VLC was currently located, and would check if that changed every time. If it didn't exist or was in a different directory, I'd wait 2 additional seconds before running the script. I did wait 500 ms before launching the script in general. Note that these are arbitrary times that seemed to work, but running the script immediately after would simply launch VLC again in front of the video I was trying to play, and check the option for the new instance of VLC to play in fullscreen the next time it opened a video.

Re: Launching VLC in Fullscreen from Terminal

Posted: 06 Jul 2012 15:26
by dfuhrmann
Btw, the command I'm running is basically: VLC.app/Contents/MacOS/VLC "video file" -f --play-and-stop
Thats strange. On my machine, the command "-f" just works nicely. The only problem is that the fullscreen window is opened in the background, and only shows in front after out did a click on the vlc dock icon.

Re: Launching VLC in Fullscreen from Terminal

Posted: 07 Jul 2012 12:25
by Pluto is a Planet
Btw, the command I'm running is basically: VLC.app/Contents/MacOS/VLC "video file" -f --play-and-stop
Thats strange. On my machine, the command "-f" just works nicely. The only problem is that the fullscreen window is opened in the background, and only shows in front after out did a click on the vlc dock icon.
My gosh, the VLC developers are amazing. It's been updated to 2.0.2! I know because my copy of VLC is still 2.0.1 (I'm using Windows atm and have the folder here; I got the info from the plist file). The latest update must've had this built in :O

Props to VLC! I'll simply use the command line argument then :D

Re: Launching VLC in Fullscreen from Terminal

Posted: 27 Dec 2012 18:12
by virote328
on the mac you can use the open command. its the same as right clicking and selecting"open". Mine is set to open using vlc by default. If you want vlc to open full screen then you have to send the "-f" to the argv of its main function.

Do it like this

open filename --args -f