Beltxo, on Feb 10 2005, 10:44 AM, said:
...snip...
Can this be fixed? or is this a VLC issue?
I had to do some research (via Google
) about the AVI format to get my facts straight, and after reading this
excellent article on "AVI files and common problems" by Avery Lee (the programmer of
VirtualDub), and considering how the partfile plugin works, I can say that this is not exactly a VLC issue and it has more to do with the AVI container format in general, due to how file information, audio and video data are laid out within it. Let me elaborate:
Suppose you are downloading a 100MB video file, and you have completed 20MB of it spread in chunks throughout the .part file; the rest is missing. When you preview this part file, the plugin fools VLC into thinking that it is opening a 20MB video file
, and starts feeding it data by combining the available blocks in the part file one after the other, skipping over the gaps (it doesn't know nor care what the file's format is). However, in the case of AVI files, VLC doesn't get fooled at all because reading the AVI header reveals at once that the file is actually 100MB!!
And having learned the real file size, VLC then starts asking for data from places in the file it shouldn't have even known existed, which throws errors since the plugin cannot jump to the 99th megabyte of its 20MB virtual gapless stream.
So VLC gives up on trying to read from those parts, and starts decoding the audio/video from the beginning of the file onwards, and the plugin starts doing its job feeding back the gapless data stream. But, in the confusion, you have lost the AVI index, and with the index also the ability to seek easily within the movie
Then there are the chunks of data near the gap boundaries that get merged with entirely different chunks... The AVI demux module in VLC sure has a hard time trying to make sense of all of this mess
It may be possible to make the plugin a bit more "format aware", but that would involve parsing the AVI files, checking headers and generating indexes on the fly, turning the plugin into some sort of an AVI fix utility. It is many times simpler to just pass the data along and let the player sort it out.
Nevertheless, I'll give it some more thought
Bye for now...
PS to moderators: Thanks for making the thread a "Sticky"