How to control window properties on VLC by command-line?

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
dewang2k3
Blank Cone
Blank Cone
Posts: 10
Joined: 03 Feb 2015 20:27

How to control window properties on VLC by command-line?

Postby dewang2k3 » 03 Feb 2015 23:32

I've read VLC command line help on controlling window properties by the following options:

--width=<integer>
--height=<integer>
--video-x=<integer>
--video-y=<integer>

To my understanding, the first two width/height are for setting up VLC output window size and the last two video-x/video-y are for setting up VLC output window position. But when I tried my command line as follows:

vlc.exe --width=500 --height=500 --video-x=100 --video-y=100 movie1080p.mp4

The VLC was launched successfully, however I could not control the position and size of the video output window at all. Is there anyone used these options before or any idea why these window position/size option do not work?

Thanks,
Derek Wang

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: How to control window properties on VLC by command-line?

Postby Jean-Baptiste Kempf » 04 Feb 2015 11:41

You need to disable video embedding.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

dewang2k3
Blank Cone
Blank Cone
Posts: 10
Joined: 03 Feb 2015 20:27

Re: How to control window properties on VLC by command-line?

Postby dewang2k3 » 04 Feb 2015 18:45

Hi Jean,

Thanks for your reply, but I don't understand you here. How to disable video embedding? For embedded window video, there is an option "--drawable-hwnd=<integer>". Do you mean that this embedded video option CANNOT be used together with those window properties options(--width=<integer>, --weight=<integer>, --video-x=<integer>, video-y=<integer>)? Can you explain it in more details?

Thanks,
Derek

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: How to control window properties on VLC by command-line?

Postby mederi » 04 Feb 2015 20:44

--no-embedded-video

dewang2k3
Blank Cone
Blank Cone
Posts: 10
Joined: 03 Feb 2015 20:27

Re: How to control window properties on VLC by command-line?

Postby dewang2k3 » 05 Feb 2015 00:12

Hi Medderi,

Now, I used the following command-line command:

C:\Applications\VLC>vlc.exe --no-embedded-video --video-x=100 --video-y=100 --width=400 --height=400 Movie1080p_1.mp4

It looked like I can control the position(video-x,video-y) of the pop-up video window now, but NOT the size(width,height) of the it. The size of the pop-up video window seemed to be the same as the size(resolution) of the video source file(1920X1080). Here are my new questions:

(1)How to use these two size parameters "--width=<integer> --height=<integer>" to control the size of the pop-up video output window?
(2)If these twp size parameters don't work, I may add in a transcoder to control the output video window size? I tried the following command:

C:\Applications\VLC>vlc.exe --no-embedded-video --video-x=100 --video-y=100 --sout-transcode-width=400 --sout-transcode-height=400 Movie1080p_1.mp4

It looked like the transcoder didn't work at all. The size of the pop-up video window was the same be before without any change??? So, my third question is:

(3)How to add in the "transcode" or "scale" options in VLC command-line to control the output video window size?

Thanks,
Derek

dewang2k3
Blank Cone
Blank Cone
Posts: 10
Joined: 03 Feb 2015 20:27

How to control the video window size from command-line commands?

Postby dewang2k3 » 06 Feb 2015 19:52

Hi Folks,

I tried the following command-line command in my Windows 7 PC:

vlc.exe --no-embedded-video --width=<integer> --height=<integer> --video-x=<integer> --video-y=<integer> myvideo.mp4

It looked like the options (--width=<integer> --height=<integer>) didn't work at all and the size of the video window is still the same as the size of the input video file (1920X1080). The options (--video-x=<integer> --video-y=<integer>) worked fine on controlling the position of the video window.

Is there anyone had this window size control problem? Is there any other options I may use to control the video window size? How to invoke the "swscale" module in VLC command-line?


Thanks and any ideas will be greatly appreciated!
Derek

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: How to control window properties on VLC by command-line?

Postby mederi » 06 Feb 2015 20:37

--no-qt-video-autoresize
--autoscale

https://forum.videolan.org/viewtopic.ph ... 54#p380211

dewang2k3
Blank Cone
Blank Cone
Posts: 10
Joined: 03 Feb 2015 20:27

Re: How to control window properties on VLC by command-line?

Postby dewang2k3 » 06 Feb 2015 21:34

Hi Mederi,

Thanks for your reply! But I tried your options and they didn't work in my Windows 7 PC here. Here are what I've tried:

Try 1: --no-embedded-video --no-qt-video-autoresize --autoscale --width=200 --height=200 --video-x=100 --video-y=100 myvideo.mp4
--> result: the size of the output video window(pop-up) was NOT changed by the width/height and it was still the same as the size of my input video;

Try 2: --no-embedded-video --autoscale --width=200 --height=200 --video-x=100 --video-y=100 myvideo.mp4
--> result: the size of the output video window(pop-up) was NOT changed by the width/height and it was still the same as the size of my input video;

Try 3: --no-embedded-video --no-qt-video-autoresize --width=200 --height=200 --video-x=100 --video-y=100 myvideo.mp4
--> result: the size of the output video window(pop-up) was NOT changed by the width/height and it was still the same as the size of my input video;

Try 4: --no-qt-video-autoresize --autoscale --width=200 --height=200 --video-x=100 --video-y=100 myvideo.mp4
--> result: the size of the output video window(overlapped) was NOT changed by the width/height , but it was scaled down to the size of the video control window(overlapped). There was not video pop-up window anymore.

In conclusion, I still can NOT control the SIZE of the output video window either the pop-up window ( in Try1/Try2/Try3) or the embedded/overlapped window(in Try4).

Basically, what I want is just to control the size and position of the output video window which can be either in the pop-up window or embedded in the overlapped window.
Since we have three different options to play around here, can you give me exactly what options you provided to make it work?

Many thanks!
Derek

RePlay.be
New Cone
New Cone
Posts: 1
Joined: 03 Apr 2015 00:32

Re: How to control window properties on VLC by command-line?

Postby RePlay.be » 03 Apr 2015 00:57

For anyone else trying to get this to work: the width and height parameters appear to broken currently. See this bug report: https://trac.videolan.org/vlc/ticket/9931. Hopefully this will be fixed when VLC 3.0.0 is released.

If you need this feature, you can download version 2.0.8, which was the last version where it still worked: http://download.videolan.org/pub/videolan/vlc/2.0.8/. I needed this feature only for Livestreamer so I downloaded the portable version so I can still keep the latest version installed.


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: Bing [Bot], videolanroamer and 61 guests