Log in

View Full Version : AVIsynth causes access violation


scharfis_brain
11th September 2003, 22:07
when using this script (I want to demonstrate 24p to 25i conversion via blending):
z=xxxsource("video.xxx")

a=assumefps(z,24).converttoyuy2().separatefields()
# assuring 24fps and separating into fields

x=selectevery(a,2,0).trim(12,0).convertfps(25)
# take first field,
# trim 1st 12 frames away to get convertfps(25)
# displaced by 12 frames
# framerateconversion from 24 to 25 fps

y=selectevery(a,2,1).convertfps(25).trim(12,0)
# take 2nd field,
# do the framerateconversion from 24 to 25 fps
# trim 1st 12 frames from converted video away
# to to match the 2nd field to the first one

interleave(x,y)



# selectevery(2,1,0) #


weave() #seems to chrash vdub/avisynth everytime at frame 11


without selectevery(2,1,0) and weave(),
the script works like a charm.
But when I try to insert weave(),
it crashes at frame 11.

when placing selectevery(2,1,0) before weave(), the script works, but delivers a undesirable output.

What the hell is going on here? I cannot understand this!

scharfis_brain
13th September 2003, 09:38
Does nobody have an Idea?

Maybe someone other can test this script, wheather it chrashes or not???

Bidoche
13th September 2003, 11:00
It works with me.
Did you checked it was not due to the source, using another source clip ?

Bidoche
13th September 2003, 11:02
I had the crash when uncommenting the selectevery...

Seems to work when you make Trim and Convert in the same order for x and y....

Managed to have it work with killing audio from source.
The error may be is caused by some forgotten audio conditions not properly checked soemwhere.

scharfis_brain
13th September 2003, 11:22
Seems to work when you make Trim and Convert in the same order for x and y.... but trim and convert have to be in opposite order for the upper and lower field to achieve the 24p->25i conversion-demonstration...

when the script works for you, how looked the output of this script? when it worked for me, the weave() commandproduced very a ugly putput, it seems to be that the weave() command swaps the fields in every other frame.

Did you checked it was not due to the source, using another source clip ? I doesn't matter, which type of input-format I'm using...

Bidoche
13th September 2003, 12:28
It was ugly, always ugly, and it is still ugly, and it still crashes too.

And i don't get your thing about having trim and convertfps in opposite orders

scharfis_brain
13th September 2003, 12:45
when you try
z=xxxsource("video.xxx")
a=assumefps(z,24).converttoyuy2().separatefields()
x=selectevery(a,2,0).trim(12,0).convertfps(25)
y=selectevery(a,2,1).convertfps(25).trim(12,0)
interleave(x,y)
it should give a fine 24fps to 50fps conversion with alternating blending every 2nd frame.

and this alternating blending is only achieved when using trim and convertfps in opposite order for the fields.
And a later waeving of this video gives an interlaced output.

when I am using trim & convertfps in the same order, two following frames contain the same content. This is, what I don't want.

Bidoche
13th September 2003, 12:58
I reduced the bug to this :

avisource("Nadia - episode 31 - Adieu Noah Pourpre.avi") #25 fps

converttoyuy2()
separatefields()

convertfps(52) #not 50 or it's null op
If you reverse converttoyuy2 and separatefields order, it works (your script too)
Maybe in YUY2 mode separatefields return a somehow inappropriate result which makes convertfps crash....

scharfis_brain
13th September 2003, 13:27
thanks, swapping converttoyuy2() & separatefields() made my script working, but:

Originally posted by scharfis_brain
when it worked for me, the weave() commandproduced very a ugly putput, it seems to be that the weave() command swaps the fields in every other frame.

this issue is staying!

scharfis_brain
13th September 2003, 21:13
Many thanks for your help, Bidoche!!

My script is now fully functional and does exactly, what I intended.

z=xxxsource("video.xxx")
a=assumefps(z,24).separatefields().converttoyuy2()
x=selectevery(a,2,0).trim(12,0).convertfps(25)
y=selectevery(a,2,1).convertfps(25).trim(12,0)
interleave(y,x).assumebff().weave()

My last problem (alternating fieldswap every 2nd frame) could be solved by usinf assumebff() before weave().