Log in

View Full Version : Weird crash/error when downsizing


DeathAngelBR
11th November 2007, 07:35
The source is a 453MB avi file, colorspace is YV12. At frame 241 virtualdub crashes and megui (actually x264.exe) doesn't detect anything else after when DOWNSIZING. If I just run throught it without changing resolution it goes fine all day long.

Any idea why this would happen? Should I link a file with the first 1000 or so frames?
(Maybe it's the wrong board to post at, but considering that this happens with both softwares I take it it's something in avisynth)



avisource("Gundam 00 EP02 DTBS DivX66 1280x720.avi",false)

deblock()

# bicubicresize(768,432)
# spline36resize(768,432)
# lanczosresize(768,432)
# lanczos4resize(768,432)

Dark Shikari
11th November 2007, 07:38
Perhaps its because your source resolution is mod16, while your resized resolution is not?

DeathAngelBR
11th November 2007, 09:00
I always thought that mod16 was a resolution with both height and width divisible by 16 (768/16=48, 432/16=27). :confused:

Dark Shikari
11th November 2007, 11:12
I always thought that mod16 was a resolution with both height and width divisible by 16 (768/16=48, 432/16=27). :confused:Ah, you're right, I can't do math tonight... that is very strange then.

Have you tried playing it back normally and seeing if it crashes? If it does, its an Avisynth issue.

Have you tried tacking on an extra ConvertToYV12() on the end, just in case?

IanB
11th November 2007, 12:48
Which version of avisynth are you running?

What is the exact crash message?

Does the following script with the Blackclip() behave exactly same, i.e. crash at frame 241avisource("Gundam 00 EP02 DTBS DivX66 1280x720.avi",false)
BlankClip(Last)
deblock()
# bicubicresize(768,432)
# spline36resize(768,432)
lanczosresize(768,432)Also test this version, with the Blankclip latter.avisource("Gundam 00 EP02 DTBS DivX66 1280x720.avi",false)
deblock()
BlankClip(Last)
# bicubicresize(768,432)
# spline36resize(768,432)
lanczosresize(768,432)

DeathAngelBR
11th November 2007, 15:14
Which version of avisynth are you running?

2.5.7

What is the exact crash message?

All it says is "virtualdub has found a problem and must be closed".

Does the following script with the Blackclip() behave exactly same, i.e. crash at frame 241avisource("Gundam 00 EP02 DTBS DivX66 1280x720.avi",false)
BlankClip(Last)
deblock()
# bicubicresize(768,432)
# spline36resize(768,432)
lanczosresize(768,432)

Also test this version, with the Blankclip latter.avisource("Gundam 00 EP02 DTBS DivX66 1280x720.avi",false)
deblock()
BlankClip(Last)
# bicubicresize(768,432)
# spline36resize(768,432)
lanczosresize(768,432)

Nope, no crash with both.

Have you tried playing it back normally and seeing if it crashes? If it does, its an Avisynth issue.

Yeah, as I said, I can run it all day long and it doesn't crash.

Have you tried tacking on an extra ConvertToYV12() on the end, just in case?

Same result. :(


edit: I tried downsizing to non-16/9 resolution (640x480, 720x480, 800x600), and it werks! :eek:

edit 2: downsizing to 848x480 = crash

edit 3: tried downsizing a different episode and it's all good, which makes me believe the source is kaput. that's strange ...

IanB
11th November 2007, 21:45
Okay replace the Blankclip(Last) with Freezeframe(230, 300, 230) and retest. If it still chokes change the 300 to the next source key frame number after frame 300 (To find next the keyframe open the source file in VDub and press [Shift RightArrow]).

Does it crash if you use DirectShowSource() instead of AviSource()?

DeathAngelBR
12th November 2007, 21:10
Okay replace the Blankclip(Last) with Freezeframe(230, 300, 230) and retest. If it still chokes change the 300 to the next source key frame number after frame 300 (To find next the keyframe open the source file in VDub and press [Shift RightArrow]).

Does it crash if you use DirectShowSource() instead of AviSource()?

Sorry for the delay.

It didn't crash with Freezeframe(230, 300, 230).

IanB
12th November 2007, 22:31
Yep your source file probably has a small corruption around frame 241. If you are keen you could adjust the 230 and 300 to find the exact range that causes problems. DivX is notorious for spewing into memory when you feed it corrupted files. The resizer uses dynamicly compiled code which is in the data area so is vunerable to memory scribbles.

If the data is valuable to you, extract the unprocessed troublesome data segment out to a raw or lossless compressed file and substitute it back into your main script.avisource("Gundam 00 EP02 DTBS DivX66 1280x720.avi",false)
Trim(230, 300)Save as "Gundam 00 EP02 Raw 230-300.avi", then exit the program, it likely has some hidden corruption.Raw=avisource("Gundam 00 EP02 Raw 230-300.avi",false)
avisource("Gundam 00 EP02 DTBS DivX66 1280x720.avi",false)
Trim(0, 229) + Raw + Trim(301, 0)
...