View Full Version : need help with deinterlacing
kool
30th December 2009, 21:43
Hello,
Here is a short 15 sec sample (http://www.sendspace.com/file/n975n9), hope it is enough for testing, I have some DVDs which has the same problem, and I'm planing make backup of them using xvid or x264 codec,
in this source i have found 1 progressive frame in 6 frames and other 5 are interlace, "hope I examine it right :)" and here, as per my knowledge of examining DVD source, IVTC is out of question,
I thought why not ask my question here and by main time I will learn also.
so far my guess was to use srestore, but I'm not sure how right I'm :confused:
Yadif(Mode=1,Order=0)
SRestore()
I will appropriate to show me the proper way of examining DVD source and how to deal with them.
Thank you very much.
BoysBoysBoys
31st December 2009, 07:37
I am a newbie myself, but I just got some help on this the other day. I looked at your source and it is definitely top field first, so you need to change your script to:
Yadif(mode=1, order=1)
Srestore()
From testing this script with your sample I got pretty good results, but I am not sure it's perfect.
kool
1st January 2010, 10:52
but when I check the d2v for for whole movie, it shows as a bottom filed, maybe it is something related with cutting sample, which shows top field. I'm also trying to understand what is the good solution for such a DVDs, keep them at 29.976, 25 or 24.975 and which system or filter to use.
I tried it with Srestore() it brings the frame rate to 25, yah things looks fine, and using Srestore(frate.24.975) looks closer but I think I see more dube frames. hard to say what is right.
manono
1st January 2010, 13:44
The sample was definitely TFF. It's possible that the entire movie itself is BFF. If the field order is incorrect you'll get one heck of a lot of blended frames out of SRestore.
As for whether it's 25fps or 24.975fps, in my opinion most of those things are really 24.975fps. The RePAL filter will give you 24.975fps:
Yadif(mode=1, order=1)
RePAL()
and I usually use it myself. If you're reencoding for DVD, encode at 720x480 and 25fps (25fps in the encoder). Afterwards run the MPV through DGPulldown with the 'Custom' box checked and 24.975->29.97fps filled in, and that'll give you an NTSC compliant M2V ready for authoring with Muxman or whatever you like to use.
kool
1st January 2010, 14:00
Thank you manono for suggestion, I will do as you recommend, the entire movie is BFF
The RePAL filter will give you 24.975fps:
Yadif(mode=1, order=1)
RePAL()
Just a question, if I want to do the same operation with Srestore()
Yadif(mode=1, order=1)
Srestore(frate=24.975) is this the right way?
http://i50.tinypic.com/hs6rmg.png
I'm encoding to MKV.
* Could you point me to the right version of RePAL.
* One more thing I want to know, in what kind of situation there is need for Srestore?
Edit:
I serve the script into AvsP without any processing, set the field order to BFF and I found that it jump back left a little, but when I set it to TFF it moves steadily to the right. Now when the DGIndex report it BFF, than how it is TFF?
manono
1st January 2010, 15:56
You can find RePAL and most 3rd party AviSynth filters here:
http://avisynth.org/warpenterprises/
Many of the rest, including many of the functions, you can find here:
http://avisynth.org/mediawiki/External_filters
So, if using Yadif, RePAL, with a BFF source:
Yadif(mode=1, order=0)
RePAL#or Srestore() or SRestore(FRate=24.975)
You can also use SRestore with equal success, usually. It's in no way inferior to RePAL, and can be used for just about any 'base' framerate, where RePAL can only give you back 24.975fps, and isn't suitable for all blended sources.
Now when the DGIndex report it BFF, than how it is TFF?
Maybe it changed after a few black frames at the beginning. Maybe it was set wrong in the encoder. I don't know. To find the field order:
AssumeTFF()
SeparateFields()
If it moves smoothly, it's TFF. If it goes back-and-forth, it's really BFF.
kool
2nd January 2010, 12:30
Thanks manono once again for the help, I want to know one thing, what is the differences between 25.000 and 24.976 Fps, when the source is at 29.976? I know 25.000 is the frame rate for PAL, but here when the source is at 29.976 and we have to deinterlace it, so here in which kind of situation we can have 25.000 and in when 24.975?
n0an
2nd January 2010, 12:46
Thanks manono once again for the help, I want to know one thing, what is the differences between 25.000 and 24.976 Fps, when the source is at 29.976? I know 25.000 is the frame rate for PAL, but here when the source is at 29.976 and we have to deinterlace it, so here in which kind of situation we can have 25.000 and in when 24.975?
I was actually going to post that question. So, whats hint to chose 25.000 or 24.975? :confused:
manono
2nd January 2010, 13:08
I want to know one thing, what is the differences between 25.000 and 24.976 Fps,?
About 1 frame every 40 seconds.
If you make it 25fps and it's really supposed to be 24.975fps, that allows an extra frame every 40 seconds for some kind of screwup. However, I almost always use 24.975fps. My reasoning is this:
30fps is to 29.97fps as
24fps is to 23.976fps as
25fps is to 24.975fps.
Because of the drop frame flag, I figure almost all of them are supposed to be 24.975fps and that's the way I usually make them unless there a good reason not to (too many blended frames coming out of the unblender). No unblender will do a perfect job, particularly when the pattern changes, after some scene changes. You just try and do the best you can with the tools at your disposal.
Other people may do it differently. You asked me and I told you how I do it. The advice is worth about what you paid for it. Maybe someone else will come along and tell you they're all supposed to be 25fps.
kool
2nd January 2010, 16:48
OK...
I have searched for RePAL, there I found 2 different version of it, the one which is at warpenterprises (http://avisynth.org/warpenterprises/) and one here (http://forum.doom9.org/showthread.php?p=1092552#post1092552) which some members call it new version of RePAL. Now what is my question which one you suggest me to use?
with the Bach version I get 24.975fps but with the plugh I get 25.000fps
n0an
2nd January 2010, 17:24
About 1 frame every 40 seconds.
If you make it 25fps and it's really supposed to be 24.975fps, that allows an extra frame every 40 seconds for some kind of screwup. However, I almost always use 24.975fps. My reasoning is this:
30fps is to 29.97fps as
24fps is to 23.976fps as
25fps is to 24.975fps.
Because of the drop frame flag, I figure almost all of them are supposed to be 24.975fps and that's the way I usually make them unless there a good reason not to (too many blended frames coming out of the unblender). No unblender will do a perfect job, particularly when the pattern changes, after some scene changes. You just try and do the best you can with the tools at your disposal.
Other people may do it differently. You asked me and I told you how I do it. The advice is worth about what you paid for it. Maybe someone else will come along and tell you they're all supposed to be 25fps.
Okay, so how to decide between 23.976 and 24.975? After de-interlacing, I always restored to 23.975 (Film) until I heard of 24.975. Does the same drop frame lag logic apply here?
manono
2nd January 2010, 18:49
Now what is my question which one you suggest me to use?
I can only tell you that I use Bach's version. You can decide for yourself which you want to use, or if you would rather use SRestore instead.
Okay, so how to decide between 23.976 and 24.975?
Fieldblended 23.976->29.97fps exists, but it's fairly rare. If you come across it you use SRestore. If you have PAL2NTSC 24.975fps, you can decide if you want to slow it to its original 23.976fps speed with an AssumeFPS(23.976) in your script. That also means slowing the audio to maintain the synch. I usually do it myself.
n0an
3rd January 2010, 03:38
I can only tell you that I use Bach's version. You can decide for yourself which you want to use, or if you would rather use SRestore instead.
Fieldblended 23.976->29.97fps exists, but it's fairly rare. If you come across it you use SRestore. If you have PAL2NTSC 24.975fps, you can decide if you want to slow it to its original 23.976fps speed with an AssumeFPS(23.976) in your script. That also means slowing the audio to maintain the synch. I usually do it myself.
Oh so 24.975 is to bring back PAL>NTSC sources back to PAL? If so, how do we know if the source has a PAL > NTSC conversion. I know NTSC (from film) is 60i (field-rate), but PAL? :confused: I am a bit confused here.
manono
3rd January 2010, 05:57
The reason you would us an unblender such as RePAL or SRestore on an NTSC DVD is because the master they used for the NTSC DVD came from a PAL 25fps source and it was converted to NTSC by resizing to 720x480 and fieldblending so that it outputs 59.94 fields per second.
I prefer to take an extra step and slow it to 23.976fps in order to make the movement more 'natural' and to get rid of the off-pitch and speeded up audio.
However you do it you're not making a PAL DVD out of it unless you want to resize it for PAL (720x576) while you're at it.
...how do we know if the source has a PAL > NTSC conversion?
For about 99% of the DVDs out there, the fact that it's fieldblended is the evidence. But there are other ways to tell.
n0an
3rd January 2010, 07:06
oh I see. Mind sharing the other ways to tell PAL > NTSC? :)
manono
3rd January 2010, 09:04
There are several ways to tell. Sometimes one works but another might not. Here are a couple. Look at the unfiltered and interlaced frames. In every 6 frame cycle 1 or 2 will look to be progressive while the rest of the 6 will be interlaced. So, when advancing frame-by-frame where p=progressive and i=interlaced, it might go:
piiiii piiiii piiiii
Another is to put on a bobber followed by SREstore set for 29.97fps output:
Yadif(Order=1,Mode=1)
SRestore(FRate=29.97)
In every 6 frame cycle, 5 will be unique frames while the 6th will be a duplicate frame.
n0an
3rd January 2010, 21:16
Ah I see. Will look out for this pattern :). Thanks!
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.