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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > VapourSynth

Reply
 
Thread Tools Search this Thread Display Modes
Old 12th September 2020, 07:25   #1  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
How to handle soft telecine in Vapoursynth?

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:
    Quote:
    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
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 13th September 2020, 19:56   #2  |  Link
VS_Fan
Registered User
 
Join Date: Jan 2016
Posts: 98
Code:
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?

Last edited by VS_Fan; 13th September 2020 at 19:59.
VS_Fan is offline   Reply With Quote
Old 15th September 2020, 09:41   #3  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
Not as I understand the documentation.
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 15th September 2020, 09:51   #4  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
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.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 15th September 2020, 13:37   #5  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
@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. ?
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 15th September 2020, 14:02   #6  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
DGSource() runs natively under Vapoursynth. Is that not an option for some reason?
videoh is offline   Reply With Quote
Old 15th September 2020, 16:27   #7  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
@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
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 15th September 2020, 16:48   #8  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
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?

Last edited by videoh; 15th September 2020 at 16:57.
videoh is offline   Reply With Quote
Old 15th September 2020, 17:58   #9  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
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
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 15th September 2020, 18:51   #10  |  Link
VS_Fan
Registered User
 
Join Date: Jan 2016
Posts: 98
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
Quote:
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.p...76#post1808076
Quote:
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
VS_Fan is offline   Reply With Quote
Old 15th September 2020, 18:56   #11  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
Quote:
Originally Posted by Selur View Post
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.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 15th September 2020, 20:07   #12  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
Quote:
Originally Posted by VS_Fan View Post
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.

Quote:
Originally Posted by Myrsloik
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".

Last edited by videoh; 15th September 2020 at 20:13.
videoh is offline   Reply With Quote
Old 15th September 2020, 22:37   #13  |  Link
VS_Fan
Registered User
 
Join Date: Jan 2016
Posts: 98
Quote:
Originally Posted by videoh View Post
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
VS_Fan is offline   Reply With Quote
Old 16th September 2020, 00:34   #14  |  Link
Richard1485
Guest
 
Posts: n/a
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.
  Reply With Quote
Reply

Tags
soft telecine

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:42.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.