Page 1 of 1

VLC 1.0.2, wrongly reports broken AVI index

Posted: 26 Sep 2009 21:21
by MSJ
AVI file plays perfectly and no problem is reported by other programs like VDUB and GSPOT.

Investigating the problem, it seems that VLC bases its "broken index" check on comparing the video header length and the index-length. Because the first calculation is more unprecise that the second it causes "the broken index" message - a bit misleading - the index is fine.

example:

video 1 (orginal)
--------------------
total frames = 41958
microsecperframe = 33367
length = 1400012586 uS, or 1400,012586 s

stream-index:
total frames = 41958
rate = 30000dec
scale = 000003E9H ()
length = 41958*1000000 * 3E9 / 30000 = 1399998600
in seconds 1399,998600

truncated 1400 in the first case and 1399 in the second case. , VLC player therefore wrongly reports "broken index"

video 2 (last video frame editted out)
---------------------------------------------
hdr:
total frames = 41957
microsecperframe = 33367
length = 1399979219 uS, or 1399,979219 s

stream-index:
total frames = 41957
rate = 30000dec
scale = 000003E9H ()
length = 41957*1000000 * 3E9 / 30000 = 1399965233,3333333333333333333333
in seconds 1399,9652333333333333333333333333

truncated 1399 in both cases

Now VLC accepts the video and its index.

A proper index-check should check whether the index matches the actual frames.

/MSJ

Re: VLC 1.0.2, wrongly reports broken AVI index

Posted: 27 Sep 2009 17:45
by Jean-Baptiste Kempf
Interesting analysis.

Re: VLC 1.0.2, wrongly reports broken AVI index

Posted: 29 Sep 2009 21:48
by fenrir
Thanks for the analysis, it has been fixed by [a2671feb378ec308e42a0e50ce9bfc41262baf9c] in master.

Re: VLC 1.0.2, wrongly reports broken AVI index

Posted: 04 Oct 2009 07:49
by MSJ
great, thanks

:D