Launching VLC in Fullscreen from Terminal

macOS specific usage questions
Pluto is a Planet
Blank Cone
Blank Cone
Posts: 10
Joined: 16 Feb 2012 23:24

Launching VLC in Fullscreen from Terminal

Postby Pluto is a Planet » 04 Jul 2012 08:40

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!

fkuehne
Developer
Developer
Posts: 7190
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

Re: Launching VLC in Fullscreen from Terminal

Postby fkuehne » 04 Jul 2012 17:30

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 :-)
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

Pluto is a Planet
Blank Cone
Blank Cone
Posts: 10
Joined: 16 Feb 2012 23:24

Re: Launching VLC in Fullscreen from Terminal

Postby Pluto is a Planet » 04 Jul 2012 20:51

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?

fkuehne
Developer
Developer
Posts: 7190
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

Re: Launching VLC in Fullscreen from Terminal

Postby fkuehne » 04 Jul 2012 23:32

Yeah, you can send the respective Apple Event / AppleScript command to turn fullscreen mode after it launched.
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

Pluto is a Planet
Blank Cone
Blank Cone
Posts: 10
Joined: 16 Feb 2012 23:24

Re: Launching VLC in Fullscreen from Terminal

Postby Pluto is a Planet » 06 Jul 2012 03:32

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.

dfuhrmann
Developer
Developer
Posts: 1183
Joined: 02 Jul 2012 11:09

Re: Launching VLC in Fullscreen from Terminal

Postby dfuhrmann » 06 Jul 2012 15:26

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.

Pluto is a Planet
Blank Cone
Blank Cone
Posts: 10
Joined: 16 Feb 2012 23:24

Re: Launching VLC in Fullscreen from Terminal

Postby Pluto is a Planet » 07 Jul 2012 12:25

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

virote328
New Cone
New Cone
Posts: 1
Joined: 27 Dec 2012 18:09

Re: Launching VLC in Fullscreen from Terminal

Postby virote328 » 27 Dec 2012 18:12

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


Return to “VLC media player for macOS Troubleshooting”

Who is online

Users browsing this forum: No registered users and 6 guests