View Full Version : Problems with an override text
Henox
30th November 2008, 02:25
Hello,
Here is my avisynth text :
override=("C:\Users\...\EXAMPLESVIDEO\ovverideb.txt")
override2=("C:\Users\...\EXAMPLESVIDEO\ovverideb2.txt")
LoadVFAPIplugin("C:\Program Files\Pegasys Inc\TMPGEnc Plus 2.5\TMPGEnc.vfp","TMPGsource")
TMPGsource("C:\Users\...\Videos\EXAMPLESVIDEO\a.tpr")
FlipVertical
ConvertToYV12()
deint = nnedi(field=-2)
Tdeint(mode=1,edeint=deint,slow=0,ovr=override2,full=false,mi=255).selectodd()
deint = nnedi(field=-2)
Tdeint(mode=1,edeint=deint,slow=0,ovr=override,full=false,mi=255).selecteven()
So i deinterlace my video on tgmpenc as you see with normal ivtc. Then i wanna apply another external deinterlacer through an override text so as to deinterlace some specifical frame. In this example, i use two different overrides. Unfortunately, the deinterlacer is applying on the WHOLE video instead of applying on the frames setted on the overrides texts.
I precise each override texts contains frames with + : 100 +, 102 + ect
I would only like to apply the external deinterlacer on the frames setted trhough those texts. But it doesn't work, it's like they are gnored. Do you have a solution to help me ?
neuron2
30th November 2008, 02:34
First, try removing the parentheses completely on the first two lines. They make no sense.
If that doesn't work, get rid of the first two lines and assign the ovr parameters directly:
LoadVFAPIplugin("C:\Program Files\Pegasys Inc\TMPGEnc Plus 2.5\TMPGEnc.vfp","TMPGsource")
TMPGsource("C:\Users\...\Videos\EXAMPLESVIDEO\a.tpr")
FlipVertical
ConvertToYV12()
deint = nnedi(field=-2)
Tdeint(mode=1,edeint=deint,slow=0,ovr="C:\Users\...\EXAMPLESVIDEO\ovverideb.txt",full=false,mi=255).selectodd()
deint = nnedi(field=-2)
Tdeint(mode=1,edeint=deint,slow=0,ovr="C:\Users\...\EXAMPLESVIDEO\ovverideb.txt",full=false,mi=255).selecteven()
Gavino
30th November 2008, 10:23
The parentheses are certainly unnecessary, but harmless.
The real problem is that the second Tdeint is applied to the result of SelectOdd on the first, which changes the frame numbers, making them no longer match the override file.
I'm not sure what you're trying to achieve, but perhaps you really want:
...
deint = nnedi(field=-2)
o=Tdeint(mode=1,edeint=deint,slow=0,ovr=override2,full=false,mi=255).selectodd()
e=Tdeint(mode=1,edeint=deint,slow=0,ovr=override,full=false,mi=255).selecteven()
Interleave(e, o)
If instead you really want to do what your original script suggests, you will need to change the frame numbers in the override file.
Leak
30th November 2008, 11:29
If instead you really want to do what your original script suggests, you will need to change the frame numbers in the override file.
Considering that his original script deinterlaces the result of the first deinterlace again I don't think this was what he meant...
np: Tocotronic - Michael Ende, Du Hast Mein Leben Zerstört (Nach Der Verlorenen Zeit)
Henox
30th November 2008, 16:31
Hello and thanks for your answer,
I've tried what neuron2 told me : the result is the same, the deinterlacer is applying on the whole video (and consequently on the specifical frames i want it to apply on) and it's like the override texts are ignored.
I've tried what Gavino told me but it doesn't work, the deinterlacer is appyling again on the whole video and the frame rate is smehting like 91fps/s.
Plus, you are both right : setting like that my script (like in my first post) implies that the second line deinterlaces the first which was already deinterlaced ; the deinterlacr is applying twice in the whole video.
Well as I said, i would like to deinterlace specifical frames by setting the field (odd or even) and I want the deinterlacer to only apply on them. Both override texts contain the frames I want to deinterlace with + :
1889 +
For example 1889 is a bad frame at a scene change, so I included it in the first override like below, but as I told you the whole video is deinterlaced. The same for the second override.
Gavino
30th November 2008, 17:33
OK - I think I see what you're trying to do now. Try it like this:
deint = nnedi(field=-2)
Tdeint(mode=0,field=1,edeint=deint,slow=0,ovr=override2,full=false,mi=255)
Tdeint(mode=0,field=0,edeint=deint,slow=0,ovr=override,full=false,mi=255)
That assumes override2 is to keep top fields and override to keep bottom ones. If not, switch them round.
Henox
30th November 2008, 18:06
I'm tried what you said but I got this error :
TDeint : number of frames in edeint clip doesn't match that of the input clip !
I've tried to only use one line, change the field order, but it doesn't work. One of the override only contains 1889 +, i've tried to change that too but it doesn't work neither.
Gavino
30th November 2008, 18:31
Ok - I see what's wrong - you need to change the nnedi bit too. I think you want:
deint = nnedi(field=1)
Tdeint(mode=0,field=1,edeint=deint,slow=0,ovr=override2,full=false,mi=255)
deint = nnedi(field=0)
Tdeint(mode=0,field=0,edeint=deint,slow=0,ovr=override,full=false,mi=255)
Or you could probably just remove the nnedi and the edeint parameter, speeding it up without sacrificing a great deal.
I think it could also be done with a single Tdeint call and override file, since you can specify the field on a per-frame basis there. Have another look at the Tdeint docs if you want to try that.
Henox
30th November 2008, 19:07
ok it seems it works now with that code :
LoadVFAPIplugin("C:\Program Files\Pegasys Inc\TMPGEnc Plus 2.5\TMPGEnc.vfp","TMPGsource")
TMPGsource("C:\Users\BADA Tudor\Videos\EXAMPLESVIDEO\a.tpr")
FlipVertical
ConvertToYV12()
deint = nnedi(field=0)
Tdeint(mode=0,field=0,edeint=deint,slow=0,ovr="C:\Users\BADA Tudor\Videos\EXAMPLESVIDEO\ovverideb2.txt",full=false,mi=255)
deint = nnedi(field=1)
Tdeint(mode=0,field=1,edeint=deint,slow=0,ovr="C:\Users\BADA Tudor\Videos\EXAMPLESVIDEO\ovverideb.txt",full=false,mi=255)
I suppose I will have to go through the whole video and select the frames to put on the override text basing me on the field. Is that an equivalent of "selectodd()" and "selecteven()" ? It seems it is.
Then the nnedi seems to work too. But it blends (that's why I didn't want it to be applied on the whole video), is that possible to avoid that by setting something ?Then do you know other examples like this "nnedi" ? I mean I'm curious if I could apply something else as "deint"=nnedi ect" there.
Finally, I will be glad to know what you mean by your last sentence. I'm not sure to manage myself by using the Tdeint docs. Can you explain me ? If I understand, you think it will be better to only use one override text and to specify in it exactly what I want to do (field, options, ect). Yes it would be better, because I could be forced to use another override texts to set frames which I want to be blent for example, or something else.
Gavino
30th November 2008, 19:39
As I said, you can leave out the edeint parameter (and then Tdeint will use its own internal interpolator).
As for the override file, look at the description of the ovr parameter, and the examples given. I don't think I could explain it any better than what's there.
Looking at it now, I think you probably should be using ovrDefault=1 too. Otherwise, all frames will be deinterlaced (twice!).
Henox
30th November 2008, 19:48
Do you mean including that on the last script ? Where exactly ?
Gavino
30th November 2008, 20:16
Do you mean including that on the last script ? Where exactly ?
I mean add it as an additional parameter in both calls to Tdeint.
Example:Tdeint(mode=0,field=1,edeint=deint,slow=0,ovr=override2,ovrDefault=1,full=false,mi=255)
Henox
30th November 2008, 20:26
well but why ? It seems that this time only the frames I set are deinterlaced or do you mean each setted frame will be deinterlaced twice ?
Gavino
30th November 2008, 23:37
well but why ? It seems that this time only the frames I set are deinterlaced
Isn't that exactly what you want? You said:
i wanna apply another external deinterlacer through an override text so as to deinterlace some specifical frame...
I precise each override texts contains frames with +
The TDeint doc even says:
"+ = mark frame to be deinterlaced (only useful if ovrDefault = 1)"
Henox
5th December 2008, 13:57
Ok (Sorry for answering now). Then hre is the code we finally chosen to use (and which works !) :
deint = nnedi(field=1)
Tdeint(mode=0,field=1,edeint=deint,slow=0,ovr=override2,full=false,mi=255)
deint = nnedi(field=0)
Tdeint(mode=0,field=0,edeint=deint,slow=0,ovr=override,full=false,mi=255)
The result is great. But I tried to use this code without including "deint = nnedi(field=1)" ; the result is generally not as great as it is with it. Do you know what other interpolator I could use ? I mean what other interpolator like "nnedi" could I include there and how ?
Some frames need an important correction even after ivtc and manual correction with tdeint. The problem with nnedi is that sometimes it blends the whole frame instead of only deinterlacing the wrong parts in it which need to. So finally, how can I configure this "nnedi" in other way ?
Henox
6th December 2008, 10:43
And plus nnedi is flickering some parts of the frame sometimes, is there somehting to do to avoid that ?
Henox
7th December 2008, 10:45
Gavino are you still there ?
Gavino
7th December 2008, 11:11
Yes I'm still here, but I'm still a bit confused about what you're doing, so I thought I'd let someone else try and answer. :)
Can you explain exactly what you put in the two override files?
Why don't you want/need to use ovrDefault=1?
Henox
7th December 2008, 12:16
ok so here is the code we agreed to use :
deint = nnedi(field=1)
Tdeint(mode=0,field=1,edeint=deint,slow=0,ovr=override2,full=false,mi=255)
deint = nnedi(field=0)
Tdeint(mode=0,field=0,edeint=deint,slow=0,ovr=override,full=false,mi=255)
I noticed that sometimes some frames which i put on the override texts are deinterlaced but they are a lil blend compared to the frames around which were simply ivtced (on TMPGenc). If I dont keep the nnedi parameter, the frames are blend too and the result is not generally great.
I was wondering how it's possible to solve that or if I could use somehtign else than nnedi as interpolator, somehting better.
Gavino
7th December 2008, 18:23
I was wondering how it's possible to solve that or if I could use somehtign else than nnedi as interpolator, somehting better.
nnedi is usually cited as the best interpolator around, so I doubt if there is anything better. On the other hand, I would expect tdeint's internal interpolator to be pretty good too, so I'm surprised you are seeing a big difference.
You still haven't explained exactly what the override files contain and how you decide what to put in each. My assumption has been that you figure out what frames need de-interlacing, and for each of those, which field you want to keep. File 'override' should contain only frames for which you want to keep the bottom field, and similarly 'override2' for the top ones. Is that correct? (No frame should appear in both files.)
I still think you should put in ovrDefault=1 so that only frames specifically mentioned are processed on each pass.
Henox
7th December 2008, 19:29
Exactly, I did what you told me exactly like that. Ok, here is the code :
LoadVFAPIplugin("C:\Program Files\Pegasys Inc\TMPGEnc Plus 2.5\TMPGEnc.vfp","TMPGsource")
TMPGsource("C:\Users\BADA Tudor\Videos\EXAMPLESVIDEO\a.tpr")
FlipVertical
ConvertToYV12()
deint = nnedi(field=0)
Tdeint(mode=0,field=0,edeint=deint,slow=0,ovr="C:\Users\BADA Tudor\Videos\EXAMPLESVIDEO\ovverideb2.txt",ovrDefault=1,full=false,mi=255)
deint = nnedi(field=1)
Tdeint(mode=0,field=1,edeint=deint,slow=0,ovr="C:\Users\BADA Tudor\Videos\EXAMPLESVIDEO\ovverideb.txt",ovrDefault=1,full=false,mi=255)
As you said, I'm going trough the whole video (after ivtcing on tmgpenc) an i try to correct the wrong frames. So I kept some interlaced frames on TMPGenc process which I deinterlace trough the override texts. Adding ovr default=1 is great, so the frames are deinterlaced according to their corresponding field. My problem is that sometimes using tdeint + nnedi like that doesn't work as I would expect it to. There are two situations :
1) Sometimes the frame setted to be deinterlaced are a little blended (compared to those which were only ivtc and on which I don't apply tdeint). You can see a few difference with the other frames ("normal" frames).
2) Second, sometimes it deinterlaces perfectly BUT it deinterlaces some parts at theback of the frame and you can see it's flickering.
Ok, here is an example :
Frame 622 (it's a normal frame, only ivtced)
http://i38.tinypic.com/t8u1q8.jpg
Frame 623 (i kept this one interlaced on TMPGenc, then i'm using TDeint trough one of the override texts, it's setted as 623 + on the override text) :
http://i37.tinypic.com/28tgw7m.jpg
So you can easely see a part on the car is flickering and it's a little blended. Not using Nnedi gives a worst result. In another case it's simply blended, or you can see some bad parts at the back of the frame, like there :
Frame 521 (this one was kept interlaced on TMPGenc, then I deinterlace it with TDeint) :
http://i33.tinypic.com/1z6sk0z.jpg
Frame 522 (normal frame) :
http://i37.tinypic.com/2a5wunc.jpg
You can see soemthing weird the back of frame 521 (compare it to 522, near the house). This part is progressive in the interlaced frame, so tdeint is applying there stupily and you see the result : a difference at the top of the door.
Finally here is another example :
Frame 1989 :
http://i33.tinypic.com/20f6wig.jpg
It's the result after using Tdeint. But you can see somehting red. The frame needs another specific correction. How to solve that ?
To sum up, how could I generaly avoid those problems .
neuron2
7th December 2008, 19:41
You're using state of the art tools. If you want better results, you'll have to try to create a better tool.
Wilbert
7th December 2008, 19:50
Is there also a purple hue on the source itself, or is it caused by a bugged filter?
Henox
7th December 2008, 20:10
Wilbert, unfortunately I don't know the answer.
Henox
7th December 2008, 22:29
But according to my code :
LoadVFAPIplugin("C:\Program Files\Pegasys Inc\TMPGEnc Plus 2.5\TMPGEnc.vfp","TMPGsource")
TMPGsource("C:\Users\...\Videos\EXAMPLESVIDEO\b.tpr")
FlipVertical
ConvertToYV12()
deint = nnedi(field=0)
Tdeint(mode=0,field=0,edeint=deint,slow=0 ,ovr="C:\Users\...\Videos\EXAMPLESVIDEO\ovverideb3.txt",ovrDefault=1,full=false,mi=255)
deint = nnedi(field=1)
Tdeint(mode=0,field=1,edeint=deint,slow=0 ,ovr="C:\Users\...\Videos\EXAMPLESVIDEO\ovverideb4.txt",ovrDefault=1,full=false,mi=255)
Is there somehting to change or configure on nnedi's parameter ? Or is that possible to use soehting else than nnedi ? It seems it's the best interpolator but maybe do I configure somehting else ? Give me some indications and I'll try.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.