AviSynth Problem: Random Frames Popping Up :(

This forum is for questions and discussion of all the aspects of handling your footage. If you have questions about capturing/ripping footage, AviSynth, or compression/encoding/converting, look here.

AviSynth Problem: Random Frames Popping Up :(

Postby Kero777 » Mon Jul 23, 2007 9:16 pm

I thought everything was going great with an .avs file until I previewed the small clip after saving it from VirtualDubMod. What's happening is at the end of the 2 seconds of black a random frame will pop up before the video starts for a split second or it will glitch out. It looks VERY ugly. I think another random frame pops up halfway through as well.

Here is my script:

AVISource("C:\Documents and Settings\User\Desktop\avisynthpractice\test.avi")
AddBorders(40,0,40,0)
LanczosResize(720,480)
v=last
b=v.BlankClip(48)
b++v++b


Does anyone know how to prevent this frame from popping up? Thanks. :D

(Just so you know I used "AddBorders(40,0,40,0) because the video is normally at 640X480 and it looks very horizontally stretched when I change it to 720X480. I tried it without it and it doesn't seem to make a difference anyway. :()
Thanks to: Qyot27, Jaddziadax, BasharOfTheAges, Scintilla, Post-It, Anubisx00, Kariudo and everyone else for helping this Newby out! :P

"Hard work is worthless for those that don't believe in themselves." -Naruto Uzumaki
User avatar
Kero777
 
Joined: 06 May 2007

Postby Purge » Tue Jul 24, 2007 1:03 am

err yuck what happened there- just tried out your script - not sure whats going on

error/glitch happens only when i try input playback in vdub - if i just use the arrow keys and go through it frame by frame it seems okay. I also exported it with lagarith and it seemed to work okay.
User avatar
Purge
 
Joined: 10 Oct 2005
Location: Under Aus

Postby Kalium » Tue Jul 24, 2007 8:39 am

That can happen if you're using an XviD source or similar.
User avatar
Kalium
Sir Bugsalot
 
Joined: 03 Oct 2003
Location: Plymouth, Michigan

Re: AviSynth Problem: Random Frames Popping Up :(

Postby Qyot27 » Tue Jul 24, 2007 9:16 am

Kero777 wrote:(Just so you know I used "AddBorders(40,0,40,0) because the video is normally at 640X480 and it looks very horizontally stretched when I change it to 720X480.

It's supposed to. Proper 4:3 is 640x480 when viewed on a computer screen. 720x480 (which is 3:2, technically), only displays as proper 4:3 when viewed on a TV, since TV pixels aren't square like a computer monitor's are. Simple as that. With those borders there, it'll look too tall when viewed on a TV. To see for yourself, after adding the borders, resize back to 640x480. That's how it'll look on a TV.

Anyway, perhaps the issue occurs because of XviD, but it's not necessary to use the programming-esque functions of AviSynth to accomplish putting buffer footage on something. The same script could be written in a much simpler form like so:
Code: Select all
BlankClip(48) ++ AVISource("test.avi").AddBorders(40,0,40,0).LanczosResize(720,480) ++ BlankClip(48)

That's one line - ignore the screen wrapping. Periods between the functions work the same way that putting the functions on new lines does. The double-pluses tell the script to make absolutely sure that the audio remains synched where it's supposed to be.
User avatar
Qyot27
Surreptitious fluffy bunny
 
Joined: 30 Aug 2002
Location: St. Pete, FL
Status: Creepin' between the bullfrogs

Thanks TONS!!

Postby Kero777 » Tue Jul 24, 2007 9:19 pm

Kalium wrote:That can happen if you're using an XviD source or similar.

Qyot27 wrote:Anyway, perhaps the issue occurs because of XviD


I was wondering that myself last night when I did a few more experiments. The "test" clip I used was one that I was practicing on using V-Dub. That specific clip I converted back to XviD. When I tried one that was a lagarith source, it was perfectly fine! :) Thanks a whole lot!!!

Qyot27 wrote:It's supposed to. Proper 4:3 is 640x480 when viewed on a computer screen. 720x480 (which is 3:2, technically), only displays as proper 4:3 when viewed on a TV, since TV pixels aren't square like a computer monitor's are. Simple as that. With those borders there, it'll look too tall when viewed on a TV. To see for yourself, after adding the borders, resize back to 640x480. That's how it'll look on a TV.


I'm very glad you pointed that out to me! Thanks!!

Qyot27 wrote:Periods between the functions work the same way that putting the functions on new lines does. The double-pluses tell the script to make absolutely sure that the audio remains synched where it's supposed to be.


Another VERY useful piece of information. I actually had no idea the periods did that.

Thank you, you three! Your information was a big help! :D
Thanks to: Qyot27, Jaddziadax, BasharOfTheAges, Scintilla, Post-It, Anubisx00, Kariudo and everyone else for helping this Newby out! :P

"Hard work is worthless for those that don't believe in themselves." -Naruto Uzumaki
User avatar
Kero777
 
Joined: 06 May 2007


Return to Footage Help

Who is online

Users browsing this forum: No registered users and 1 guest