PRB: Video Window Moves During Playback

Last reviewed: November 28, 1995
Article ID: Q139977
The information in this article applies to:
  • Microsoft Video for Windows Development Kit version 1.1
  • Microsoft Windows Software Development Kit (SDK) version 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 reference words: 3.10 4.00 3.50 alignment avi move vfw pixel
pixels
KBCategory: kbmm kbprg kbprb
KBSubcategory: MMVideo


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 28, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.