[FFmpeg-trac] #4225(undetermined:new): Image frozen when riff index > 256 is reached (AVI_MASTER_INDEX_SIZE). Using Avisynth+

FFmpeg trac at avcodec.org
Sun Jan 4 21:15:04 CET 2015


#4225: Image frozen when riff index > 256 is reached (AVI_MASTER_INDEX_SIZE).
Using Avisynth+
-------------------------------------+-------------------------------------
             Reporter:  miguelapg    |                     Type:
               Status:  new          |  enhancement
            Component:               |                 Priority:  normal
  undetermined                       |                  Version:
             Keywords:  image        |  unspecified
  frozen Avisynth                    |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 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.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/4225>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list