mpeg4modifier of itself was a good idea while it lasted. I saw a packed bitstream xvid in .AVI and thought "that'll be OK" but it turned out to be a little odd. Unpacked with mpeg4modifier and repacked with it, and still had problems with it.
The only reliable way I found to get around it was via a combination of mpeg4modifier and the latest ffmpeg -
(1) unpack it with mpeg4modifier
(2) convert to a lossless ffv1 .AVI (ffmpeg handles xvid's b-frames in AVI OK by the looks, from non-packed-bitstream AVIs)
(3) then process the ffv1 AVI with avisynth.
Command lines :-
Code:
"C:\SOFTWARE\MPEG4Modifier\mmcl.exe" --unpack --always-write "input.avi" "input-unpacked.avi"
"C:\SOFTWARE\ffmpeg\ffmpeg.exe" -y -i "input-unpacked.avi" -f avi -vcodec ffv1 -acodec copy "input-ffv1.avi"