WizardStan
Mega GP Mania
- Joined
- May 24, 2008
- Messages
- 16,731
So let me get this straight: the entire animation is interlaced? So if you only download half of it you would still get the whole animation, just at lower quality?
That is both a benefit and a curse. With a regular animated gif, since you're getting frame by frame, as long as the server can send frames faster than the animation needs them then you get immediate playback at full quality. With this interlace FLIF, you can't get the same "full quality" until the entire animation has finished downloading. That would cause problems for animations that were multiple seconds, and several MB in size. An animation of significant size would be very low quality at the start and then get better and better towards the end as more data is downloaded, else the user would have to wait.
Could you break the animation into a configurable size of blocks? Like, the block has a header "this block contains X frames, it is Y seconds long, and Z bytes in size", and the viewer gets this header and starts downloading the frame, as soon as that frame is done it can start displaying it and request the next block. If the connection is slow, or if it is a low res screen that doesn't need high quality, it can request just Z/n bytes for that block from the server, and then "resume" from +Z to get the next header, and the next size of the block. If each block is a second in length then the client would have to wait at most 1 second (under minimal network conditions) to get the same instant playback and high quality as the gif, and even faster under better network conditions.
The benefit being that, if the network is slow, a gif image will stutter as it loads up the next frame slower than it can be played and there's nothing to be done about that, but a flif file could load partial blocks and stay ahead of the network to keep the animation smooth, and each loop through request more of each block until it is full quality, or the person just closes it because the low quality was good enough.
That is both a benefit and a curse. With a regular animated gif, since you're getting frame by frame, as long as the server can send frames faster than the animation needs them then you get immediate playback at full quality. With this interlace FLIF, you can't get the same "full quality" until the entire animation has finished downloading. That would cause problems for animations that were multiple seconds, and several MB in size. An animation of significant size would be very low quality at the start and then get better and better towards the end as more data is downloaded, else the user would have to wait.
Could you break the animation into a configurable size of blocks? Like, the block has a header "this block contains X frames, it is Y seconds long, and Z bytes in size", and the viewer gets this header and starts downloading the frame, as soon as that frame is done it can start displaying it and request the next block. If the connection is slow, or if it is a low res screen that doesn't need high quality, it can request just Z/n bytes for that block from the server, and then "resume" from +Z to get the next header, and the next size of the block. If each block is a second in length then the client would have to wait at most 1 second (under minimal network conditions) to get the same instant playback and high quality as the gif, and even faster under better network conditions.
The benefit being that, if the network is slow, a gif image will stutter as it loads up the next frame slower than it can be played and there's nothing to be done about that, but a flif file could load partial blocks and stay ahead of the network to keep the animation smooth, and each loop through request more of each block until it is full quality, or the person just closes it because the low quality was good enough.