[FFmpeg-devel] Frame CRC muxer
bjorn at shimmeo.com
Tue Sep 26 18:17:00 EEST 2017
On Mon, Sep 25, 2017 at 4:03 PM, Carl Eugen Hoyos <ceffmpeg at gmail.com>
> 2017-09-25 20:49 GMT+02:00 Bjorn Roche <bjorn at xowave.com>:
> > In the meantime, I've attached the patch if anyone wants to look at it.
> Can you explain why you had to patch the gif encoder?
> I thought it is able to encode transparency, no?
Sure, and thanks for taking a look at it!
Unfortunately, while the gif encoder does support transparency, it only
works correctly for a single frame. After that, it produces incorrect
results because the pixels from the previous frame "show through"
transparent pixels instead of being replaced.
This is because the encoder preserves transparency from the incoming frame
to the saved image, which works fine in some cases, such as in the first
(or only) frame or if the disposal method supports it, but the disposal
method the muxer was using did not support it.
The solution I came up with was to have the codec signal the muxer using
the side data about which disposal method it should use. That way, it can
use the best optimization for the situation, but still support transparency.
An alternative would be to move the code that writes the disposal method
from the muxer to the codec, which, IMO is where it belongs, but when I
started to do that it looked like many changes were required to make that
More information about the ffmpeg-devel