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?
+ Reply to Thread
Results 1 to 11 of 11
-
-
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.
Code:BSSource("Bunco Busters-segment.mkv",rff=false,fpsnum=24000,fpsden=1001)
Last edited by Sharc; 2nd Dec 2024 at 10:32.
-
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. -
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??? -
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.
[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 -> 24pLast edited by Sharc; 2nd Dec 2024 at 14:06. Reason: Flags sequence added
-
Interesting spiel on 3:2 and 4:1 Pulldown.
https://partnerhelp.netflixstudios.com/hc/en-us/articles/215623087-ANALYZER-TelecineDe...icate%20frames. -
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.
-
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
-
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.
Similar Threads
-
VirtualDub no longer loading AVISynth
By a1s2d3f4q1w2e3 in forum Newbie / General discussionsReplies: 9Last Post: 9th Apr 2024, 09:18 -
Device that turns 30P video into 60i output - which deinterlacing method?
By daygecko in forum Capturing and VCRReplies: 36Last Post: 28th Jan 2022, 14:21 -
Garbage video with one field messed up
By benzio in forum RestorationReplies: 19Last Post: 25th Apr 2020, 10:41 -
Editing a 100MB video file turns into 1.5GB file!! How to control size?
By GoodEnough in forum Newbie / General discussionsReplies: 3Last Post: 2nd Apr 2020, 23:27 -
Loading hevc GoPro Hero 7 Black video in Virtualdub
By luizpalucci in forum Newbie / General discussionsReplies: 3Last Post: 29th Jan 2020, 12:57