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. |
|
8th February 2008, 12:31 | #1 | Link |
Registered User
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
|
Script for change TFF to BFF
Hi All!
Simple question: this script Code:
AVISource("test.avi") AssumeTFF() DoubleWeave() SelectOdd() Please advise, may be exist other way? With kind regards yup. |
10th February 2008, 00:58 | #2 | Link |
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
Yes, DoubleWeave() pairs fields alternatly [01][12][23][34][45]... and with SelectOdd() then select the [12][34][56]... pairing. So you will end up with BFF frames.
Note you do loose the 1st field (0) and reuse the 2nd last field in the last frame. ...[n-4,n-3][n-2,n-1][n,n-1] |
10th February 2008, 10:57 | #4 | Link |
Registered User
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
|
IanB!
And this script introduce delay between audio and video half time between frames in my case PAL 20ms? stickboy Your function JDL_ReverseFieldDominance not introduce delay and first and last frames will be get from bobbed if bobFirstLast=true. One more thanks. I have 4 hour capture video and Your answer very important for me. yup. |
12th February 2008, 18:10 | #5 | Link |
Registered User
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
|
I try 3 way:
1. Code:
AVISOurce("part1f.avi") AssumeTFF() DoubleWeave() SelectOdd() 2. Code:
AVISOurce("part1f.avi") AssumeTFF() JDL_ReverseFieldDominance(bobfirslast=true) 3. Code:
AVISOurce("part1f.avi") AssumeTFF() All ways give jerky results especialy on date stamp which moving up and down. That I made wrong? With kind regards yup. |
12th February 2008, 20:42 | #7 | Link |
Registered User
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
|
@ stickboy!
Yes, I have problem with capture AVI all my file have BFF but indeed TFF, my card Pinnacle PCI 700 and I use VirtualDub for capture. I get good result with Reverse Field Dominance. 4 way Code:
AVISource("part1f.avi") ReverseFieldDominance(true) AssumeBFF yup. |
12th February 2008, 21:36 | #8 | Link | |
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
@Yup,
Perhaps you had better check this AVI file, it sounds like AssumeTFF() is NOT the correct choice for this file. Code:
AVISource("part1f.avi") AssumeTFF() # or AssumeBFF() Bob() Please report your findings here so others may benefit from your experiences. The above script will take the individual fields and crudely make them into 2 times as many full frames. And Quote:
Assume?FF() just set internal flags such that field order sensitive filters can know the time order of the fields, the field order information is NOT exported. |
|
13th February 2008, 05:28 | #9 | Link |
Registered User
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
|
@IanB!
Code:
AVISource("part1f.avi") AssumeTFF() Bob() Code:
AVISource("part1f.avi") AssumeBFF() Bob() Also when I encoding this file in CCE I do not use field shift. Better result for me give script: Code:
bob()# or yadifmod, or nnedi as bobber SeparateFields() SelectEvery(4,1,2) Weave() |
31st August 2011, 10:03 | #10 | Link |
Registered User
Join Date: May 2009
Location: Belgium
Posts: 1,744
|
Hi,
I found another simple solution to convert BFF to TFF in the doc of Remove Blend 0.3, but I don't know if it works to convert TFF to BFF; Code:
avisource("your_clip.avi") separatefields() trim(1,0) weave() |
31st August 2011, 10:47 | #11 | Link |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
The basic idea works, but to make it convert TFF to BFF you will have to add AssumeTFF() since the Avisynth default is BFF.
Code:
avisource("your_clip.avi") AssumeTFF() separatefields() trim(1,0) weave() |
31st August 2011, 14:36 | #12 | Link | |
Registered User
Join Date: May 2009
Location: Belgium
Posts: 1,744
|
I just tested with both TFF and BFF videos and it works (I answer to myself ).
Quote:
But there is something I don't understand in this script : the trim line removes 1 field (or actually a frame in this case, as the frames are separated in 2 progressive frames having half the resolution of the avi, each one containing one field whose lines are tightened), but the weave line renders the same number of frames than if one don't put the trim line. Example ; Code:
avi file#720.480, 115 frames separatefields()#720.240, 230 frames trim(1,0)#720.240, 229 frames, TFF became BFF (or vice versa depending on the original video's parity) weave()#720.480, 115 frames again Last edited by Music Fan; 31st August 2011 at 14:45. |
|
31st August 2011, 16:35 | #13 | Link | ||
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
Quote:
Encoding is a different case, since you can tell the encoder that the clip is TFF, but you will certainly need it for any Avisynth filters that need to know the correct field order to function properly. Quote:
What happens is that Avisynth repeats the last field to complete the sequence, so the final frame actually consists of two identical fields. |
||
31st August 2011, 16:59 | #14 | Link | |
Registered User
Join Date: May 2009
Location: Belgium
Posts: 1,744
|
Quote:
Code:
avisource("your_clip.avi")#TFF separatefields() weave() AssumeTFF() bob() Doesn't it mean that separatefields and weave keep the good field order ? |
|
31st August 2011, 17:22 | #15 | Link | ||
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
Quote:
JDL_ReverseFieldDominance avoids that problem. Quote:
But in between the two, the fields will be in the wrong order so any filter that depends on the temporal order will not work properly. (Trim(1,0) falls into that category.) |
||
1st September 2011, 00:03 | #20 | Link | |
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
Quote:
No for the DoubleWeaveFrames case. This is used by DoubleWeave() with Framebased clips. DoubleWeaveFrames always joins a Top fields with a Bottom field, so at the end boundary it fetches the last frame from the source clip for both inputs and extracts a Top field, n, and a Bottom field, n-1. Which is the case for my post #2 above. DoubleWeaveFields always joins an even frame with an odd frame , so at the end boundary it fetches the last frame from the source clip for both inputs and use it as both top and bottom field. |
|
|
|