Question

First of all: this is my first question here and I am not a skilled Flash Developer.

I have a movie with FLVPLAYBACK component (Player). I set an external source (Player.source = "http://example.com/movie.mp4) and fully buffer it (using Player.addEventListener(VideoProgressEvent.PROGRESS, bufferVideo)). The movie plays fine. The problem is: I need to able to seek to specified time even few hounded times a second. I have a loop which checkes for certain conditions and starts Seek method (Player.seek(TIME)). It works, but there is visible lag between the seeks. Is is possible to .Seek() instantly? I had something like this working in HTML5, but I wasn't able to achieve proper buffering of movies on all browsers.

I don't want to share full code, because it has lots of unrelated parts between parts of this problem.

Update I've tried FLV (somehow seems that the seek is even slower) and F4V (seems faster, but still there is visible lag)/

Was it helpful?

Solution

  1. make sure you have a good connection
  2. video should be compressed for streaming (makes a huge difference)
  3. play with your bufferTime parameter to get an ideal setting
  4. crate a player with code and dont use the UI component. Youll have more flexibility: http://blog.martinlegris.com/2008/06/03/tutorial-playing-flv-video-in-plain-as3-part-1/

caveat, longer buffer will allow smoother playback, shorter will seek faster but the tradeoff is it will hit the buffer more often... not ideal

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top