Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
|
#1 | Link |
|
Registered User
Join Date: Jan 2005
Location: Huntsville, AL
Posts: 96
|
What is causing a glitch at frame 294 in my script?
I wrote the following script to illustrate to someone on videohelp.com how he might (I could) scroll text across a video using AVISynth.
PHP Code:
![]() Note that the text just up several pixels and that the text from Scolling_Text line 4 versus line 1 is displayed. This glitch goes away if I change, clip = clip.Animate(8,nf-8, "Subtitle", ... to clip = clip.Animate(6,nf-8, "Subtitle", \ Any insights why my script cause this glitch and why it went away when I made the above change? Last edited by rkr1958; 10th December 2006 at 03:25. |
|
|
|
|
|
#2 | Link | |
|
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 2,314
|
The Animate target value become -1 at that frame.
Quote:
![]() Performance Hint: To avoid unnecessary colour space conversions, use the Pixel_type="YUY2" on AviSource() and BlankClip() where appropriate. Alternate approach: Declare an appropriatly wide, 40 high ribbon clip. Write all text onto the ribbon in 1 go. Use Animate of Layer of the ribbon to do the scroll. |
|
|
|
|
|
|
#3 | Link | |
|
Registered User
Join Date: Jan 2005
Location: Huntsville, AL
Posts: 96
|
Quote:
Also, thanks for your performance hint. A couple of questions. So would the command, a = AVISource("G:\MUMC_Preschool_Christmas_Show_2005\Song-1.avi",Pixel_type = "YUY2", audio = false) produce the same result (but only faster) as # Deshook, DeNoised Video a = AVISource("G:\MUMC_Preschool_Christmas_Show_2005\Song-1.avi",audio = false).ConvertToYUY2() ? Are there also quality differences between these two? |
|
|
|
|
|
|
#4 | Link |
|
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 2,314
|
The main point was not to convert the BlankClips. Generate them as YUY2 directly.
In the the 1st case you are explicitly asking the codec to decode to YUY2 pixel type ONLY! In the second case, the codec will be asked for in turn YV12, YUY2, RGB32 then RGB24, The first type the codec can deliver will be used. If YUY2 is returned anyway the ConvertToYUY2 will be a noop. There are many scenarios I will mention a few. 1. The codec cannot do YUY2 - Script Error. 2. The codec can do YV12 but does YUY2 better - Better Quality. 3. The internal data is natively YV12, the codec has inferior or slow YV12 -> YUY2 code - Worse quality or slower. 4. The internal data is natively YV12, the codec knows the data is interlaced and can correctly deinterlace the chroma to YUY2 - Correct chroma sampling. 5. The internal data is natively YV12, the codec does not knows the data is interlaced and incorrectly deinterlaces the chroma to YUY2 - Chroma Sampling Error. 6. The internal data is RGB, the codec has inferior or slow RGB -> YUY2 code - Worse quality or slower. It pays to know a little about your codec. At a minimum test with pixel_type="YV12" and "YUY2" and compare the results. Also one catch with layer and YUY2 is mod 2 horizontal pixel alignment, this means the text will scroll 2 pixels at a time. In your original approach you could add a number of spaces to the start of your message so you can skip around the 720 -> -1 animate cases and start directly at -2. Last edited by IanB; 14th December 2006 at 05:02. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|