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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 15th July 2011, 22:57   #1  |  Link
Jonaldinho
Registered User
 
Join Date: Aug 2008
Posts: 49
Noise filters on interlaced material

Hi, I'm encoding my dv footage to dvd with CCE 2.67. I know how to encode and the basic settings to create an avs script but i'm not sure how to use noise filters on interlaced content. I have 2 videos i'm joining together, I had issues with the audio so I created grf files and loaded them instead. I'm experimenting with convolution3dyv12, here's my script:

LoadPlugin("O:\MeGUI\tools\avisynth_plugin\Convolution3DYV12.dll")
vid=DirectShowSource("M:\Video 1 Video.GRF", audio=false)+DirectShowSource("M:\Video 2 Video.GRF", audio=false).AssumeBFF()
aud=DirectShowSource("M:\Video 1 Audio.GRF", video=false)+DirectShowSource("M:\Video 2 Audio.GRF", video=false)
AudioDub(vid, aud)
ConvertToYV12()
separatefields()
vid_e=selecteven()
vid_o=selectodd()
vid_e=convolution3d(vid_e,0,4,4,4,4,2.8,0)
vid_o=convolution3d(vid_o,0,4,4,4,4,2.8,0)
interleave(vid_e,vid_o)
weave()
ConvertToYUY2()
__film = last
__t0 = __film.trim(5, 7505)
__t1 = __film.trim(7569, 8563)
__t2 = __film.trim(8609, 10072)
__t3 = __film.trim(10691, 58249)
__t4 = __film.trim(58350, 79793)
__t0 ++ __t1 ++ __t2 ++ __t3 ++ __t4

Does this look right? I'm unsure about the colour space conversion parts and I've seen some scipts with DoubleWeave.SelectOdd() after Weave(). Do i need .AssumeBFF() after each loaded video? I assumed because it was on the same line it wouldn't matter. Thanks.

Last edited by Jonaldinho; 15th July 2011 at 23:01.
Jonaldinho is offline   Reply With Quote
Old 16th July 2011, 00:18   #2  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,384
Quote:
Originally Posted by Jonaldinho View Post
Do i need .AssumeBFF() after each loaded video? I assumed because it was on the same line it wouldn't matter.
As you've written it, AssumeBFF only applies to Video2 - in effect, the '.' binds more tightly than the '+'.
You could have written
vid=(DirectShowSource(...1...)+DirectShowSource(...2...)).AssumeBFF()
or
vid=DirectShowSource(...1...).AssumeBFF()+DirectShowSource(...2...).AssumeBFF()
but since BFF is the default, you don't really need it anyway.
__________________
GScript and GRunT - complex Avisynth scripting made easier

Last edited by Gavino; 16th July 2011 at 00:49. Reason: remove spurious bracket
Gavino is offline   Reply With Quote
Old 16th July 2011, 12:22   #3  |  Link
Jonaldinho
Registered User
 
Join Date: Aug 2008
Posts: 49
Quote:
Originally Posted by Gavino View Post
You could have written
vid=(DirectShowSource(...1...)+DirectShowSource(...2...)).AssumeBFF()
or
vid=DirectShowSource(...1...).AssumeBFF()+DirectShowSource(...2...).AssumeBFF()
but since BFF is the default, you don't really need it anyway.
Thanks for your reply. I encoded it with out .AssumeBFF() and the motion was jerky. I started this thread at the start of encoding this script, with .AssumeBFF() just at the end of the line and it appears to be playing smoothly during both videos. Now I'm just wondering if i've applied the right settings to apply the noise filter to interlaced material correctly.
Jonaldinho is offline   Reply With Quote
Old 16th July 2011, 19:44   #4  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,384
Quote:
Originally Posted by Jonaldinho View Post
Thanks for your reply. I encoded it with out .AssumeBFF() and the motion was jerky. I started this thread at the start of encoding this script, with .AssumeBFF() just at the end of the line and it appears to be playing smoothly during both videos.
That's puzzling since, as I said, Avisynth defaults to BFF, so it shouldn't matter if you put it in for either video or not at all.

And in fact, there is nothing in your script that requires the correct field order to be known, since you process the odd and even fields independently and put them back in the same order afterwards.

Note however that when encoding, you will also have to tell your encoder that the clip is BFF, since most (if not all) encoders will not get that information from Avisynth.

One thing I have just spotted is that your ConvertToYV12() and ConvertToYUY2() calls should specify interlaced=true, but that should only affect chroma, not cause jerky movement.
__________________
GScript and GRunT - complex Avisynth scripting made easier
Gavino is offline   Reply With Quote
Old 18th July 2011, 12:51   #5  |  Link
Jonaldinho
Registered User
 
Join Date: Aug 2008
Posts: 49
Quote:
Originally Posted by Gavino View Post
Note however that when encoding, you will also have to tell your encoder that the clip is BFF, since most (if not all) encoders will not get that information from Avisynth.
I added .AssumeBFF() after each line of video just to be safe. I don't know how to tell the encoder it's BFF. I've encoded it and it plays smoothly so hopefully it's OK.

Quote:
Originally Posted by Gavino View Post
One thing I have just spotted is that your ConvertToYV12() and ConvertToYUY2() calls should specify interlaced=true, but that should only affect chroma, not cause jerky movement.
I have now added interlaced=true to each colour conversion command now, thank you. I couldn't see any difference in the noise with the settings I was using so I tried the noise filter on a higher setting (0,6,10,6,8,2.8,0) and now i can see a subtle reduction in noise. I don't want to reduce noise to much in trade of for picture detail because I'm encoding at 9mbps and there doesn't appear to be any obvious artifacts.
Jonaldinho is offline   Reply With Quote
Reply

Tags
avisynth, convolution3d, interlaced, noise, script

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 13:57.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.