View Full Version : Avi Error
ClownR
14th October 2006, 17:37
Hey
I have this hdtv avi video file. When I load it, it gives me this error or something, what could be the problem? The video codec is XviD.
Heres the pic.
http://img204.imageshack.us/img204/7628/avihdtverrorom6.png
stegre
15th October 2006, 00:27
That dialog is put up there by gabest's AVI splitter when it encounters an AVI file where the audio and video are interleaved at a significantly mismatched rate. I'll post again with some screenshots explaining this in more detail later, as it's kind of interesting - I actually posted about this subject (http://forum.doom9.org/showthread.php?t=40894) over three years ago when I noticed NanDub was exhibiting this bug, and by the end of the thread (http://forum.doom9.org/showthread.php?p=243307#post243307) the VDubMod authors had made the related fixes to the latter program, which had apparently inherited the bug as well at that time.
As I'll explain later, it actually bothered me enough at the time that I created a field in GSpot 2.21 (not included in recent versions though) that displayed the A/V interleave in terms of the "ratio of the two rates" (audio vs. video) which should be 1.00. What NanDub was doing at the time was cranking out the video much faster than the audio, and then making up for the whole "mistake" at the very end of the file by having like 176,000 audio frames in a row with no video (those particular values are from and example I was discussing in that thread).
Anyway, for whatever reason, this makes gabest's AVI splitter very unhappy. It displays that dialog, and when you close it he apparently "exits" his own code and swaps back in the default Microsoft AVI splitter instead.
You could just change your setup to not use the gabest splitter, but the "real" solution is easy too - jus "re-mux" your file with a recent AVIMuxGui or any recent version of VdubMod, using "Direct Stream Copy". It's a fast and "lossless" operation since there's no re-encoding involved.
ClownR
19th October 2006, 21:17
thank you very much. I was trying to watch this movie on xbmc and i thought it was incomplete but i guess it isnt :) thanks
stegre
20th October 2006, 15:38
I've been meaning to get back to this, but just real quickly: note the more typical screenshot from that splitter below:
http://www.headbands.com/gspot/v26x/images/il33.png
When reading this file, he's showing that the video (stream 0) "comes off" the file 3 times faster than the audio (stream 1). That doesn't necessarily mean that the file would play out of sync, as a lot of people might think, but it means the demuxer has to keep jumping around the file to "get" the correct audio that "goes with" corresponding video And the further you get into the file the further and further they are apart.
For this file, eventually the video "runs out", somewhere in the middle of the file (although it's complete - all of it is there). Then the entire rest of the file is audio only, to make up for the time it was "falling behind" - and eventually all the audio is there, too. In fact, if his graph were "complete", the red line would eventually flatten out (become horizontal) and the blue line would then become steeper and eventually meet it in the upper right hand corner, and the file would be over. But I think he just shows a sample of the beginning of the file.
When they invented AVI, the idea was that any audio data should be physically located relatively close to the related video in the file structure (i.e. "interleaved" - the "I" in AVI"). For one thing, as gabest mentions on his dialog, it keeps your drive's "read head" from having to constantly jump back forth to play the movie. If the movie is being played off an older, slower CD ROM drive, that may be a real problem - it may not even be possible to play the movie correctly at all.
Your graph is less clear, but what I think gabest is showing in your case is the most extreme case of all: all the audio is completely at the beginning, and all the video "appended" at the end, (indeed, it's not "interleaved" at all). But that still doesn't necessarily mean your there's more audio than video in your file or vice versa. If you've got the same amount of each, than your file is still complete, and can easily be fixed up to be a lot nicer & more normal. When you remux it will be laid out in a much saner fashion, perhaps like 1/2 sec audio, then 1/2 sec video, then 1/2 sec audio, then 1/2 sec video, etc, all the way to the end.
Cyberace
23rd October 2006, 08:16
http://www.xboxmediacenter.com/wiki/index.php?title=Appendix_B:_Troubleshooting#I_got_one_or_several_AVI_files_that_plays_choppy_and.2For_ends_in_the_middle_of_playback.2C_what_could_be_the_cause.3F
http://www.xboxmediacenter.com/wiki/index.php?title=Appendix_B:_Troubleshooting#I_got_one_or_several_AVI_files_that_plays_with_the_audio_and_video_out-of-sync.2C_what_could_be_the_cause.3F
GodofaGap
23rd October 2006, 11:27
`Additional information: AVI stands for "Audio Video Interleaved" which means the audio and video files are mixted into the AVI file, (like 32Kb video, then 32Kb audio, then 32Kb video, then 32Kb audio, and so on).
I would like to point out that this explanation is inaccurate. Video and audio should not be interleaved with fixed chunks of size (this is not even allowed for video, as each chunk must contain a complete video frame and compressed video is almsot always VBR), but that video and audio should be interleaved according to time (e.g. 0.5 sec of video, 0.5 sec of audio) so audio and video that should be played together are close to eachother in the file.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.