Mathematica's Import
command is purportedly able to import .AVI files. However, I find that many files that I want to import do only result in MMA showing a blank frame or another placeholder. All or some of my video-players are able to show these AVI files.
This is an example where it works as advertised:
Import["http://er.jsc.nasa.gov/seh/jfkrice.avi", {"ImageList", 2}]
However,
Import["http://people.sc.fsu.edu/~jburkardt/data/avi/ccvt_box.avi", {"ImageList", 2}]
doesn't work (VLC does). I get an empty white frame.
More examples:
Import["http://people.sc.fsu.edu/~jburkardt/data/avi/sine_wave.avi", {"ImageList", 2}]
(works on VLC and mediaplayer classic)
Import["http://people.sc.fsu.edu/~jburkardt/data/avi/star_collapse.avi", {"ImageList", 2}]
BIG-126 MB!!
Should have looked like this:
and works on Windows Media Player, VLC and mediaplayer classic, but I get a white box in MMA.
This is on windows 7-64/MMA8.04. I have the k-lite codecs pack installed.
UPDATE
Responding to Thomas' comment below I found most of the sample files I linked to in my original post gone. I tried to gather a new set and found some that worked and some that don't:
Importable:
Import[#, "VideoEncoding"] & /@
{"http://er.jsc.nasa.gov/seh/jfkrice.avi",
"http://redmine.yorba.org/attachments/615/MVI_0572.AVI",
"http://www-eng-x.llnl.gov/documents/a_video.avi",
"http://redmine.yorba.org/attachments/628/MVI_4981.AVI",
"http://www.csoft.co.uk/video/original/earth.avi",
"http://www.mysticfractal.com/video/fp.avi",
"http://www.softage.ru/files/video-codec/uncompressed/suzie.avi",
"http://archive.org/download/Architects_of_Tomorrow/2007-12-10-02-39-00.avi"}
{"msvc", "MJPG", "msvc", "MJPG", "msvc", "msvc", "YUV", "Uncompressed"}
Don't import:
Import[#, "VideoEncoding"] & /@
{"https://code.ros.org/trac/opencv/export/7213/trunk/opencv/samples/cpp/tutorial_code/HighGUI/video-input-psnr-ssim/video/Megamind.avi",
"http://samples.mplayerhq.hu/avi/verona60avi56k.avi",
"http://samples.mplayerhq.hu/avi/filedoesitbetter.avi",
"http://www.infognition.com/ScreenPressor/browsing-divx.avi"
}
{"XVID", "MP42", "MJPG", "DX50"}
.avi
extension are not really AVI files. I'm don't think that mma utilizes the codecs in your system, whereas VLC does. As such, mma can only import videos that are truthful to the AVI specs (if there are any) $\endgroup$