views:

44

answers:

1

I have been searching far and wide for a solution on how to offer slow motion and fast motion options for users that upload video to my webstie. There is an implementation on Google Video that has exactly what I am looking for: the option to speed up or slow down the video and continue to play the audio. The screenshot is below.

I know that Flowplayer has an option to slow down or speed up video when implemented with Wowza server. However, when using that approach, there is no sound.

I have also seen the option from Enounce called MySpeed that allows video to be slowed or quickened, but this requires a browser plugin which is too much of a barrier for our users.

So here's the question: How does Google do it? How can you add an option to a flash player to slow down or speed up video?

Here is a screen shot. You can see the option to change the speed of the video to 1.5x. It also has options to go to 0.5x, 1.25x, 1.5x, 1.75x, 2.0x, 2.5x, and 3.0x.

alt text

+1  A: 

I think it's unlikely that this is possible using only client-side Flash. In theory maybe it would be possible to simulate playback speed of video by doing manual seeking, but that wouldn't provide for audio. Using Flash 10+, it is now possible to manipulate audio data manually, though that doesn't mean it's possible to manipulate in context of a audio/video stream . (Example: http://www.kelvinluck.com/2008/11/first-steps-with-flash-10-audio-programming/)

If the Google Video player you provided a screen shot of was Flash based, then I think it's very likely they were using a media server to handle playback speed changes. (Just FYI, google at one time had multiple video players available, and not all were Flash based.) Recent versions of Flash Media Server supposedly also support playback speed adjustment. (I couldn't find anything authoritative though, and I don't know if handling of audio is included.)

One other thought, just FWIW, HTML5 video includes support for speed adjustment the playbackRate property. Perhaps that will eventually be an option for you.

kaliatech
Thank you for the response, Kaliatech. I checked the Google player and it is indeed flash. I think you right that it's not just client site processing. Do you know how a media server would be able to adjust the playback speed?
Chris
I can think of 2 possibilities. The new NetworkStreams have an inBufferSeek property. Using this causes seeking of the streams to happen with local buffers. Supposedly by enabling that in combination with media server support, you can then quickly step through the stream manually client-side. Seems Adobe refers to this as "trick modes".The 2nd idea is that in theory it's possible to write a custom media server (perhaps using Red5 as a basis) that is able to speed-up/slow-down the source stream. The client wouldn't notice a difference.
kaliatech
Have you seen any other place on the web that has implemented this feature?
Chris
I haven't seen any that were pure flash and switching the playback rate dynamically. I have seen sites that had preset selections like 0.5x, 1x, and 1.5x. Underneath they were switching between multiple media files pre-encoded at the different rates.
kaliatech