As you can see here, there is such limit in ffmpeg (libavformat/avienc.c) ...
Code:
if (avi->riff_id > AVI_MASTER_INDEX_SIZE) {
av_log(s, AV_LOG_ERROR, "Invalid riff index %d > %d\n", avi->riff_id, AVI_MASTER_INDEX_SIZE);
return AVERROR(EINVAL);
}
Yes, it's certainly weird as none of the most professional video editing software packages add this unfortunate feature.
I will try to forward this issue to ffmpeg team, but I think that AviSynth+ should have a look at this too.