VideoHelp Forum
+ Reply to Thread
Results 1 to 9 of 9
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()
    Last edited by Parhelion; 19th Sep 2020 at 07:44.
    Quote Quote  
  2. Posting the source would be more helpful than the output. And you can preview the script before wasting time encoding it. Chances are your script on your setup already exhibits the issue

    Possibly a source filter issue - did you try LSmash instead ?
    Quote Quote  
  3. First of all, thanks for answering!
    I see, no I have not tried LSmash... not familliar with it

    I'll post the source:
    https://mega.nz/file/70h3mYJR#q4O69XOhPYqWggqX93IrHFEmR6iBaL09y-gd0I7HeMI

    this is the .ts file, i converted it to .mkv but I tried encoding both.
    I mean, it looks fine, its just that it plays back really weirdly. When previewing, it plays really awfully as in uh bad fps. This happened to my successful encodes as well, even tho the output was fine the preview was slow...
    Quote Quote  
  4. It's a source filter issue

    Rewrap it into a MKV first with mkvmerge (mkvtoolnix) , then use LSmash . Or if you have nvidia card and license you can use DGSource directly on the TS

    Code:
    src = core.lsmas.LWLibavSource(r'LiSA - Datte Atashi no Hero. [1440x1080i h264 SSTV+].mkv')
    Last edited by poisondeathray; 19th Sep 2020 at 12:20.
    Quote Quote  
  5. Currently trying this out! Atleast the script didnt give me any errors when switching up the source definition, somehow i had "LSmash" installed ^^
    Will let you know if it works!
    Quote Quote  
  6. make sure you're using a recent LSmash release
    https://github.com/HolyWu/L-SMASH-Works/releases
    Quote Quote  
  7. btw is it always better to use LSmash than ffms?
    I had some other scripts and they worked just fine with ffms (de-interlacing DVD Mpeg), should i change those?

    encoding already started ill switch to the latest one if this goes wrong too. mine was 2020 march tho so its recent i guess...
    Quote Quote  
  8. It works!

    Awesome, thanks for the help!
    Quote Quote  
  9. Originally Posted by Parhelion View Post
    btw is it always better to use LSmash than ffms?
    Sometimes one works better in some situations. Sometimes a specific release or build works better. YMMV.

    DGSource is the most consistent, but does not support all formats or pixel types
    Quote Quote  



Similar Threads

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