VideoHelp Forum




+ Reply to Thread
Results 1 to 11 of 11
  1. So I have this one video file I made with MakeMKV (sample is attached) from DVD, which is playing tricks on me.
    When I load it directly to VDub2 it is looking fine, but when I load it via avisynth+ script with "LWLibAvVideoSource("G:\Bunco Busters-segment.mkv")" I get distorted picture, like the script made the video interlaced! I tried loading it in VDub2 and Pmod and results are the same.
    What could be the problem? Should I use some other video loader instead of LWLibAvVideoSource?
    Image Attached Thumbnails Click image for larger version

Name:	degradation.png
Views:	40
Size:	1.15 MB
ID:	83855  

    Image Attached Files
    Quote Quote  
  2. The video is soft-telecined. You have to IVTC (Inverse Telecine) it.
    Code:
    LWLibavVideoSource("Bunco Busters-segment.mkv")
    AssumeTFF()
    TFM().TDecimate() #returns 23.976fps progressive frames.
    Alternatively you may change the source filter to BestSource, like
    Code:
    BSSource("Bunco Busters-segment.mkv",rff=false,fpsnum=24000,fpsden=1001)
    Image Attached Files
    Last edited by Sharc; 2nd Dec 2024 at 10:32.
    Quote Quote  
  3. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    Further, if you step through the frames of the original file in VDub, you'll see that the 5th frame is a repeat of the 4th. That's a telltale sign that as Sharc says, a form of telecine has been applied to increase the frame rate from the original 24fps to 29.97 for NTSC DVD/TV.

    The Inverse Telecine (IVTC) process removes that 5th frame and reduces the frame rate back to the original of 23.976 (should be 24 but I understand 23.976 is much easier to do/use in the crazy NTSC world of [inverse] telecine, and nobody will notice the very slight difference).

    Another common telecine is 3:2, where you have 3 "progressive" ie no jaggies frames followed by 2 interlaced frames. Same process to clear.
    Quote Quote  
  4. Thank you, that did the trick!

    So when video is played directly in VirtualDub (without loading it through a script), VirtualDub is reading some flag in mkv container that tells it that that video is telecined, so it looks all nice when I look at it???
    Quote Quote  
  5. Originally Posted by Alwyn View Post
    Further, if you step through the frames of the original file in VDub, you'll see that the 5th frame is a repeat of the 4th. That's a telltale sign that as Sharc says, a form of telecine has been applied to increase the frame rate from the original 24fps to 29.97 for NTSC DVD/TV.

    The Inverse Telecine (IVTC) process removes that 5th frame and reduces the frame rate back to the original of 23.976 (should be 24 but I understand 23.976 is much easier to do/use in the crazy NTSC world of [inverse] telecine, and nobody will notice the very slight difference).

    Another common telecine is 3:2, where you have 3 "progressive" ie no jaggies frames followed by 2 interlaced frames. Same process to clear.
    It's standard 3:2 soft-telecine as you can see from the patterns of Repeat_First_Field (100110011001...) and Top_Field_First (1010101.....) flags.

    Image
    [Attachment 83864 - Click to enlarge]



    You will see the progressive and combed 3:2 frames pattern when using a decent source filter (like LWLibavVideoSource) which respects the pulldown flags.
    The BSSource filter which I proposed as an alternative seems to ignore the pulldown flags correctly, returning the 23.976 progressive frames directly.
    (I prefer the first method for doing the IVTC as I have almost nil experience with the BSSource and I don't know how it would deal with broken patterns).

    The IVTC process has 2 steps:
    - Field matching
    - Decimation (removing the duplicates)
    The process is exactly the same for 29.97i -> 23.97p as for 30i -> 24p
    Last edited by Sharc; 2nd Dec 2024 at 14:06. Reason: Flags sequence added
    Quote Quote  
  6. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    Would it be fair to say that the 4:1 sequence we see in VDub for Tricky's video is because VDub isn't reading the pulldown flags correctly?
    Quote Quote  
  7. Originally Posted by Alwyn View Post
    Would it be fair to say that the 4:1 sequence we see in VDub for Tricky's video is because VDub isn't reading the pulldown flags correctly?
    I don't remember right now how the Vdub source filter behaves in the various cases. For investigating one should better not use anime sources as these normally have extra frame duplications which can be confusing. One should use 'natural' video with motion and inspect the fields sequence for analysis.
    Basically, for clean soft-telecined video it is sufficient to simply ignore the pulldown flags to get the original progressive film frames back. However, just ignoring the flags is not generally recommended because the patters may be broken by bad editing after pulldown has been applied, or the video may have a mix of soft and hard telecine. Therefore it is better to always use a source filter which respects the flags and apply regular IVTC = field matching plus decimation.
    And then there remain the patalogical cases ......

    Anyway, the flags in the OP's source indicated that it was normal 3:2 (aka 2:3) pulldown (starting with frame #32) rather than 2:2:2:4 (aka your "4:1").
    Last edited by Sharc; 3rd Dec 2024 at 04:32.
    Quote Quote  
  8. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    Thanks Sharc.
    Quote Quote  
  9. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    Alwin, one more example here why when investigating fields/frame architecture it is always better to separate the fields with AviSynth (after a proper source filter) rather than rely on VirtualDub internal processing
    Quote Quote  
  10. Different source filters handle MPEG 2 soft pulldown flags differently. Some ignore them by defatult. Some perform the pulldown by default. In AviSynth ffVideoSource() ignores pulldown flags by default (use rffmode=1 to perform the pulldown). LWlibavVideoSource() performs the pulldown.

    The OP's clip is a mix of soft and hard pulldown. With that type of source it's usually safest to apply pulldown flags then inverse telecine from there.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!