PRB: Video Window Moves During Playback

ID: Q139977


The information in this article applies to:
  • Microsoft Video for Windows Development Kit version 1.1
  • Microsoft Windows Software Development Kit (SDK) 3.1
  • Microsoft Win32 Software Development Kit (SDK), versions 3.5, 4.0


SYMPTOMS

The video playback window shifts position at the start of playback.


CAUSE

Microsoft Windows versions 3.1 and 3.11 along with Windows 95 automatically position the top-left corner (origin) of the video image (client area) at specific screen coordinates for playback performance reasons. Therefore, playback in a non-aligned client area can be slowed by up to 50%.


RESOLUTION

To avoid the window repositioning, an application must set the top-left coordinates of the window's client area in a correctly-aligned screen location prior to playback. Select the nearest x and y screen coordinates for the client area that are evenly divisible by 4. For example, use (12,12) instead of (13,13), and use (20,16) for (19,16) or (20,17).

There are no flags that disable the automatic alignment.


STATUS

This behavior is by design.


MORE INFORMATION

To provide optimal playback across the broad spectrum of video boards and displays supported by Windows, the origin of the video image is aligned along a 32-bit boundary. Client areas not aligned along 32-bit boundaries will cause the playback windows to be repositioned towards the upper-left corner of the screen. Aligning the video image on a four-pixel boundary helps achieve the highest frames per second.

Stretching playback may also slow performance down by 50%. In most cases, you should play the movie in its standard format unless stretching is required. For example, play a 320x240 movie at 320x240.

Additional query words: 3.10 4.00 3.50 alignment avi move vfw pixel pixels

Keywords : kbmm MMVideo
Version : 3.10 4.00 3.50
Platform : WINDOWS
Issue type :


Last Reviewed: March 5, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.