FlimsyFeet
4th March 2005, 09:05
Previewing an avs script with VirtualDub, stepping through frame-by-frame with the right arrow key, when I reach frames containing explosions or flashes I get horrible black blocks all over the place:
http://img217.exs.cx/img217/5462/bad8tb.th.jpg (http://img217.exs.cx/my.php?loc=img217&image=bad8tb.jpg)
(I get the same blocks in my encode, as well).
Now I did a search and I've seen it mentioned that Pixiedust can cause artefacts, but what makes me think it's a more serious bug - if I use alt+left arrow to go back a dozen frames or so, then use alt+right arrow to return to exactly the same frame number as before, this time it's alright:
http://img217.exs.cx/img217/3572/good5bs.th.jpg (http://img217.exs.cx/my.php?loc=img217&image=good5bs.jpg)
That shouldn't happen, should it? If it was pixiedust artefacts, then they would be consistent.
I'm still only a beginner when it comes to scripting, so it's a bit of a mess (the main part of the function is Didée's workaround to the pixiedust cropping problem):
clip1=loop(avisource("d:\capture\thx_trailer.avi"),47,0,0).trim(0,370)
clip2=AviSource("d:\capture\side_1.avi").trim(0,46328).crop(16, 124, 704, 324)
clip3=AviSource("d:\capture\side_2.avi").trim(322,45738).crop(16, 126, 704, 324)
clip4=avisource("d:\capture\side_3.avi").trim(57,43395).crop(16, 126, 704, 324)
clip5=avisource("d:\capture\side_4.avi").trim(249,39290).crop(16, 126, 704, 324)
clipA=clip1.pixiedust(limit=7).limitedsharpen(dest_x=480).addborders(120,0,120,0)
clipB=process(clip2+clip3+clip4+clip5)
clipA+clipB.addborders(8, 72, 8, 72)
function process( clip clp )
{
ox = clp.width
oy = clp.height
xcorr = int( 16. - ox%16 - 4. )
ycorr = int( 8. - oy%8 - 4. )
top = clp.crop( 0, 0,-0, 4).flipvertical()
bot = ycorr > 0
\ ? clp.crop( 0,oy-ycorr,-0,-0).flipvertical()
\ : top
ycorr > 0 ? stackvertical( top, clp, bot)
\ : stackvertical( top, clp)
left = last.crop(0, 0, 4,-0).fliphorizontal()
right = xcorr > 0
\ ? last.crop(ox-xcorr,0,-0,-0).fliphorizontal()
\ : left
xcorr > 0 ? stackhorizontal(left,last,right)
\ : stackhorizontal(left,last)
PixieDust(limit=7)
crop(4,4,-xcorr,-ycorr)
limitedsharpen(dest_y=432)
return last
}
http://img217.exs.cx/img217/5462/bad8tb.th.jpg (http://img217.exs.cx/my.php?loc=img217&image=bad8tb.jpg)
(I get the same blocks in my encode, as well).
Now I did a search and I've seen it mentioned that Pixiedust can cause artefacts, but what makes me think it's a more serious bug - if I use alt+left arrow to go back a dozen frames or so, then use alt+right arrow to return to exactly the same frame number as before, this time it's alright:
http://img217.exs.cx/img217/3572/good5bs.th.jpg (http://img217.exs.cx/my.php?loc=img217&image=good5bs.jpg)
That shouldn't happen, should it? If it was pixiedust artefacts, then they would be consistent.
I'm still only a beginner when it comes to scripting, so it's a bit of a mess (the main part of the function is Didée's workaround to the pixiedust cropping problem):
clip1=loop(avisource("d:\capture\thx_trailer.avi"),47,0,0).trim(0,370)
clip2=AviSource("d:\capture\side_1.avi").trim(0,46328).crop(16, 124, 704, 324)
clip3=AviSource("d:\capture\side_2.avi").trim(322,45738).crop(16, 126, 704, 324)
clip4=avisource("d:\capture\side_3.avi").trim(57,43395).crop(16, 126, 704, 324)
clip5=avisource("d:\capture\side_4.avi").trim(249,39290).crop(16, 126, 704, 324)
clipA=clip1.pixiedust(limit=7).limitedsharpen(dest_x=480).addborders(120,0,120,0)
clipB=process(clip2+clip3+clip4+clip5)
clipA+clipB.addborders(8, 72, 8, 72)
function process( clip clp )
{
ox = clp.width
oy = clp.height
xcorr = int( 16. - ox%16 - 4. )
ycorr = int( 8. - oy%8 - 4. )
top = clp.crop( 0, 0,-0, 4).flipvertical()
bot = ycorr > 0
\ ? clp.crop( 0,oy-ycorr,-0,-0).flipvertical()
\ : top
ycorr > 0 ? stackvertical( top, clp, bot)
\ : stackvertical( top, clp)
left = last.crop(0, 0, 4,-0).fliphorizontal()
right = xcorr > 0
\ ? last.crop(ox-xcorr,0,-0,-0).fliphorizontal()
\ : left
xcorr > 0 ? stackhorizontal(left,last,right)
\ : stackhorizontal(left,last)
PixieDust(limit=7)
crop(4,4,-xcorr,-ycorr)
limitedsharpen(dest_y=432)
return last
}