Re: [whatwg] VIDEO and pitchAdjustment

On Thu, Aug 27, 2015 at 12:02 PM, Garrett Smith <>

> Negative playbackRate, to watch videos backwards, currently crashes
> Safari 8; Firefox 40 says "not implemented". I think it would be
> entertaining for example, to watch things like cars uncrashing. Should
> this work? And if so, shouldn't audio match the video speed for
> backwards playing? I think "yes, and yes."

It would be much easier to re-encode the videos in reverse and provide two
versions of the video. Videos are made to be played in one direction, and
they use this assumption to improve their compression efficiency.
Basically, videos have two different types of frames; let's call them Full
frames and Partial frames. A Full frame contains all of the information
that a stand-alone image would have. If a video had only a single Full
frame, it would be able to display that image and show it for the length of
the video (incidentally, this is what a WebP image is). Partial frames, on
the other hand, do NOT have enough information to produce a full image.
They merely contain the information representing the difference between the
previous frame and the current frame. This obviously saves a lot of space
if the frames are similar. A video will contain a mixture of Full frames
and Partial frames, with many more Partial frames than Full frames (ex. 1
Full frame followed by 10 seconds of Partial frames (~240 partial frames)).
What this means is that when you play a video in the proper direction, it
must first decode a Full frame, but then it only has to decode Partial
frames (until the next Full frame). However, if you try to play a video in
reverse, it must decode a Full frame and ALL of the Partial frames up to
the current frame before it can display the current frame. To display the
frame before that, it must decode all of those frames again, and so on for
every frame of the video. You could of course store the decoded frames in
memory, but that will take a lot of space. 240 uncompressed frames at 720p
is over half a gigabyte of information. It's just not practical.

Received on Thursday, 27 August 2015 20:31:11 UTC