Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#4225 closed defect (fixed)

Image frozen when riff index > 256 is reached (AVI_MASTER_INDEX_SIZE). Using Avisynth+

Reported by: miguelapg Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: avi
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Summary of the bug:

NOTE: I try to see what is the best solution. If this issue should be done from ffmpeg team or Avisynth+

Let me explain the issue.

Maximum riff index added by ffmpeg in the avi video container is 256 (AVI_MASTER_INDEX_SIZE), after that point a warning is shown as: "Invalid riff index 257 > 256", later ... "Invalid riff index 258 > 256" and so on ...

This is done at this part of your 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);

}

Well, when I encode using Avisynth+ 64-bit and AVISource command, when encoder (i.e: x264) reaches riff index 257, the image stays frozen from there to the end of video, namely just one image is shown.

Therefore if you are encoding an uncompressed AVI video which is bigger than 256~260 GB (approximately), and the input format is a AVS script (using Avisynth+ and JUST the command: AVISource), at some point of time (when riff index 256 is exceed), the video is damaged certainly.

This problem doesn't happen if I use DirectShowSource instead of AVISource in the Avisynth+ script.

I think that there are two options:

1) Avisynth+ team adds some fix to AVISource to avoid this issue.
2) ffmpeg team allows adding riff indexes bigger than 256 to AVIs.

My questions to ffmpeg team are ...

1) Why are you adding this limit to AVI files?
2) Is it totally necessary?
3) Can you raise or delete this limit?

Kindest regards,
Mapg

How to reproduce:

% ffmpeg -i input ... output
ffmpeg version: any
built on ...

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

Change History (3)

comment:1 by miguelapg, 9 years ago

Type: enhancementdefect

comment:2 by Michael Niedermayer, 9 years ago

Reproduced by developer: set
Resolution: fixed
Status: newclosed

comment:3 by Carl Eugen Hoyos, 8 years ago

Component: undeterminedavformat
Keywords: avi added; image frozen Avisynth removed
Version: unspecifiedgit-master
Note: See TracTickets for help on using tickets.