View Full Version : How to handle soft telecine in Vapoursynth?
Selur
12th September 2020, 07:25
How do one properly handle soft telecine in Vapoursynth?
ffms2 source has no "rffmode"
LWLibavSource does not seem to have a parameter for it
d2vsource, which I only use for mpeg2 based content, states:
DGDecode's traditional "Force FILM" mode isn't really present in this plugin, but if your source or part of it is 100% FILM, which is the only time you should be Force FILMing anyway, You can simply set Force FILM in DGIndex, which will set the framerate properly in the D2V file, and then not apply RFF flags. It's also feasible to trim away any non-FILM frames and still Force FILM.
source: https://github.com/dwbuiten/d2vsource/
which might be a solution on Windows for mpeg-2 content, but what about Linux&Mac ?
-> So what should one use?
Cu Selur
VS_Fan
13th September 2020, 19:56
ret = core.d2v.Source(input=r'C:\path\to\my.d2v', rff=False)
I thought passing rff=False would do the trick. Doesn’t it work?
Selur
15th September 2020, 09:41
Not as I understand the documentation.
Myrsloik
15th September 2020, 09:51
Rff=false is not the same as force film.
The main difference is that force film drops extra fields tobpreserve the framerate. Rff=false doesn't. So unless the material is 100% film the output will differ and be some kind of pseudo vfr.
Selur
15th September 2020, 13:37
@Myrsloik: Do you know a 'proper' way to handle soft telecine in Vapoursynth, or is this something that simply isn't possible using Vapoursynth only atm. ? :)
videoh
15th September 2020, 14:02
DGSource() runs natively under Vapoursynth. Is that not an option for some reason?
Selur
15th September 2020, 16:27
@videoh: you are right for Windows it might be an alternative, if:
a. the source can be decoded by the gpu (true for mpeg2&mpeg4 asp/avc/hevc; not so true for example ProRes and other formats)
b. the user has an NVIDIA graphics card
-> not really a general solution
Cu Selur
videoh
15th September 2020, 16:48
Sure, it's windows with limited video type support. Ever see soft pulldown in a ProRes file? What serious video person would not have an nVidia card? ;)
Seems the only thing you are missing is force-film mode. It would be almost trivial to add that back to D2VSource. I don't know why they removed it. Are there are other things you are missing for generalized Vapousynth operation with pulled-down sources?
BTW, the main use for force-film is when the movie is 100% 3:2 but the credits are not pulled down. In such cases, you get film percentages like 95%. Is this your use case? If not, what is the specific use case that is flummoxing you with the Vapoursynth support? Do you actually have a file that you cannot process properly, or are you just theorizing?
Selur
15th September 2020, 17:58
I have a few files that are soft telecine, I can process them fine with Avisynth, so it's nothing 'serious' in that regard.
Since I move more and more away from Avisynth and often use Linux (and sometimes Mac OS) I wanted to know how to handle 'soft telecine' clips in Vapoursynth, so that I can add proper support for it to Hybrid.
Searching for a Vapoursynth based solution (which I ideally could also use on Linux and Mac OS) I had do realize that it couldn't find how people deal with soft telecine content within Vapoursynth, so I started this thread.
(I assumed that this is something basic and that there should be plenty of ways to deal with it and I simply didn't search with the right 'search terms' or something similar.)
Cu Selur
VS_Fan
15th September 2020, 18:51
The ‘FORCE FILM’ feature in DGIndex was inherited from its predecessor DVD2AVI. Unfortunately, the old DVD2AVI/DGindex Doom9 guides appear to be unavailable now, but a search conducted to this remanent that was last updated on April 2003:
http://foro.doom9.org/ivtc-tut.htm
FORCE FILM is DVD2AVI's way of trying to reverse the telecining process. This is a quite simple function and will therefore fail when there is too much garbage (i.e. NTSC) in the stream. This will present itself in the preview window where the type value will switch between NTSC xx% and FILM yy%. If the final value is FILM at 95% or lower or NTSC at 5% or higher then you will have to use some other method for doing an Inverse Telecine, or IVTC. There are a number of ways of doing this, including using TMPEGEnc, or Avisynth with GreedyHMA, Decomb, IVTC2.2, or IVTC4
This also coincides with manono’s 2017 post in the forum to the same question:
https://forum.doom9.org/showthread.php?p=1808076#post1808076
Does this mean that, if a source was originally 100% film but it gets transferred to DVD as a mix of "hard" and "soft" telecine, Forced Film will deduce the correct fields to drop based purely on the disruptions in the pulldown pattern?
No, it means no such thing. That kind of source is where you find film percentages of less than 100% in the D2V. And if the film percentage is less than the 95% often given as the point below which you shouldn't use 'Forced Film' (although I think it's an arbitrary and misleading figure), you're almost guaranteed to wind up with some interlaced frames and some jerky-playing places.
What's the big deal? Just make the D2V using 'Honor Pulldown Flags' and IVTC it if it's a mix of hard and soft telecine, no matter the percentage. That's much better than going through the whole conversion process and later noticing a few interlaced frames here and there.
Personally, I never used “force film” unless I was 100% sure the subject material was 100% film. Otherwise, I managed to honor (apply) the RFF flags, and then appropriately IVTC’ed using Avi/Vapour-Synth plugins
Passing rff=False to the d2vsource plugin should work just fine if your source material is 100% film (“soft telecine”). I don’t have any clips to test
Myrsloik
15th September 2020, 18:56
I have a few files that are soft telecine, I can process them fine with Avisynth, so it's nothing 'serious' in that regard.
Since I move more and more away from Avisynth and often use Linux (and sometimes Mac OS) I wanted to know how to handle 'soft telecine' clips in Vapoursynth, so that I can add proper support for it to Hybrid.
Searching for a Vapoursynth based solution (which I ideally could also use on Linux and Mac OS) I had do realize that it couldn't find how people deal with soft telecine content within Vapoursynth, so I started this thread.
(I assumed that this is something basic and that there should be plenty of ways to deal with it and I simply didn't search with the right 'search terms' or something similar.)
Cu Selur
It's easy to implement the actual force film algorithm, it's just that none of us really ever had a use case for it. Come to think of it rff=false never really had a use either but at least that was trivial to implement.
Patches welcome I guess.
videoh
15th September 2020, 20:07
Personally, I never used “force film” unless I was 100% sure the subject material was 100% film. Haha, that's funny. If it's 100% soft 3:2, then ignore-pulldown and force-film have identical results (if you set the frame rate back in the case of ignore-pulldown), so there's no need for force-film in such cases.
Patches welcome I guess. Talking about D2VSource? Sounds like fun. Could be my first patch LOL. Then Selur will say "but it doesn't support ProRes and AV1".
VS_Fan
15th September 2020, 22:37
Haha, that's funny. If it's 100% soft 3:2, then ignore-pulldown and force-film have identical results (if you set the frame rate back in the case of ignore-pulldown), so there's no need for force-film in such cases.Exactly, I was implying that the force-film feature, in my opinion, is not only unnecessary, it is inconvenient. If you want to deal with 100% film material, you might just ignore the pull-down flags. For that you can use open-source plugins (d2vsource with rff=False) on windows, linux and macos. And this, if I'm not mistaken, is what Selur was asking in the first post
Richard1485
16th September 2020, 00:34
Before using VapourSynth, one could try running the video through tsMuxeR (cross platform) and using it to remove the pulldown. Of course, this method also presupposes 100% soft telecine, but it's another option.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.