I'm trying to figure out how to get more accurate seek times (to
milliseconds). I've been using the VideoDisplay and imported Flash's
FLVPlayback component to Flex. For the reference video I'm using, I
get about a 3-4 second accuracy, when the frame rate is at 30fps.

>From my understanding, all video files loaded into Flex/AIR are
considered progressive downloads, and therefore can only seek to
keyframes*.

I've been messing around with a couple ideas:
- skipping to the previous keyframe, play, and pause on exact time
- extending videoplayback/video class to take a "screenshot" of the
frames in between
- dynamically creating cuepoints for the video at 100 ms intervals

It would be great if you guys comment on other suggestions or the
feasiblility of the above solutions.




* Just for reference, this is the javadocs for FLVPlayback.seek():

"Seeks to a given time in the file, specified in seconds, with a
precision of three decimal places (milliseconds).

For several reasons, the playheadTime property might not have the
expected value immediately after you call one of the seek methods or
set playheadTime to cause seeking. First, for a progressive download,
you can seek only to a keyframe, so a seek takes you to the time of
the first keyframe after the specified time. (When streaming, a seek
always goes to the precise specified time even if the source FLV file
doesn't have a keyframe there.) Second, seeking is asynchronous, so if
you call a seek method or set the playheadTime property, playheadTime
does not update immediately. To obtain the time after the seek is
complete, listen for the seek event, which does not start until the
playheadTime property has updated."

Reply via email to