VideoHelp Forum




+ Reply to Thread
Results 1 to 30 of 41
  1. Hi I have a DVD which i want to deinterlace correctly as possible and convert the 25FPS to the original FPS. I also like to fix the aspect ratio as DVD is in 4x3 and image is stretched. Also like to to improve on the picture quality.

    Can anyone please take a look and help. I've started a script but I need help on it as im still learning the basics in avisynth. There is a duplicate frame every 22nd frame.

    here is my script so far:
    Code:
    a = LWlibavAudioSource("G:\future projects\Dance of the Drunken Mantis proejct\Demux files\VTS_01_1 T80 2_0ch 192Kbps DELAY 0ms.ac3") # get audio (decompressed to PCM) v = Mpeg2Source("G:\future projects\Dance of the Drunken Mantis proejct\Demux files\VTS_01_1.d2v", Info=3) # get video AudioDub(v,a) TFM() TDecimate(cycle=22, cycleR=1) ColorMatrix(mode="rec.601->rec.709") Crop(10, 0, -8, -0, align=false) Spline36Resize(720, 282)
    here is the DVD source:https://www.swisstransfer.com/d/4c7a532c-8476-493e-adb4-aa24b0870549
    Quote Quote  
  2. i would use something like:
    Code:
    TFM() TDecimate(mode=7, rate=23.976) Crop(10, 2, -8, -0, align=false) ContinuityFixer(bottom=3, radius=2) Spline36Resize(704, 262)
    for the resize, one of these input PARs might be correct
    • 2.00:1 (RKO Superscope / Univisium) => 704x288 (when converting to 1:1 PAR), or
    • 2.20:1 (70mm print) => 704x262 (when converting to 1:1 PAR)

    Cu Selur
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  
  3. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    I opened the VOB with LWLibavVideoSource and LWLibavVideoSource.

    There seems to be only three patches of interlacing at approx 5sec, 23sec and 50sec.

    I did a straight TFM on it and found only one duplicate, at frame 1194.

    TFM gave a frame rate of 25fps, so I just applied AssumeFPS(24, true). "True" allegedly keeps the audio in sync (which appears to be out by 5 frames [audio delayed] in the source VOB).

    Re colours, my understanding is that 709 is only for frame heights of 720 or more ie HD.

    It looks closest to 2.2:1 to me, or maybe a bit wider; 2.39:1 looks OK too.
    Quote Quote  
  4. The source is basically progressive PsF which occasionally changes to phase switched video, e.g. from field #1132 to #1154 and #2390 to #2434, from where onwards it reverts to normal PsF again. Correcting this using TFM() returns duplicate frames #565,566 and #1194,1195 respectively.
    It seems not to follow a standard Telecine/pulldown pattern.....

    Edit:
    This seems to work, returning progressive 24fps:
    Code:
    LWLibavVideoSource("VTS_01_1.VOB") TFM().TDecimate(cycle=25)
    Last edited by Sharc; 14th Mar 2026 at 06:18.
    Quote Quote  
  5. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    In case of dynamic phase shift, telecide works as well (did not try on the sample posted):

    Code:
    Telecide(order=1, guide=2, post=0)
    source: Exotic Interlacing by scharfis_brain
    Quote Quote  
  6. Originally Posted by lollo View Post
    In case of dynamic phase shift, telecide works as well (did not try on the sample posted):

    Code:
    Telecide(order=1, guide=2, post=0)
    source: Exotic Interlacing by scharfis_brain
    Yep. Good ole' Telecide works perfectly on this source as well.

    Edit: named argument 'order' changed to 'back' in version 5.3.0, so
    Code:
    telecide(back=1,guide=2,post=0).Decimate(cycle=25)
    https://www.rationalqm.us/decomb/decombnew.html
    Last edited by Sharc; 14th Mar 2026 at 07:35.
    Quote Quote  
  7. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    I was just about to ask about that...
    Quote Quote  
  8. My speculation about the aspect ratio:
    Assuming the original was released as 16:9 PAL SVCD its PAR (PixelAspectRatio) would be 59/27. Converting the cropped 704x576 .vob to square pixels would make it 704x264 => DAR=2.67.
    Frames around #1450 show a football in the top right corner which looks pretty circular with this assumption (Cinerama and Cinemascope movies were up to 2.66:1 btw.).

    Image
    [Attachment 91508 - Click to enlarge]
    Last edited by Sharc; 14th Mar 2026 at 09:58.
    Quote Quote  
  9. Thank you everyone for your help.
    @Sharc, So i have changed to 704x264 as suggested. Below is a frame from same DVD of the moon in the sky with 704x264. Would you say it looks okay?
    Image
    [Attachment 91509 - Click to enlarge]
    Quote Quote  
  10. ^^^^ The moon looks horizontally stretched. What would the DAR become if you resize it to circular shape?
    Do you watch the 704x264 in square pixels (using Vdub for example), or does the player stretch it anamorphic acc. DVD PAR 16/15?
    Last edited by Sharc; 14th Mar 2026 at 10:58.
    Quote Quote  
  11. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    Assuming that moon is round, it's 2.39:1.

    2.2:1
    Image
    [Attachment 91512 - Click to enlarge]


    2.39:1
    Image
    [Attachment 91513 - Click to enlarge]


    2.55:1
    Image
    [Attachment 91514 - Click to enlarge]


    2.66:1
    Image
    [Attachment 91515 - Click to enlarge]


    How about the colour space?
    Quote Quote  
  12. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    It also needs denoising; a light touch of Temporaldegrain2 and possibly then a bit of sharpening would smarten it up a bit.
    Quote Quote  
  13. Originally Posted by Sharc View Post
    ^^^^ The moon looks horizontally stretched. What would the DAR become if you resize it to circular shape?
    Do you watch the 704x264 in square pixels or does the player stretch it anamorphic acc. DVD PAR 16/15?
    on my plex its normally stretches anamorphic when i watch them. that moon image was saved from AVSpmod.
    Quote Quote  
  14. Originally Posted by Alwyn View Post
    Assuming that moon is round, it's 2.39:1.

    for 2.39.1 Ive changed to Spline36Resize(704, 294). Is this correct?

    2.39:1
    Image
    [Attachment 91513 - Click to enlarge]



    How about the colour space?
    I've used SMDegrain & LSFmod()

    here is updated script:

    Code:
    a = LWlibavAudioSource("G:\future projects\Dance of the Drunken Mantis proejct\Demux files\VTS_01_1 T80 2_0ch 192Kbps DELAY 0ms.ac3") # get audio (decompressed to PCM) v = Mpeg2Source("G:\future projects\Dance of the Drunken Mantis proejct\Demux files\VTS_01_1.d2v", Info=3) # get video AudioDub(v,a) telecide(back=1,guide=2,post=0) Decimate(cycle=25) ColorMatrix(mode="rec.601->rec.709") Crop(10, 2, -8, -0, align=false) Spline36Resize(704, 294) SMDegrain(tr=2,thSAD=300,contrasharp=true,refinemotion=true,lsb=true) LSFmod()
    please let me know if anything needs changing to improve it. many thnanks.
    Quote Quote  
  15. Your 2.39:1 (704x294) looks ~ok based on that moon (although a moon near the horizon may look slightly vertically squashed ....) We will not know exactly because we don't know the format (crop, resize) history of that DVD. Some guesswork remains. Anyway you know how to apply the circle test and draw your conclusions.
    Why change the colormatrix? You can leave this away, it should stay at 601.
    Denoising and sharpening is a matter of personal preference, so it's up to you what looks best to you, on your playback scenario. Your choice is fine I think.
    Last edited by Sharc; 14th Mar 2026 at 12:24.
    Quote Quote  
  16. Thanks Sharc.

    I've done a export using my script and there seems to be some frame blending issue ( interlace maybe) not sure what it is.
    Here is a screenshot:
    Image
    [Attachment 91518 - Click to enlarge]


    Here is short sample of script export file too:
    https://www.swisstransfer.com/d/c2093a4f-fc2c-4ace-abf2-252c98d48f0f

    Can this be fixed ?
    Quote Quote  
  17. Upload the section of the original source so someone may take a look. Your encoded .mp4 file doesn't tell much.
    Quote Quote  
  18. Also I noticed another issue with my script, it seems frames are being removed. see video:
    https://www.swisstransfer.com/d/914d02d9-6d31-436a-a11b-a646d0a802e8

    between frame 140 and 141, don't look smooth. what could be the issue anyone have any idea ?

    this is my script:
    Code:
    a = LWlibavAudioSource("G:\future projects\Dance of the Drunken Mantis proejct\Demux files\VTS_01_1 T80 2_0ch 192Kbps DELAY 0ms.ac3") # get audio (decompressed to PCM) v = Mpeg2Source("G:\future projects\Dance of the Drunken Mantis proejct\Demux files\VTS_01_1.d2v", Info=3) # get video AudioDub(v,a) telecide(back=1,guide=2,post=0) Decimate(cycle=25) Crop(10, 2, -8, -0, align=false) Spline36Resize(704, 294) SMDegrain(tr=2,thSAD=300,contrasharp=true,refinemotion=true,lsb=true) LSFmod()
    This is original DVD source for that part of scene if it helps anyone:
    https://www.swisstransfer.com/d/43de94b4-a583-4453-a706-d7ba93370878
    Quote Quote  
  19. Originally Posted by Sharc View Post
    Upload the section of the original source so someone may take a look. Your encoded .mp4 file doesn't tell much.
    Here it is:
    https://www.swisstransfer.com/d/ff75dd12-0c88-4e38-9ae7-2c2629f0b3df
    Quote Quote  
  20. Try something like
    Code:
    LWLibavVideoSource("VTS_01_1.VOB") assumeTFF() bob().srestore(frate=25) #removes the ghosts Telecide(back=1,guide=2,post=0).Decimate(cycle=25)
    or change the order
    Code:
    LWLibavVideoSource("VTS_01_1.VOB") assumeTFF() Telecide(back=1,guide=2,post=0).Decimate(cycle=25) bob().srestore(frate=24) #removes the ghosts
    Last edited by Sharc; 14th Mar 2026 at 17:58.
    Quote Quote  
  21. Originally Posted by Sharc View Post
    or change the order
    Code:
    LWLibavVideoSource("VTS_01_1.VOB") assumeTFF() Telecide(back=1,guide=2,post=0).Decimate(cycle=25) bob().srestore(frate=24) #removes the ghosts
    Yeah that works for the ghosting, much appreciated. Thanks Sharc.

    I still have the issue with odd frames being removed as mentioned in #18. Any work around that please ?
    Quote Quote  
  22. Originally Posted by Akuma786 View Post
    I still have the issue with odd frames being removed as mentioned in #18. Any work around that please ?
    Your "DVD" source has several issues:
    - Non-compliant Pixel Aspect Ratios for DVD. Therefore some guesswork is needed to resize and play the movie at its intended aspect ratio.
    - The film is encoded PsF but has occasional field drops/inserts which makes it switch between PsF and field-shifted video by toggling the field dominance. Or broken Euro-pulldown, perhaps. Maybe due to a capture or edit issue. Applying TFM or Telecide to regroup the fields may eventually introduce dropped or duplicatied frames.
    - Dropped frames/fields would have to be substituted by synthesized fields/frames from adjacent frames/fields. Requires manual work, or maybe try Selur's 'ContinuityFixer' of post#2 (I don't know it).
    - The framrate conversion (from film to 25fps video) created blended fields (ghosts) - which can be mostly fixed with sRestore, as suggested

    Is your source an original commercial DVD or some processed stuff? I would live with what you have got so far to mitigate the defects. And revisit your former threads where you already got help for similar issues, AFAIK.
    Last edited by Sharc; 15th Mar 2026 at 07:54.
    Quote Quote  
  23. Hi Sharc, yeah my DVD is an original commercial release by a UK Label and its very common in these old kung fu films to be transferred incorrectly as you see here.

    I've tried Selur's 'ContinuityFixer' and that was also eating up good frames too. I've tried other methods yesterday from reading up on google but no luck. From what i read it seems you cant use both srestore and Decimate as both remove frames.
    Quote Quote  
  24. ContinuityFixer does not eat frames,... it's one of the modes of EdgeFixer which I only there to 'fix' the flickering bottom edge,....
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  
  25. Originally Posted by Selur View Post
    ContinuityFixer does not eat frames,... it's one of the modes of EdgeFixer which I only there to 'fix' the flickering bottom edge,....
    Oh I see. From its name I concluded it might be some sort of a 'temporal sequence interpolator' or similar
    Quote Quote  
  26. users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  
  27. Originally Posted by Selur View Post
    ContinuityFixer does not eat frames,... it's one of the modes of EdgeFixer which I only there to 'fix' the flickering bottom edge,....
    Sorry i meant the script you suggested was eating good frames aswel.
    Quote Quote  
  28. update: Everything I tried here was eating up good frames so I went with a different option and kept all frames from the original source and slowed movie to 23.976 fps.

    I used this script:
    Code:
    v = Mpeg2Source("G:\future projects\Dance of the Drunken Mantis proejct\Demux files\VTS_01_1.d2v", Info=3) # get video a = LWlibavAudioSource("G:\future projects\Dance of the Drunken Mantis proejct\Demux files\VTS_01_1 T80 2_0ch 192Kbps DELAY 0ms.ac3") # get audio (decompressed to PCM) AudioDub(v, a) Crop(10, 2, -8, -0, align=false) ContinuityFixer(bottom=3, radius=2) assumeTFF() TFM(order=1) QTGMC(Preset="Slower", InputType=1, TR2=0, EzDenoise=0, SubPel=1, NoiseProcess=2, GrainRestore=0.4) DeHalo_alpha(rx=1.5, ry=1.5, darkstr=1.0, brightstr=1.0) LSFmod(defaults="slow", strength=60, overshoot=1, soft=20) AssumeFPS(24000, 1001, sync_audio=true) Spline36Resize(704, 284) TimeStretch(pitch=100.0 * 25.0 / 23.976)
    It removes ghosting from some scenes but not all of them.

    this script by Sharc using SRestore, fixed ghosting but issue with good frames being removed:

    Code:
    a = LWlibavAudioSource("G:\future projects\Dance of the Drunken Mantis proejct\Demux files\VTS_01_1 T80 2_0ch 192Kbps DELAY 0ms.ac3") # get audio (decompressed to PCM) v = Mpeg2Source("G:\future projects\Dance of the Drunken Mantis proejct\Demux files\VTS_01_1.d2v", Info=3) # get video AudioDub(v,a) assumeTFF() bob().srestore(frate=25) #removes the ghosts Telecide(back=1,guide=2,post=0).Decimate(cycle=25) Crop(10, 2, -8, -0, align=false) Spline36Resize(704, 294)
    Is there a way I can use Sharc's script using SRestore and have the video slowed down like I have and keep all frames without any good frames being eaten up ?
    Quote Quote  
  29. It is basically a progressive video. I would forget trying to deal with it at a field level and instead would simply run this old script of mine:

    Automatically fix dups followed (eventually) by drops
    Quote Quote  
  30. I agree (missed that the source was not interlaced before).
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  



Similar Threads

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