[MPlayer-users] dynamically resize video while playing

Darryl Burchfield dburchfield at additech.com
Tue Aug 11 17:52:58 EEST 2020


FYI, the two different screen sizes were on two different machines running the same software, so we are not mirroring the out on a system.  The solution I found did the trick.  

Thanks again,
Darryl

-----Original Message-----
From: MPlayer-users <mplayer-users-bounces at mplayerhq.hu> On Behalf Of Alexander Strasser
Sent: Friday, August 7, 2020 6:30 PM
To: MPlayer usage questions, feature requests, bug reports <mplayer-users at mplayerhq.hu>
Subject: Re: [MPlayer-users] dynamically resize video while playing

On 2020-08-03 15:55 +0000, Darryl Burchfield wrote:
> Thank you for replying.
> I was able to figure out how to get MPlayer to resize to the full screen size.  The screen size can be specified in the constructor.  See below for my solution to this issue.
>
> The code below is written in C# but should be able to do the same with any dotnet language.  It is in a WinForm app ported from Windows to Linux, which was the challenge I was faced with. Mono is required to run a WinForm app on Linux.
>
> using System.Windows.Forms;
> using LibMPlayerCommon;
> // _screen is equal to 0 or 1 according to which screen the video is playing.
> Size = Screen.AllScreens[_screen].Bounds.Size;
> _mPlayer = new MPlayer((long)Handle, MplayerBackends.SDL, 
> "/usr/bin/mplayer", false, new TimeSpan(0, 0, 1), 
> String.Format("-slave -quiet -idle -v -ontop -fs -vf scale={0}:{1}", 
> Size.Width, Size.Height));
>
> I now have the app running on Debian with a little cleanup to do.   Thanks for your help.

I assume my interpretation of the situation was mostly correct then.

So while your solution kind of works I think it's showing that something is not working so well. If you have to resize in software (-vf scale) for playback, it usually shows that the video output you use is probably not very efficient and that there might be more typical playback problems like no vsync etc.

IIRC I have written some pointers in my initial reply. Glad you found a way to get things working, but re-reading my mail might give you some hints on how to further evaluate the possibilities and improve your applications.

Good Luck!


  Alexander

> ________________________________
> From: MPlayer-users <mplayer-users-bounces at mplayerhq.hu> on behalf of 
> The Wanderer <wanderer at fastmail.fm>
> Sent: Wednesday, July 29, 2020 5:35 PM
> To: mplayer-users at mplayerhq.hu <mplayer-users at mplayerhq.hu>
> Subject: Re: [MPlayer-users] dynamically resize video while playing
>
> On 2020-07-29 at 14:17, Alexander Strasser wrote:
>
> > Hi!
> >
> > On 2020-07-27 14:40 +0000, Darryl Burchfield wrote:
> >
> >> Is MPlayer capable of resizing a video while playing. I have an 
> >> application that runs on imbedded systems with two different 
> >> display sizes but with the same video for both displays.  The app 
> >> is a Windows 7/10 app written in C# but I am porting it over to 
> >> Linux by running the app with Mono on Debian.  I do have the video 
> >> playing on Linux but it does not resize to the actual size of the 
> >> display.
> >
> > Heavily depends on the exact circumstances.
>
> <snip>
>
> > Hope that helps a bit. I must admit didn't completely understand 
> > your exact setup and your motivation.
>
> I parse the situation as being:
>
> * A single computer, connected to two different monitors with 
> different resolutions.
>
> * Using a "mirror" display configuration, so that both monitors 
> display the same content. (Depending on the details, in some cases it 
> may be possible to have this happen with the content dynamically 
> rescaled to fit whichever monitor is involved. The nearest real-world 
> examples I can think of from the Windows world involve "extend" 
> configurations rather than "mirror", though.)
>
> * Want to have the video rescaled on the fly so that it exactly fits 
> the screens of both monitors at once, irrespective of their different 
> resolutions. (Vs. fitting one screen but being either too large or too 
> small for the other, as apparently happens now.)
>
> At a glance, that looks to me as if it's not an issue for MPlayer, or 
> for any given video-producing application, but for whatever is doing 
> the "mirror"ing of the displays. I have basically no dual-displays 
> experience under Linux, to date, so I can't really advise here.
>
> The question to get started investigating would probably be: what 
> exactly does "with the same video for both displays" mean, and what 
> software is producing that behavior? My guesses about the former are 
> above, but I have no idea about the latter.
>
> --
>    The Wanderer
_______________________________________________
MPlayer-users mailing list
MPlayer-users at mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users


More information about the MPlayer-users mailing list