Page 1 of 1

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

Posted: 03 Feb 2015 23:32
by dewang2k3
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

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

Posted: 04 Feb 2015 11:41
by Jean-Baptiste Kempf
You need to disable video embedding.

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

Posted: 04 Feb 2015 18:45
by dewang2k3
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

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

Posted: 04 Feb 2015 20:44
by mederi
--no-embedded-video

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

Posted: 05 Feb 2015 00:12
by dewang2k3
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

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

Posted: 06 Feb 2015 19:52
by dewang2k3
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

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

Posted: 06 Feb 2015 20:37
by mederi
--no-qt-video-autoresize
--autoscale

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

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

Posted: 06 Feb 2015 21:34
by dewang2k3
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

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

Posted: 03 Apr 2015 00:57
by RePlay.be
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.