Broken AVI Files

Status
Not open for further replies.

Biggie578

In Runtime
Messages
267
A failed windows install made a partition with my data inacessable, but now i can access it using a program called GetDataBack. When i copy video files from the "bad" partition and try to play them in VLC It says that the AVI file is broken and that seeking wont work. I let it repair and after a few seconds my video plays and i can seek, however i have to repair the video file each time i want to watch it. The videos work in mplayer as well, but I cant seek. Is there a way to premenantly "repair" the files. Also, all of the video files that i can see on my damaged drive are .AVI and they could have been mpg before and they were all changed? or mabey they are all .AVI and the mpgs are in another folder, either way the playback should not be affected?
 

horndude

Fully Optimized
Messages
2,539
use mplayer to generate an idx file(index file), then use mencoder to redo the avi mux, it should restore the timing bits, another option would be using avidemux or virtualdubmod, they will do it too

some players will have issues with wrong file extension and playing a file, mplayer wont
 

horndude

Fully Optimized
Messages
2,539
http://www.mplayerhq.hu/DOCS/HTML-single/en/MPlayer.html

thats the documentation

try this:
mplayer <filename> -forceidx -saveidx <idx_filename>

that will play an unindexed or screwed up synch avi file, if you want to do it faster than realtime add -vo null (I think), or whatver switch turns the video and audio output to stdout off

to fix it permanently do this:
use mplayer to get the idx file then:
mencoder <filename> -loadidx <idx_filename> -o new_avifilename>

if it gives you grief over not selecting codecs and stuff do this:
mencoder <filename> -loadidx <idx_filename> -o <new_avi_filename> -oac copy -ovc copy

all one line

all the above is done from the commandline

if you want a GUI, use avidemux or virtualdubmod
 

Biggie578

In Runtime
Messages
267
the file names dont go in the little brakets right? I tried to create the idx and i dont know it it was created, or where it was saved
 

horndude

Fully Optimized
Messages
2,539
yes the filenames go where the brackets are, just no brackets, and it will be saved wherever the active directory your working in is unless you specify elsewhere

basic commandline skills

cd into wherever you have mplayer.exe and mencoder.exe located, like your Desktop for example, put the file your working on in the same place, makes it easier

then type mplayer <tab key> and it should autocomplete the rest.........the filenames will be the same way, autocomplete does work in commandline too :D

example:
mencoder.exe boondock_saints.avi -loadidx boondock_saints.idx -o boondock_fixed.avi -oac copy -ovc copy
 

Biggie578

In Runtime
Messages
267
horndude, Just to be clear, im on windows and I was doing the stuff from the command prompt thing. Ill try that prog, I was looking for that sort of thing to be posted. Ill let u know how it goes, thanks
 
Status
Not open for further replies.
Top