This content has been marked as final. Show 5 replies
I don't have a good solution for you, but I can commisurate. I have
never had good luck working with wmv files. I don't know if it is a
problem with the format, or with Director's handling of the format, but
I always have wierd problems when I try. I haven't tried in years now.
Convert them to mpeg and things often work better. Or better yet,
You can try using a different xtra to control the wmv files. Tabuleiro
has an excellent "Mpeg Advance Xtra" that I believe will play wmv files.
It has the ability to set cuepoints inside of Director that should
provide you with frame-perfect seeking. It is not free, but it is really
worth the expense. I think they have a free trial that you can use to
test if it works for you.
We’ve actually been using MPEG Advance for years. I initially tried using the xtra and the seek accuracy was bad, I switched to Director’s own internal WMV support and it was no better. I wrote to Mauricio at Tabuleiro and his advice was the same as yours, “stay away from WMV.” He even mentioned that he pulled his own streaming media product out of production because the WMV format was too flaky to be relied upon*.
This experience leaves me wondering what format is best for high bandwidth applications. MPG 1 works just about everywhere and allows odd-ball frame sizes, but I have a hard time selling customers on the video quality after they’ve seen the original on DVD. MPG 2 looks great (lol, just like the DVD ;-) but is very restrictive on frame size (OK, probably a unique problem for this project) but the files are huge and MPG 2 codecs are wide spread but not universal. MPG 4 looks nice and it’s small, but is it too new? WMV is small, good looking, and well supported on Windows, but as you can see, flakey. We ruled out QT long ago because 99.999999999% of our audience is corporate Windows users and we don’t want to force a download just to use our products (many of them must get permission from IT admins to install anything on their desktops). DV-AVI can look good depending on the underlying compressor but the files are huge. FLV is real cool when streaming from the web but is lacking in quality when compared to what’s achievable on burned media. My vote for this project would be MPG 4 but I’m getting shouted down that it’s too new and chancy for this client.
*For anyone that is considering WMV: We have not had a problem with WMV in the past using MPG Advance Xtra. The active X control slider bar works poorly but it’s easy to make a custom slider that works well and looks better. We’ve masked the video in MIAW’s, dynamically allowed the video sprite to be stretched to full screen, and performed various other manipulations all without a problem (except DTS which never works anyway). This is the first time we’ve needed accurate time seeking and at least for us, this has been a weakness.
PS: Just found out from the video house that the keyframe spacing was a whopping 5 seconds (150 frames) so that could be part of our problem. The final decision (not mine) was to cut the video into discrete segments that can be played back to back. Hopefully I’ll get a chance to test my keyframe theory at a later time.
Well, we reversed direction and decided to re-encode the video with a much lower keyframe interval and that fixed it. Lowering the keyframe interval from 5 seconds to 1 second (the lowest option available in Cleaner) gave us the accuracy we needed to effectively target the middle of a 1 second transition without picking up video or audio from either end. The cost was a 14% increase in file size. So, the take home message: time seek accuracy is effected by the number of keyframes and while some machines can effectively target intermediate frames without displaying video artifacts, most will not.
I have a similar situation with a long WMV file to be broken up into "chapters." My solution was to break the segments into individual files but I still need to play the entire video.
Is there a way to play video files in sequence in Director? I havge tried several ways but nothing has worked so far.
Sure, here’s a very simple method that should work but could easily be improved upon:
Place your WMVs into score channel 1, one after another in the proper order. The length of the sprite isn’t all that important; I like to use 3 frames.
Paste the following script into your cast, make sure the script type = behavior in the property inspector.
Place a copy of this script in the frame script channel at the end of each video sprite.
That should do it, some quick notes:
I like using a time comparison in the conditional vs. mediaStatus because mediaStatus could have a number of values where you’d still want to loop in the frame, for example, #playing, #pause, #buffering etc…
I subtract 200 from the video duration because WMVs are notorious for reporting incorrect durations. One would assume that sprite(1).currentTime = sprite(1).member.duration would be a good test of when to move to the next frame, however, we’ve found in many cases duration will be over reported and currentTime never reaches duration, so you end up in the hold loop forever. 200 is just an arbitrary number (about 6 frames @ 30fps) to protect you from sloppy reporting of the actual duration.