dcsimg
A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: flvVideo.Seek(x) doesn't work properly. Occasionally jumps video back to 0

  1. #1
    Actionscript idiot Mattgyver's Avatar
    Join Date
    May 2001
    Location
    Charlotte, NC
    Posts
    119

    flvVideo.Seek(x) doesn't work properly. Occasionally jumps video back to 0

    Let's say I have a 30 second video. When I tell the video to seek to, say, 26 seconds like this:

    flvVideo.seek(26);
    trace(flvVideo.time);

    it actually traces to 26.666 seconds, instead of the even 26. Sometimes it even jumps back to the beginning at 0 seconds. That's what I really don't understand. The Flash help file mentions the seconds are 'approximate based on the frame rate,' but that's seems to be a bunch of crap. When I tell a video to advance 26 seconds in, it should advance to exactly 26 seconds. I think the jumping back to 0 is an issue with trying to seek a progressive video to 26.666 seconds instead of an even number. The zero seek-jump thing only happens when seeking a video near the end of it's duration. So a 30 second clip will start having seek-jump-to-0 problems after 22 seconds in or so.

    Any thoughts? I mainly just need to figure out why when trying to send a movie to a certain time, it jumps back to 0.

  2. #2
    -273c absolutezero's Avatar
    Join Date
    Apr 2001
    Location
    fruzzlland
    Posts
    705
    Has anyone got a solution to this? I have exactly the same problem. The seek works fine everytime with in Flash, but online it will only work if you're jumping to below about 20% of the total video length.

  3. #3
    -273c absolutezero's Avatar
    Join Date
    Apr 2001
    Location
    fruzzlland
    Posts
    705
    Please anyone? I've narrowed it down to Firefox. Works fine in IE of all things.

  4. #4
    Senior Member
    Join Date
    Jan 2001
    Location
    London
    Posts
    361
    When you create your FLV set the option 'frames per keyframe' to 1. This will encode a keyframe on every frame of the FLV. When using seek() flash can only move to the nearest keyframe (which may be the beginning of the video, hence the jump back to start)) so it improves seek accuracy to have more keyframes.
    More keyframes however will increase FLV filesize.

  5. #5
    Junior Member
    Join Date
    Nov 2006
    Posts
    1
    I have the same problem. I tried out to set every frame a keyframe but it doesn't work. The thing is, it is only a problem in Firefox, in IE and Safari everything works fine. I guess the reason is a caching difference between the browsers. I think there is no usefull solution. The video can't jump to a point that is currently not loaded. Did anyone get further?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center