Author Topic: mplayer - how to position the playback window?  (Read 6577 times)

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
mplayer - how to position the playback window?
« on: January 29, 2021, 02:56:47 pm »
I admit that I've been living a spoiled life for a while now having deployed my dual-screen setup...love it, heck now I wish I could only add the 3rd LCD.

In the meantime, I have certain applications that always need re-sizing (because they insist on treating the whole 3840x1200 screen as a single physical screen and are coded to use proportional sizing - just my guess), or applications that flat-out do not handle the dual screen all that well.

Case in point, mplayer. Here are the contents of my configuration file:

Code: [Select]
# Write your default config options here!
# VIDEO
vo=kva:snap
#geometry=25%:25%
geometry=5%:5%
#aspect=16:9
double=yes # double buffering(recommended for subtitles)
autoq=100 # AUTO control the video quality
#vf=pp=de,hqdn3d # additional post-processing options
#vf=pp # additional post-processing options
#framedrop="1" # For slow machines
#hardframedrop="0" # Make sure hard frame drop is off but can turn on easily now

# AUDIO
ao=kai:dart
#ao=kai:uniaud
#srate=48000
softvol-max=300

#font=g:\psfonts\verdana.ttf
#subfont=g:\psfonts\verdana.ttf

codecpath=g:\apps\multimedia\mplayer\codecs

# OTHER CONTROLS
msglevel:all=5 # set the DEBUG level (5 = DEFAULT)
cache=8192 # set the TOTAL cache size
cache-min=25 # fill xx% of TOTAL cache before playback start
autosync=30 # sync up video/audio by adjusting the algorithm
#mc=1.0 # up to how many seconds/frame to adjust
priority=high # set the priority of mplayer (idle,belownormal,normal,abovenormal,high,realtime)

# Video Overlay Options and VIO Message Window Options
#really-quiet=yes # limit what the VIO window shows
#fixed-vo=yes # keep display output window open between different feeds
colorkey=0x000001 # change the background to off-black, instead of bright green

# Setting for Browser User Agent response
user-agent=NSPlayer/4.1.0.3856

I am running in SNAP video mode and if you notice I have 'geometry=5%:5%' in place, which in theory should position that playback window in a certain spot on the screen.

This does not work.

The window always shows in the center of my dual-head display, which might be OK if it wasn't for the fact that the the 2nd screen is all BLACK, meaning, only half the video shows and that is only the video on head=1 of the dual-head setup.

And while that may be a SNAP only video mode problem (DIVE, VMAN both work) I need to be able to run in SNAP mode as opposed to the others. Either way, the playback screen positioning problem persists even with DIVE or VMAN.

So I'm curious, has anyone used the '-geometry' option successfully? Based on what on-line mplayer references state it may very well be that SNAP (or any other OS/2 video modes) do not support that option at all.

Pete

  • Hero Member
  • *****
  • Posts: 1281
  • Karma: +9/-0
    • View Profile
Re: mplayer - how to position the playback window?
« Reply #1 on: January 31, 2021, 08:54:28 pm »
HI Dariusz

Only running the 1 screen so I have never seen this problem and if the geometry option does not resolve it can only suggest you contact mplayer support/community forum, explain the problem and see how they resolve it on *nix systems.

I do have a question that may have some bearing on the problem: What happens if you use smplayer? - the mplayer frontend. Can you position that to your liking?


Regards

Pete

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: mplayer - how to position the playback window?
« Reply #2 on: January 31, 2021, 09:53:53 pm »
KOMH would be the one to contact as he is the maintainer of the OS/2 port and did the video support.
*nix systems would use different video subsystem, X11 or such

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
Re: mplayer - how to position the playback window?
« Reply #3 on: February 01, 2021, 01:31:40 am »
Hi Pete,

I do have a question that may have some bearing on the problem: What happens if you use smplayer? - the mplayer frontend. Can you position that to your liking?...

Yeah, both smplayer and vlc work fine...but I have found the simple CLI-like approach to mplayer and ease of it's configuraiton so much quicker...basically double click and video is up and running. I use that approach for everything but the longer stuff.

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
Re: mplayer - how to position the playback window?
« Reply #4 on: February 01, 2021, 01:34:31 am »
Hi Dave,

KOMH would be the one to contact as he is the maintainer of the OS/2 port and did the video support.
*nix systems would use different video subsystem, X11 or such

Yeah, I think you're right. He's been super quick to respond to a couple of VLC inquiries I had in the past, so I'll contact him regarding this one as well.

I suspect as you and Pete pointed out, the '-geometery' may be supported with specific video configurations only. I couldn't quite get that answer out of the published docs, which typically are very *nix centric.

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
Re: mplayer - how to position the playback window?
« Reply #5 on: March 03, 2021, 02:31:16 pm »
Quick update everyone.

I did log a ticket for this issue. KO worked through this super quick and provided a new EXE that fully handles the '-geometry' parameter.

Not sure yet if he intends on releasing an updated MPLAYER build that has this included, or maybe rolling this up to the next update release? I am waiting for his feedback, but I did let him know that I'm updating this thread as a FYI to everyone here.

Either way, the test EXE he provided me with is available HERE => (https://github.com/komh/mplayer-os2/files/6057294/mplayer.zip) in my Issue Ticket HERE => (https://github.com/komh/mplayer-os2/issues/10)

Also, as a FYI, we worked on addressing a funny/weird issue with VLC, he has a separate DLL that fixes this as well, you can find the Issue Log HERE => (https://github.com/komh/vlc-os2/issues/21).

Lutz Wagner

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: mplayer - how to position the playback window?
« Reply #6 on: March 07, 2021, 02:18:34 pm »
I have had the same problem with my own video app, using mplayer as the executive program for playing the video, which comes up in its own PM-window.
To let the mplayer-window show up on my desired place I am using the commandline-tool PGMCNTRL (by Christian Langanke). This tool lets you identify any running exe and set its x,y-position to what you like. It works fine.

I once got it from Hobbes (where I can't find it no more :-( ).





Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
Re: mplayer - how to position the playback window?
« Reply #7 on: March 07, 2021, 04:22:12 pm »
Hi Lutz,

I have had the same problem with my own video app, using mplayer as the executive program for playing the video, which comes up in its own PM-window.
To let the mplayer-window show up on my desired place I am using the commandline-tool PGMCNTRL (by Christian Langanke). This tool lets you identify any running exe and set its x,y-position to what you like. It works fine...

Yeah, that's an interesting approach that I am actually using for other purposes on my machine. In my case I use a utility called "SIZER", it has several other controls but it only controls VIO windows.

Good insight though, I'll look around for the app you mentioned as that could be useful for other purposes (such as getting my 'Free Shared Memory' utility to show up in the desired spot on my deal head desktop).

Thank you!

EDIT
====
Found it...https://www.os2site.com/sw/util/process/old/index.html, look for 'pgmcnxxx' filename, and here is v1.07 (which I installed here already) on Hobbes https://hobbes.nmsu.edu/download/pub/os2/util/process/pgmcn107.zip, so time to play with it.
« Last Edit: March 07, 2021, 04:27:36 pm by Dariusz Piatkowski »

Ian Manners

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 464
  • Karma: +10/-0
  • I am the computer, it is me.
    • View Profile
    • ComKal Networks Australia
Re: mplayer - how to position the playback window?
« Reply #8 on: March 07, 2021, 04:28:53 pm »
I have had the same problem with my own video app, using mplayer as the executive program for playing the video, which comes up in its own PM-window.
To let the mplayer-window show up on my desired place I am using the commandline-tool PGMCNTRL (by Christian Langanke). This tool lets you identify any running exe and set its x,y-position to what you like. It works fine.

I once got it from Hobbes (where I can't find it no more :-( ).

Look for pgmcntrl.zip for the old version, or pgmcn107.zip for what might be the last version.
I see they are at http://www.os2site.com/sw/util/process/
Cheers
Ian B Manners

Andreas Schnellbacher

  • Hero Member
  • *****
  • Posts: 827
  • Karma: +14/-0
    • View Profile
Re: mplayer - how to position the playback window?
« Reply #9 on: March 07, 2021, 04:33:26 pm »
Look for pgmcntrl.zip for the old version, or pgmcn107.zip for what might be the last version.
True.
I see they are at http://www.os2site.com/sw/util/process/
... and at Hobbes.