add interlayer optimization to ffmpeg