View Sidebar
Playing FLV Video Reverse

Playing FLV Video Reverse

November 5, 2010 14:07

As you have reached this post means you have worked enough on the FLV file formats that now you want them to play in reverse. So I am not going to give details of the format. But the question remains can FLV be played in reverse. No they can’t. Think again and there is a way to do it.

Me too was searching for this all over the forums, blog and was finding a way to crack it. Used image sequence for one of my project as I didn’t found a solution but then hitting on them for few more days got the trick. The hack is in how data is organized in the video, more the same way it’s done in GIF file format.

In FLV video the first frame has all pixel data, and the next frame has only the data of the pixels that changed when compared to the first frame or previous frame. This allows for high data compression in the file. So when you try to play them in reverse the pixel data info is not available and the video jerks.

There are different algorithms for video frames are called picture types or frame types. The three major picture types used in the different video algorithms are I, P and B. They are different in the following characteristics:

I‑frames are the least compressible but don’t require other video frames to decode.

P‑frames can use data from previous frames to decompress and are more compressible than I‑frames.

B‑frames can use both previous and forward frames for data reference to get the highest amount of data compression.

So the solution is if I-frames algorithms are used for video frames then it can be easily played in reverse. But this will increase the file size. So instead of this get a normal FLV and embed it in SWF as a movieclip and then you can play the timeline in reverse to play the video in reverse. I will post an example soon.

If you like the article please share

Comments are closed