Stop/play to fix window resize issue

Discuss your Lua playlist, album art and interface scripts.
lucindah81
New Cone
New Cone
Posts: 2
Joined: 30 Sep 2013 14:07

Stop/play to fix window resize issue

Postby lucindah81 » 30 Sep 2013 14:36

I am trying to play video files where I set a fixed window width (in settings -> video -> window properties) so the left side of my screen isn't used by VLC. The window height is of no concern to me, it'll just automatically vary depending on the current video's aspect ratio.

As I think a lot of you know there are problems with playing multiple files in a fixed window size: as soon as you're gonna play a file of different dimensions than the last, VLC will resize it's window according to the video file, NOT according to your settings.
A manual solution is to stop playback and then start it again. Then your fixed window size is restored. But you have to do this time and time again.

Is it possible to perform this task using a script? So: every time VLC starts playing a new file (whether automatically after a file ends or after pressing 'next'), the script will quickly stop playback and then start it again, thus preserving the fixed window size you set.

I am a novice in programming, and reading up on the documentation on lua left me with more questions than answers.
I think in theory it could be a quite simple script though. And maybe very useful for others users with window size issues.

Thanks in advance for any reactions

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: Stop/play to fix window resize issue

Postby mederi » 09 Oct 2013 13:18

Try following settings:
Tools > Preferences > ( Show settings = All ) >
> Interface \ Main interfaces \ Qt: [ ] Resize interface to the native video size
> Video: [v] Video Auto Scaling

lucindah81
New Cone
New Cone
Posts: 2
Joined: 30 Sep 2013 14:07

Re: Stop/play to fix window resize issue

Postby lucindah81 » 10 Oct 2013 16:52

Thanks for your reply mederi.
Your suggestion indeed keeps a fixed window size for the player.

But, and maybe I'm just too particular with what I want, with this method there's often empty space in your window around the video.

I'm looking for a way where the window is the same size as the video you are playing, though limited by the width I set in preferences.
Again, maybe I'm just too particular with what I want...

Butcho
Blank Cone
Blank Cone
Posts: 11
Joined: 21 Mar 2012 10:21

Re: Stop/play to fix window resize issue

Postby Butcho » 14 Feb 2014 13:18

I'm looking for a way where the window is the same size as the video you are playing, though limited by the width I set in preferences.
Again, maybe I'm just too particular with what I want...
No, you are not. :)

I´am waiting for this bug to be fixed since VLC 2.0 was released. I use a small window with 250px in the upper left corner to show some videos while working, but with this bug all versions since 2.0 are useless for me because suddenly *boing* a video fills the whole screen. That´s really annoying so I still use the latest VLC 1.x release where this bug doesn´t occur.

Also opened a ticket many months ago which was closed with the reason "duplicate". @VLC Developers: is this really that hard to fix? Or is it just not on your list of priorities?

However, it sucks and I would be so glad to use VLC 2.x somewhere in the near future. :mrgreen:

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: Stop/play to fix window resize issue

Postby Jean-Baptiste Kempf » 14 Feb 2014 15:29

There is an option, in the main preferences, so that the UI does not resize when a video starts.
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.

Butcho
Blank Cone
Blank Cone
Posts: 11
Joined: 21 Mar 2012 10:21

Re: Stop/play to fix window resize issue

Postby Butcho » 14 Feb 2014 17:26

There is an option, in the main preferences, so that the UI does not resize when a video starts.
That doesn´t solve the problem Maybe my thread from two years ago will you to show what I mean (some screenshots and a small video file included) >>> https://forum.videolan.org/viewtopic.php?f=14&t=99393

Phoenix Star
New Cone
New Cone
Posts: 1
Joined: 28 Feb 2014 06:02

Re: Stop/play to fix window resize issue

Postby Phoenix Star » 28 Feb 2014 06:06

Has this been fixed yet? I run 2 monitors and I commonly have VLC on my secondary. My secondary monitor is an older and cheaper one that only goes up to 1440x900 for resolution and when I am watching videos in a playlist, the window resizes and if the video I am watching is full HD, it resizes beyond the resolution of my second monitor and fattens itself right across my main screen and I have to readjust it every time. Maybe I'm not doing it right if it has been fixed already.

*Edit*
I don't mind it resizing in height all it wants. I would actually prefer that it shrink down to fit smaller videos to get rid of the empty space in the top and bottom so I can reclaim more of my screen otherwise buried. (it's a smaller screen remember) I just want to limit it from spilling over to my main screen.

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: Stop/play to fix window resize issue

Postby mederi » 02 Mar 2014 15:24

I think that a satisfactory script is not possible:

Code: Select all

function descriptor() return { title = "stop-play", capabilities = {"input-listener","meta-listener"} } end function activate() Stop_Play() end function deactivate() end function meta_changed() end function input_changed() Stop_Play() end function Stop_Play() local input=vlc.input.item() if input then current_uri=input:uri() if current_uri~=old_uri then old_uri=current_uri vlc.playlist.stop() else vlc.playlist.play() end end end
Please file a bug report: https://trac.videolan.org/vlc
The feature works properly in VLC-1.1.x. Preferences: Video width [500], Video height [-1] => all video files in playlist play with the desired fixed width, changing hight proportionally.

robinhook
Blank Cone
Blank Cone
Posts: 10
Joined: 23 Dec 2008 04:32

Re: Stop/play to fix window resize issue

Postby robinhook » 28 May 2015 06:30

dummy interface (-IDummy) seem have this bug also, especially when a list of video files are finished and looped back to 1st video, if playlist settings is set to "Repeat All"


Return to “Scripting VLC in lua”

Who is online

Users browsing this forum: No registered users and 5 guests