View Single Post
Old 24th May 2018, 00:14   #3097  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Quote:
Originally Posted by MrC View Post
Currently IVTC option is greyed out for everything but 29.97 interlaced,
Hi MrC,

I have to admit that I did not test the IVTC option at all since it was introduced by the end of 2016. Now that I looked into it I believe you should change some things about it...

Only allowing it for 29.97 interlaced sources is too limited. First of all not all 29.97 interlaced clips are hard telecined, they could just as well be "truly" interlaced without repeated fields. In such cases TFM will fail because there are no fields to match. MediaInfo is no help for hard telecined sources, it won't tell if there are repeated fields.

And then of course applying IVTC is a standard procedure for soft telecined NTSC sources, it should not be greyed out for such sources.

A general remark about the IVTC implementation:
Right now the following lines are present in the AVS script:
Quote:
Video = Video.TFM.TDecimate
Video = Video.ConvertToYV12()
I believe that the IVTC commands should appear AFTER the ConvertToYV12 command, because TFM and TDecimate both only support YV12 and YUY2. And the commands should be "TFM()" and "TDecimate()", the brackets make it faster.


Now talking about these standard progressive 23.076 NTSC sources which have been encoded with 3:2 soft pulldown. How should A2D treat such clips?

From the Doom9 IVTC tutorial:
Quote:
IVTC ADVICE

FOR NTSC PEOPLE: FORCE FILM WHEN YOU CAN. IVTC WHEN YOU CAN’T FORCE FILM. DEINTERLACE WHEN YOU CAN’T DO EITHER.
But before digging into this I believe it is necessary to talk about semantics to make the behavior of the different source filters consistent.

For such a clip MediaInfo reports "23.976fps, 2:3 pulldown, progressive". All software players and VirtualDub report 29.97fps. I believe that the MediaInfo fps detection is wrong.

The problem with A2D is that whenever DSS2Mod or DirectShowSource or FFmpegSource is used then the frame rate reported by MediaInfo is included in the call for the source filter. This will give incorrect results. If MediaInfo reports 2:3 pulldown then the frame rate for the source filter call should be 29.97 (or it could be omitted).

The reason for this incorrect behavior is that all the above source filters have no option to remove pulldown flags with a "Forced Film" option like DGIndex. They all honor the pulldown flags and serve a "pseudo-interlaced" output to AviSynth.

DGIndex has a "Forced Film" option. When this option is selected then the pulldown flags are removed and AviSynth gets a progressive 23.976 stream from DGDecode.


IMO the way AVStoDVD should address this difference between source filters is to always set the fps to 29.97 as soon as MediaInfo reports pulldown. This way the behavior of all source filters will be consistent (if the DGIndex field option is left at the default "Honor Pulldown Flags").


Now how can A2D follow the advices from the Doom9 IVTC tutorial? The preferred option is "Force Film". Only DGIndex/DGDecode can do this in A2D, and only if users change the "Field Operation" setting to "Forced Film" before starting AVStoDVD. With the default option "Honor Pulldown Flags" DGIndex/DGDecode will send a 29.97 pseudo-interlaced stream to AviSynth like the other source filters.

The next advice "IVTC if you can't force film" means that A2D should not grey out the IVTC option as soon as MediaInfo reports pulldown.

And the last option "Deinterlace if all else fails" means that A2D should not grey out the "Deinterlace" option if MediaInfo reports Pulldown. Right now deinterlacing is not possible for such sources unless the user changes the title properties from Progressive to Interlaced.



Alright, even more things to consider. All of the above only applies to 23.976 progressive sources with standard 3:2 pulldown. But A2D also supports "irregular" pulldown (23.976 -> 25, 24 -> 25, 25 -> 29.97). For such sources MediaInfo does not report the pulldown. So AVStoDVD will treat it as progressive 29.97 which causes terrible results when applying vertical resizing or spatial filters.

The question is if you want to deal with such "irregular pulldown" sources at all. There is no automatic way to do it since MediaInfo does not recognize the pulldown. Of course using "Forced Film" on such sources is desirable, but only experienced users would be able to detect such a source. IVTC would also work, but not with the default parameters. TDecimate would need custom parameters to retrieve the original frame rate.


Well, this post came out much longer than I anticipated, but the problems are real. No idea how important this stuff is for the "Average Joe" user since converting NTSC to PAL is mostly not necessary for users living in PAL land. And the PAL -> NTSC conversions do already work.


Cheers
manolito

Last edited by manolito; 24th May 2018 at 01:25.
manolito is offline   Reply With Quote