VideoHelp Forum
+ Reply to Thread
Results 1 to 6 of 6
Thread
  1. So I have this file im trying to deinterlace in vapoursynth:

    General
    Unique ID : 161074302322831112421039471205135936440 (0x792DC83F02FF020EEC453F22B56FEBB8)
    Complete name : C:\source.mkv
    Format : Matroska
    Format version : Version 4
    File size : 204 MiB
    Duration : 3 min 57 s
    Overall bit rate mode : Variable
    Overall bit rate : 7 181 kb/s
    Encoded date : UTC 2020-09-19 09:00:05
    Writing application : mkvmerge v50.0.0 ('Awakenings') 64-bit
    Writing library : libebml v1.4.0 + libmatroska v1.6.2

    Video
    ID : 1
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : Main@L4
    Format settings : CABAC / 4 Ref Frames
    Format settings, CABAC : Yes
    Format settings, Reference frames : 4 frames
    Format settings, GOP : M=4, N=28
    Codec ID : V_MPEG4/ISO/AVC
    Duration : 3 min 57 s
    Bit rate mode : Variable
    Bit rate : 7 036 kb/s
    Maximum bit rate : 20.0 Mb/s
    Width : 1 440 pixels
    Height : 1 080 pixels
    Display aspect ratio : 16:9
    Frame rate mode : Variable
    Frame rate : 59.940 (59940/1000) FPS
    Original frame rate : 29.970 (30000/1001) FPS
    Standard : Component
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Interlaced
    Scan type, store method : Separated fields
    Scan order : Top Field First
    Bits/(Pixel*Frame) : 0.075
    Stream size : 200 MiB (98%)
    Default : Yes
    Forced : No
    Color range : Limited
    Color primaries : BT.709
    Transfer characteristics : BT.709
    Matrix coefficients : BT.709

    Audio
    ID : 2
    Format : AAC LC
    Format/Info : Advanced Audio Codec Low Complexity
    Codec ID : A_AAC-2
    Duration : 3 min 56 s
    Bit rate : 141 kb/s
    Channel(s) : 2 channels
    Channel layout : L R
    Sampling rate : 48.0 kHz
    Frame rate : 46.875 FPS (1024 SPF)
    Compression mode : Lossy
    Delay relative to video : 887 ms
    Stream size : 3.97 MiB (2%)
    Default : Yes
    Forced : No


    It was originally converted from a .ts. Trying to de-interlace it with QTGMC (I have gotten a lot of help from my friend doing this).
    However, the output video is playing in "slowmo" almost. And it stops at ~halfway through, although the time it takes to get there is the same as the length of the source video. I don't understand what is going on. I will post my script as an attachement.

    I searched up a bit and it might be the variable framrate of the source creating issues? I have re-encoded this around 4 times now every time with the same issue. The reason the script says 1920x1080 and the output file this time is 1440x1080 is because I tested changing the resolution if that had something to do with the issue.

    My Script: https://mega.nz/file/C0w3QLwT#N4ObLeGyLPtMisWvr5E5YML0kKkL7AUbChAjocVhJPw

    Its also way at the bottom.

    My output file mediainfo:

    https://mega.nz/file/XwxAQQYD#3gCA3-1GlLYQpKmo47nYatOlPMxeN5hWMMIa5GuMMOg
    Output file link

    General
    Complete name : C:VideoHDTV.mkv
    Format : Matroska
    Format version : Version 2
    File size : 248 MiB
    Duration : 3 min 57 s
    Overall bit rate : 8 726 kb/s
    Writing application : x264 r3018 db0d417
    Writing library : Haali Matroska Writer b0

    Video
    ID : 1
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : High 10@L5
    Format settings : CABAC / 16 Ref Frames
    Format settings, CABAC : Yes
    Format settings, Reference frames : 16 frames
    Codec ID : V_MPEG4/ISO/AVC
    Duration : 3 min 57 s
    Bit rate : 8 553 kb/s
    Width : 1 440 pixels
    Height : 1 080 pixels
    Display aspect ratio : 4:3
    Frame rate mode : Constant
    Frame rate : 23.976 (24000/1001) FPS
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 10 bits
    Scan type : Progressive
    Bits/(Pixel*Frame) : 0.229
    Stream size : 243 MiB (98%)
    Writing library : x264 core 161 r3018 db0d417
    Encoding settings : cabac=1 / ref=16 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=10 / psy=1 / psy_rd=0.80:0.00 / mixed_ref=1 / me_range=32 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-2 / threads=9 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=0 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=16 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=360 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=crf / mbtree=1 / crf=16.0 / qcomp=0.65 / qpmin=0 / qpmax=81 / qpstep=4 / ip_ratio=1.40 / aq=3:0.80
    Language : English
    Default : Yes
    Forced : No




    import vapoursynth as vs
    import havsfunc as haf
    import fvsfunc as fvf
    import functools as functools

    core = vs.core
    core.max_cache_size = 1024 * 8


    src = core.ffms2.Source(r"source.mkv").resize.Spline36(1 920, 1080)

    def Deint(n, f, orig, deint):
    if f.props._Combed:
    return deint
    else:
    return orig

    ivtc = core.vivtc.VFM(src, mode=3, chroma=False, cthresh=8, blockx=32, blocky=32, order=1)
    deint = haf.QTGMC(src, TFF=True, Sharpness=0, Preset="Placebo", TR0=2, TR1=2, TR2=1, Lossless=2, SourceMatch=1, FPSDivisor=2)

    combProps = core.tdm.IsCombed(ivtc, metric=1, chroma=False, cthresh=5, blockx=32, blocky=32, mi=90)
    fin = core.std.FrameEval(ivtc, functools.partial(Deint, orig=ivtc, deint=deint), combProps)
    fin = core.vivtc.VDecimate(fin).std.AssumeFPS(fpsnum=240 00, fpsden=1001)

    fin = fvf.Depth(fin, 10)
    fin.set_output()
    Quote Quote  
  2. I think that AssumeFPS() at the end cannot be there, to just put assume fps at the end so it matches what I want does not work.

    And input is 60p so that might not work with that script.
    It might be useful to post cut out of original clip not outcome.
    Quote Quote  
  3. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Output file not much use, post some of the source
    Quote Quote  
  4. That video (in the thread _Al_ linked to) is telecined film. It should be inverse telecined, not deinterlaced. In AviSynth you would TFM().TDecimate(). I believe those (or some thing like them) are available in Vapoursynth.
    Quote Quote  
  5. VFM / VDecimate is vapoursynth's equivalent of TFM / TDecimate . (But there are some differences)

    He's IVTCing, but using QTGMC as post processing for combed frames
    Quote Quote  



Similar Threads

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