I need a flash video player with a Javascript API with a seek function.
And I need to be able to seek in this video by second or, better, by frames and not by keyframes like all flash video player like JW or Flow.
My video are encoding in 10s per keyframes so if I seek at the 8th second, the video will go to the 10th second :/

Thanks :)

Dani AI

Generated

Short answer: what you’re seeing is the normal behaviour of compressed video. Decoders can only begin cleanly at key (I) frames, so most Flash players (JW/Flow included) seek to the nearest keyframe rather than an arbitrary frame or exact second. See Key frame and Group of pictures (GOP) for the background.

Options that actually give you finer-than-keyframe control:

  • Re-encode with a much shorter GOP (more frequent keyframes). This is the simplest fix: set the encoder’s keyframe interval (ffmpeg uses -g <frames>) to the number of frames you want between keyframes. Tradeoff: larger files and higher bandwidth.
  • Precompute/embed a keyframe index (so the player can do accurate byte-range seeks) or use a server that supports pseudo-streaming for your container. That improves second-level accuracy but still cannot decode from a non-keyframe without re-encoding.
  • Produce frame-accurate output on demand: when the user requests frame N, have a server-side process (FFmpeg or similar) re-mux/re-encode a short stream that begins with an I-frame at that frame and serve it. This is CPU-expensive but gives exact frame access.

Practical checklist for (and to tie back to /): VLC can step frames locally but isn’t a Flash-based web solution; Flowplayer/JW have JS APIs for seeking but are still limited by the file’s keyframes. Steps: check your codec/container (FLV vs MP4/H.264), inspect or rebuild keyframe metadata, try re-encoding with a smaller GOP if you can, or add a server-side on-the-fly re-encode if frame accuracy is mandatory. Flash/NetStream seeking behaviour is documented here: NetStream.seek.

If starting a new project, consider modern HTML5 streaming (Media Source Extensions) for more flexible client-side control—still, codec keyframes remain the limiting factor (MSE).

Recommended Answers

All 2 Replies

Have you tried VLC media player? I think that might work. Post again if it doesn't. Sorry it has taken so long for anybody to reply.

Did you try flowplayer ?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.