A fix for to make the DivFix Perl script work on OS X
Sep 09, '05 07:48:00AM • Contributed by: Anonymous
Sep 09, '05 07:48:00AM • Contributed by: Anonymous
I am a big fan of DivFix for Windows, a program which fixes AVI headers for partially downloaded or damaged DIVX AVI files. Unfortunately, I could not for the life of me find a similar program for OS X. Then I found out that DivFix offered (on their download page) a perl script to do the same thing.
Great. So now I could run it from the Terminal using the perl command. Unfortunately, the script didn't work. Now, I don't know much about perl or scripts, but I did some minor Internet research and used perl -d debugging, and figured something out.
It appears that changing all the instances of the commands pack "i"... and unpack "i"... in the DivFix perl script to pack "V"... or unpack "V" fixed the problem (note uppercase "V"). So that's a quick fix to make DivFix work from the Terminal. This will also fix the avistrip perl script also included with DivFix.
For example, in line 12 of the DivFix script:
[robg adds: I found the two perl scripts in the DivFix for Linux download on the above-linked page; they're both in a folder called "Perl version" within the DivFix folder. I have not tested this hint, however.]
Great. So now I could run it from the Terminal using the perl command. Unfortunately, the script didn't work. Now, I don't know much about perl or scripts, but I did some minor Internet research and used perl -d debugging, and figured something out.
It appears that changing all the instances of the commands pack "i"... and unpack "i"... in the DivFix perl script to pack "V"... or unpack "V" fixed the problem (note uppercase "V"). So that's a quick fix to make DivFix work from the Terminal. This will also fix the avistrip perl script also included with DivFix.
For example, in line 12 of the DivFix script:
print $fh pack "i",$i;
becomes
print $fh pack "V",$i;
The other changes are on lines 20 and 121.
[robg adds: I found the two perl scripts in the DivFix for Linux download on the above-linked page; they're both in a folder called "Perl version" within the DivFix folder. I have not tested this hint, however.]
•
[7,656 views]
