开发者

playing slow motion, fast forward , rewind in a video player in flash video player

We want to build a flash video player to play FLV videos. In addition to basic video controls, client also wants below features for that video player

  1. Slow Motion
  2. Fast Forward
  3. Rewind

We are using ffmpeg to convert videos (from a PHP script) to flv videos. From this video flash player has to perform these ope开发者_开发百科rations. We were told that it is not possible to do these features in flv and we need to convert this flv to swf for developing these features. If that is the case, we have to do one more conversion which is from flv to swf and I think the conversion process is going to be very long.

Is there any way to achieve these features in flash action script without converting flv videos to swf?


Fast Forward and Rewind are easy enough to do, though not in the conventional sense.

Both involve timers wherein you simply seek to a previous or future point on an interval. This is not playing the video at increased speed forward and backwards.

As for slow motion... you are in a much tighter fix there. There are 2 (theoretical) ways I know of to achieve slow motion in a flash video player. As you will see, neither of these are desirable solutions. (I have coded 3x full featured flash players + recorders and dealt with this very same rabbit hole):

1) You do not play via rtmp steaming but rather http progressive download. Once you have loaded the data into flash for the video you run it through an algorithm that either removes or duplicates p-frames. Thus increasing or decreasing video time. Audio syncing would be a nightmare even if you pull this off.

2) You encode a second video at whatever speed they wish for "slow motion" to be. You load the two videos simultaneously, and swap between them at appropriate times when the button is pressed/released.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜