Log in

View Full Version : VirtualDub Crash with XviD (using xvid_encraw)


buzzqw
22nd July 2007, 11:31
using this source file http://www.64k.it/andres/data/a/xvid_crash.mpg (21mb)

with these command line

"C:\Programmi\PureBasic402\AutoMKV\exe\encoder\xvid_encraw.exe" -pass1 -progress -bitrate 975 -turbo -threads 0 -max_bframes 2 -imax 16 -notrellis -quality 6 -vhqmode 1 -pmax 16 -bmax 16 -bquant_ratio 162 -nopacked -nochromame -noclosed_gop -i "C:\Programmi\PureBasic402\AutoMKV\test\temp\movie.avs" -type 2 -avi "C:\Programmi\PureBasic402\AutoMKV\test\temp\movie.avi"
"C:\Programmi\PureBasic402\AutoMKV\exe\encoder\xvid_encraw.exe" -pass2 -progress -bitrate 975 -threads 0 -max_bframes 2 -imax 16 -notrellis -quality 6 -vhqmode 1 -pmax 16 -bmax 16 -bquant_ratio 162 -nopacked -nochromame -noclosed_gop -i "C:\Programmi\PureBasic402\AutoMKV\test\temp\movie.avs" -type 2 -avi "C:\Programmi\PureBasic402\AutoMKV\test\temp\movie.avi"


will produce this file http://www.64k.it/andres/data/a/xvid_crash.avi

open virtualdub, load the avi, click ok one vbr stream... then CTRL+G and go to frame 538, move with left arrow and you will see this
http://img525.imageshack.us/img525/566/virtualdubcrashcp2.png (if you don't got the crash.. simply move left and right some more times..)

i am using this xvidcore.dll by celticdruid http://tirnanog.fate.jp/mirror/XviD/xvid.cvs.head.MTK.2007.06.29.7z
and xvid_encraw (471.040 byte ) by squid_80 build on february 3 , 20.07.04 pm and aviwriter.dll (57.344 byte) build on november 16, 19.35.48 pm

this is the script (if interesting)

LoadPlugin("C:\Programmi\PureBasic402\AutoMKV\exe\filter\autocrop.dll")
LoadPlugin("C:\Programmi\PureBasic402\AutoMKV\exe\filter\DGDecode.dll")
LoadPlugin("C:\Programmi\PureBasic402\AutoMKV\exe\filter\RemoveGrainS.dll")
LoadPlugin("C:\Programmi\PureBasic402\AutoMKV\exe\filter\ColorMatrix.dll")
movie =mpeg2source("C:\Programmi\PureBasic402\AutoMKV\test\temp\movie.d2v")
function getOrder(clip c) {
order = GetParity(c) ? 1 : 0
Return order }
cropclip = autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=40,aspect=0,threshold=34,samplestartframe=0)
fixed_aspect = 1.066667
c_width = width(cropclip)
c_height = Round(height(cropclip) / fixed_aspect)
input_par = float(float(c_width)/float(c_height))
input_par = input_par > 1.4 ? input_par : (4.0/3.0)
out_width = 640
out_height = Round(float(out_width) / input_par)
hmod = out_height - (floor(out_height / 16 ) * 16)
out_height = (hmod > 4) ? (out_height + (16 - hmod)) : (out_height - hmod)
new_aspect = (float(out_width) / float(out_height)) / fixed_aspect
autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=40,aspect=new_aspect,threshold=34,samplestartframe=0)
SimpleResize(out_width,out_height)
RemoveGrain(mode=2)
ColorMatrix(mode="Rec.709->Rec.601")

any help is appreciated!

BHH

squid_80
24th July 2007, 00:09
Try encoding without -noclosed_gop.

buzzqw
24th July 2007, 07:34
yes, fixed! Thanks!

but.. must be informed someone of xvid devs ?

BHH

squid_80
24th July 2007, 12:35
I think they know... it's probably why they took the option out of the vfw config.
I think there was a patch committed today that's meant to stop the divide by 0 error, not sure if it will completely fix the problem though.

buzzqw
24th July 2007, 12:50
ok...

the sample will stay on my site.. if anyone want test :)

BHH

celtic_druid
24th July 2007, 16:08
/xvidcore/src/bitstream/bitstream.c
- improve b-frame decoding robustness (with broken stream or missing ref frame)

squid_80
24th July 2007, 16:37
That's the one, but I don't know if it'll fix the problem or just mask it.
For broken bitstreams where one of the reference frames of a b-frame might be broken, the b-frame will still be decoded. Obviously with errors but better than nothing...I guess try it and see what happens.