Hello everyone! I am having a problem exporting a composition that features quickly changing .PNG backgrounds in some parts (they all have a set duration, like 3 frames each, and I am working in 12 fps). It renders perfectly in .AVI, but when I try to turn it into an .MP4 using h264 and a Youtube 1080p preset it gets all messed up, like the codec tries to insert some weird transitions between the changing frames altering their luminosity all the time which also affects the layers above them.
I've tried messing with a few of the settings, including keyframe distance and time interpolation, but to no avail. Does anyone have any idea as to what might be the cause? Thanks for reading, and have a nice day!
Nothing you can do, basically. It's just how MPEG video works. A standard GOP has 12 frames and within those 12 frames changes can only be accomodated by the blocks moving and changing. As a result, anything shorter than those 12 frames may expose drastic artifacts. You m ay improve the result by compressing your AVIs so a better analysis may distribute the blocks better and of course you can mess with the advanced MPEG settings for GOP spacing, block sizes and so on (at the cost of producing an out-of-spec-file that may not run everywhere), but more or less the fault is with your design. Unless you change it, things will never truly get better.
Mylenium said it all. Let me clarify things a bit. H.264 and almost all other MPEG compression uses Inter Frame Compression. There is a real frame, called an I-frame that is color compressed in blocks of 4 pixels at the best quality setting, which degrades the color, and the luminance values are also compressed but the rounding of luminance values is a little more accurate. Then there is a P-frame which looks at the last and the next I frame and predicts where the pixels are going to move and that guess predicts the movement of the pixels over at best 1/3 of the distance. Then there are the B frames which bidirectionally predict where the pixels move by looking in both directions. If you have a cut in between the P and B frames you get a blended frame. There is nothing you can do about it except time your edits so they all fall on I-frames. Most of the time the blended frame is unnoticeable unless you step through the shot one frame at a time. The same thing goes for frame size. Make a comp an odd number of pixels high or wide and the color and resolution will either get fouled up or you will have a row of black pixels or s movie that is cropped by one pixel.