Posted by Prairiedog in SWF Studio V3 on Mar 19 2008, 11:24 am

I have written a general-purpose wmv video player, using ssCore.WMVideo (setVersion "9"), as part of a larger program. It works fine, except that on issuing the Pause command, it insists on re-sizing the video back to its native size (videos [whatever their dimensions] are normally scaled by my program to fit a fixed size area [whilst exactly retaining their aspect ratio]). On issuing the Resume command, the videos re-gain their correct scaled dimensions. Occasionally, a video does not change size on Pause, but jumps to native size, and immediately back to scaled dimensions, *both* on issuing Resume.

This behaviour is exhibited on machines having Windows Media Player 11 installed. It does not happen on machines that have Media Player 10, *but* my program has an alternative mode where the video is scaled to fill most of the window, and the problem manifests itself in this mode with Media Player 11 *and* 10 (except that, with 10, the scaled dimensions are not regained on Resume). With machines having Media Player 9, behaviour is different again - when playing at the regular size, videos jump to native size, and immediately back to scaled dimensions, on Pause *and* Resume (which is not as bad, but still not really acceptable).

Identical behaviour to my program is exhibited in all these circumstances by your wmvideo.fla test program, which I downloaded from SWF Studio V3 forum thread "WMVideo unable to detect and use version "9" (11) " ( http://www.northcode.com/forums/showthread.php?t=7782).

I have tried re-sizing the video again, immediately before calling the Pause command, and immediately after calling the Pause command, and both; and three different ways: synchronously, asynchronously (each command called without synchronisation or callback), and asynchronously (each command initiating the next on callback, i.e. re-size calls pause calls second re-size), all to no avail.

I have searched through all the Support forums, and have not found this issue described by anyone else. Do you have any suggestions as to how to force Media Player to retain the scaled dimensions on Pause?

I am using Windows XP SP2; Flash CS3; Actionscript 2.0; I have tried using SWF Studio V3.4 Build 222, and V3.5 Build 314.


Posted by northcode in SWF Studio V3 on Mar 20 2008, 10:35 am

This was an issue with WMP10 and up but SWF Studio should be taking care of that automatically. Can you post a sample video somewhere for us to play with in case this is somehow related to the codec you're using.


Posted by Prairiedog in SWF Studio V3 on Mar 25 2008, 06:35 am

All the pieces I am using for testing have been encoded with the Windows Media Video 9 codec. An example can be found here:
http://examples.dva.co.uk/Northcode/VideoExample.wmv


Posted by Prairiedog in SWF Studio V3 on Mar 31 2008, 09:50 am

I posted a piece of video for you to check out on 25 March. My post has not been displayed, and I wonder if it got dumped because there was a link in it. If you just haven't got to it because you're busy, that's perfectly fine of course, but if it has been missed, I will post the link again.
Thanks for your help.


Posted by mbd in SWF Studio V3 on Mar 31 2008, 10:49 am

Not sure what happened there. Your post was moderated because you are a new(ish) forum user posting a link. After posting there should have been a screen that described that. However, your post shouldn't have been left unmoderated for so long. I don't remember seeing the post and neither does Tim, but it's marked as being posted on the 25th - sorry about that.

We'll have a look at the sample video and post again.


Posted by Prairiedog in SWF Studio V3 on Apr 22 2008, 09:08 am

Have you had a chance to look at this one? It's three weeks since your last comment....


Posted by northcode in SWF Studio V3 on Apr 22 2008, 10:22 am

I can see the video being resized for a split second but then SWF Studio forces it back to the size it was set to.


Posted by Prairiedog in SWF Studio V3 on Apr 22 2008, 10:32 am

It's not reliable. Sometimes it manages to re-size automatically (where you see a split-second blip, as you described); other times it doesn't re-size at all (i.e. no problem), but most of the time (70-80%), it re-sizes to its native size on pause, and then returns to the size I scaled it to on resuming play.


Posted by Prairiedog in SWF Studio V3 on Aug 11 2008, 06:17 am

Having had no further response from you on this, I have come back to this program and completely re-written my re-sizing/scaling code to use 'ssCore.WMVideo.setGuides' instead of 'ssCore.WMVideo.setPosition' and 'ssCore.WMVideo.setSize'.

I am disappointed to note that the problem of re-sizing to native size on pause (and returning to scaled size on resume) persists!

I have, however, been able to determine that the problem is exhibited only with videos that have an aspect ratio of 16:9, with dimensions encoded exactly to that aspect ratio. I have added another example for your perusal, at http://examples.dva.co.uk/Northcode/VideoExample2.wmv. This one is smaller than my scaled size, whereas the original example I posted (which is still there, see earlier post) is larger than my scaled size.

Videos which apparently have the 'wide-screen' flag set, do not display the problem at all. I have an example whose actual dimensions are 720x576, but playback appears in 'widescreen' format in Windows Media Player, with its aspect ratio listed in Properties as '5:4 actual, 1.82:1 displayed' which works perfectly.

Any ideas as to why these two encoding styles might behave differently?

Are there any plans to expose more of the metadata contained within the wmv file, such as the presence of the 'widescreen' flag, in the 'MVideo.setNotify.onStart' event?

Thanks for your help and continuing hard work.