VideoHelp Forum
+ Reply to Thread
Results 1 to 15 of 15
Thread
  1. Member
    Join Date
    Apr 2010
    Location
    London
    Search PM
    Hello Guys

    ok a few questions can someone please advise the best script for QTGMC deinterlacing

    first of all, there is NO other deinterlacer other than QTGMC that I have seen that can create great looking video play back on digital equipment, the playback from the original interlaced capture and newly created progressive QTGMC is like night and day

    QTGMC converted video is NOT JERKRY / NO INTERLACE ARTIFACTS, plays back buttery smooth

    when I convert interlaced to progressive on adobe premiere and every other transcoding software the result are rubbish compared to QTGMC ?

    Ok so yes we know the original (CAMCORDER) capture at 10bit I have made has all the information stored and ok for archive, but sadly playback of these prores 422 HQ .mov files and any other INTERLACED video files on PC is rubbish and awful looking, because its interlaced and jerky, it looks horrible unless playing back out through my capture card via my pro JVC CRT monitor (analogue Svideo / Composite)


    So now for some magic converting analogue interlaced captured video to playback and look correct on pc/web thus QTGMC, the result are far better than adobe premier or anything else I have seen or used converting interlaced to progressive (deinterlacing).

    It may have something to do with QTGMC creating 50 frames, thus creating a really smooth playback ? I don't know ? but what I do know is the results are amazing and the type of results I would have liked to have seen from the original capture (interlaced pro res) when playing back on the pc!

    A few questions please, QTGMC is very processor hungry taking several hours of conversion for my DV capture to deinterlace

    I have a high end video card is there a CUDA version that works ?? I have seen KTGMC but sure how to create a script to work??

    QTGMC is so SLOOOW even with the high end hardware I have, also I have a powerful video that is not being used by QTGMC when converting/rendering


    Working currently with QTGMC I am trying to create a script file to output the very best acceptable quality for pc/web playback in H.264 from my original DV captures at 10 bit

    Below is the source capture file, so we can see its

    10bit Pro Res 422HQ
    4:3 Ratio
    constant Frame Rate
    Frame rate : 25.000 FPS
    Standard : PAL
    Color space : YUV
    Chroma subsampling : 4:2:2

    720x576.... PAL SIZE

    Below is the captured camcorder file

    Code:
    General
    Complete name                            : C:\JERSEY\JERSEY TAPE 1 Final Interlaced.mov
    Format                                   : MPEG-4
    Format profile                           : QuickTime
    Codec ID                                 : qt   2005.03 (qt  )
    File size                                : 45.5 GiB
    Duration                                 : 1 h 32 min
    Overall bit rate mode                    : Variable
    Overall bit rate                         : 70.3 Mb/s
    Encoded date                             : UTC 2021-08-29 19:29:24
    Tagged date                              : UTC 2021-08-29 19:33:53
    Writing library                          : Apple QuickTime
    TIM                                      : 00:00:00:00
    TSC                                      : 25
    TSZ                                      : 1
    
    Video
    ID                                       : 1
    Format                                   : ProRes
    Format version                           : Version 0
    Format profile                           : 422 HQ
    Codec ID                                 : apch
    Duration                                 : 1 h 32 min
    Bit rate mode                            : Variable
    Bit rate                                 : 68.7 Mb/s
    Width                                    : 720 pixels
    Clean aperture width                     : 703 pixels
    Height                                   : 576 pixels
    Clean aperture height                    : 576 pixels
    Display aspect ratio                     : 4:3
    Clean aperture display aspect ratio      : 4:3
    Frame rate mode                          : Constant
    Frame rate                               : 25.000 FPS
    Standard                                 : PAL
    Color space                              : YUV
    Chroma subsampling                       : 4:2:2
    Scan type                                : Interlaced
    Scan type, store method                  : Interleaved fields
    Scan order                               : Top Field First
    Bits/(Pixel*Frame)                       : 6.629
    Stream size                              : 44.5 GiB (98%)
    Writing library                          : adb0
    Language                                 : English
    Encoded date                             : UTC 2021-08-29 19:29:24
    Tagged date                              : UTC 2021-08-29 19:29:24
    Color primaries                          : BT.709
    Transfer characteristics                 : BT.709
    Matrix coefficients                      : BT.709
    
    Audio
    ID                                       : 2
    Format                                   : PCM
    Format settings                          : Little / Signed
    Codec ID                                 : sowt
    Duration                                 : 1 h 32 min
    Bit rate mode                            : Constant
    Bit rate                                 : 1 536 kb/s
    Channel(s)                               : 2 channels
    Channel layout                           : L R
    Sampling rate                            : 48.0 kHz
    Bit depth                                : 16 bits
    Stream size                              : 1 018 MiB (2%)
    Language                                 : English
    Encoded date                             : UTC 2021-08-29 19:29:24
    Tagged date                              : UTC 2021-08-29 19:29:24

    Now when I create my QTGMC script and convert, the quality is good, but size ad aspect ratio seem to change ??

    when I add various cropping and resizing I seem to loose video at the edge

    I am working with PAL and PAL only so please do not confuse me about NTSC

    Can some one please suggest a good ultra High quality QTGMC script to do what I want



    This is my current AVIsynth script file with some items disabled for testing that I use in Virtualdub2

    I am working with 10bit prores 422 files


    Code:
    SetFilterMTMode("QTGMC",2)
    
    FFMPEGSource2("JERSEY TAPE 1 Final Interlaced.mov",atrack=1)
    
    # ConverttoYV12(interlaced=true)    ONLY GOOD FOR 8bit Video !!
    
    ConvertToYUV422(interlaced=true)  # MY VIDEO CAPTURE IS 10bit     DO I NEED THIS ?? as already 10bit
    
    AssumeTFF() # My Interlacing is TOP FRAME FIRST !
    
    # crop(0, 2, 0, -10)   ??
    #addborders(0,6,0,6)  ??
    #crop(5, 2, -5, -2)   ??
    #Crop(0,0,704,576)  ??
    
    QTGMC(preset="Medium", EdiThreads=3, Sharpness=1)
    
    # BilinearResize(720,540) ??
    #LanczosResize(720,540) ??
    #Spline64Resize(720,540) ??
    
    #LanczosResize(696,520) ??
    
    Prefetch(10) # used for multi thread processing

    I don't understand resizing and cropping etc, please keep it very very simple for me, I just need to understand how to create the right script

    Please also suggest anything that is missing in my script or anything that is wrong, i'm very new to this and trying to learn.



    also when rendering the final script, what is the best and maximum 10bit H.264 MP4 setting i should have ? my current ones are in virtual dub 2 are

    Image
    [Attachment 60568 - Click to enlarge]


    are these acceptable or should I go high bit rate / slow / slower etc. with the settings

    I also not sure about the colour space, I think I am correct by keeping everything 422 YUV


    With my current QTGMC script file with the cropping and resizing disabled the output files gives a different aspect ratio 5:4 why ?
    the original is 4:3

    yet the screen size is still 720 576 ?

    Code:
    General
    Complete name                            : C:\JERSEY\New AviSynth+ Script2.mp4
    Format                                   : MPEG-4
    Format profile                           : Base Media
    Codec ID                                 : isom (isom/iso2/avc1/mp41)
    File size                                : 7.23 MiB
    Duration                                 : 17 s 220 ms
    Overall bit rate mode                    : Variable
    Overall bit rate                         : 3 521 kb/s
    Writing application                      : Lavf57.79.100
    
    Video
    ID                                       : 1
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : High 4:2:2@L3.1
    Format settings                          : CABAC / 4 Ref Frames
    Format settings, CABAC                   : Yes
    Format settings, Reference frames        : 4 frames
    Codec ID                                 : avc1
    Codec ID/Info                            : Advanced Video Coding
    Duration                                 : 17 s 220 ms
    Bit rate                                 : 3 177 kb/s
    Width                                    : 720 pixels
    Height                                   : 576 pixels
    Display aspect ratio                     : 5:4
    Frame rate mode                          : Constant
    Frame rate                               : 50.000 FPS
    Color space                              : YUV
    Chroma subsampling                       : 4:2:2
    Bit depth                                : 10 bits
    Scan type                                : Progressive
    Bits/(Pixel*Frame)                       : 0.153
    Stream size                              : 6.52 MiB (90%)
    Writing library                          : x264 core 157 r2935M 545de2f
    Encoding settings                        : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=18 / lookahead_threads=3 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=81 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
    Color range                              : Limited
    Matrix coefficients                      : BT.470 System B/G
    Codec configuration box                  : avcC


    I really would appreciate some help from an expert who knows about converting high quality captured PAL interlaced video and deinterlacing with QTGMC at the very highest quality in h.264 with perfect crop and resize

    I feel I am well on my way but would like a little more help please


    Thank you in advance



    as you can see below there is a VERY SMALL amount of video that could be cropped around the edges and I guess then resized ?

    but surly once cropped it should be left, to preserve original quality ?

    Won't Resizing (Upscaling slightly) hinder quality ?

    But then cropping only may mess up the aspect ratio oh I'm confused ??? Why is everything such hard work ?

    original Interlaced
    Image
    [Attachment 60569 - Click to enlarge]


    QTGMC
    Image
    [Attachment 60570 - Click to enlarge]



    Regards John
    Last edited by Johnnysh; 4th Sep 2021 at 11:23.
    Quote Quote  
  2. Member DB83's Avatar
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    I'll make a comment or two about the cropping and aspect ratio.


    When it IMO comes down to cropping it all depends if the borders annoy you. And even if you cropped them away watch the vid on a screen wider than your image ie 4:3 on 16:9 the player will add borders regardless. The mediainfo stated that the true image was 703 pixels so there is a total of 13 pixels to crop. Normally one would see 704 pixels so 703 is rather 'odd'.


    Aspect ratio is quite easy to fix. You full image was 720*576 which is 5:4. It was only displayed at 4:3 due to a flag. When you convert you can add a flag but will reply on your player to recognise the flag and not all will do so. You set the PAR at 1:1 which ignores any flag and kept the 720*576. So the fix is to resize to 720*540. This is a good choice if you plan to watch on a 1920*1080 tv since the height is exactly 50%.


    I think the colorspace at 4.2.2 is ok. But what I would find annoying from your sample is that pink edge. Is that on the camera original or due to the capture ?
    Quote Quote  
  3. Set SAR Width to 12, SAR height to 11.

    Regarding speed of QTGMC, are you using a multithreaded build of AviSynth?
    Quote Quote  
  4. Member
    Join Date
    Apr 2010
    Location
    London
    Search PM
    Originally Posted by DB83 View Post
    I'll make a comment or two about the cropping and aspect ratio.


    When it IMO comes down to cropping it all depends if the borders annoy you. And even if you cropped them away watch the vid on a screen wider than your image ie 4:3 on 16:9 the player will add borders regardless. The mediainfo stated that the true image was 703 pixels so there is a total of 13 pixels to crop. Normally one would see 704 pixels so 703 is rather 'odd'.


    Aspect ratio is quite easy to fix. You full image was 720*576 which is 5:4. It was only displayed at 4:3 due to a flag. When you convert you can add a flag but will reply on your player to recognise the flag and not all will do so. You set the PAR at 1:1 which ignores any flag and kept the 720*576. So the fix is to resize to 720*540. This is a good choice if you plan to watch on a 1920*1080 tv since the height is exactly 50%.


    I think the colorspace at 4.2.2 is ok. But what I would find annoying from your sample is that pink edge. Is that on the camera original or due to the capture ?


    Thanks for the info, appreciated,



    Aspect ratio is quite easy to fix. You full image was 720*576 which is 5:4. It was only displayed at 4:3 due to a flag. When you convert you can add a flag but will reply on your player to recognise the flag and not all will do so. You set the PAR at 1:1 which ignores any flag and kept the 720*576. So the fix is to resize to 720*540. This is a good choice if you plan to watch on a 1920*1080 tv since the height is exactly 50%.

    so where did I set the PAR 1:1 should I not have done this ?

    So let me get this straight, the original captured file is at 720*576 which is 5:4 but file info is stating this has an aspect ratio of 4:3 because of a flag setting
    correct ?

    for true 4:3 aspect ratio I need to resize to 720*540 and one would crop first and then resize
    correct ?


    so i'm guessing my script would look like so

    Crop(0,0,720,540)

    QTGMC(preset="Medium", EdiThreads=3, Sharpness=1)
    BilinearResize(720,540)

    would this be correct ?

    Is BilinearResize the best option ? as there are others I have seen?


    BilinearResize(640,480)
    LanczosResize(720,540)
    Spline64Resize(720,540)

    so what you are saying is, it maybe better to live with the original non cropped video ??

    Yes the pink edge is I believe due to not having a TBC and feeding the SVIDEO in to my very high end AJA kona video card with no timebase corrector ??

    I don't get this from my SONY SVO-5800 VHS machine when capturing VHS, I guess I either require an Time base corrector in-between the Sony Hi8 camcorder and capture card or invest in a similar grade of machine as the svo-5800 for Hi8 & mini dv that has onboard TBC


    Thanks for any feed back in advance


    Regards
    Last edited by Johnnysh; 4th Sep 2021 at 12:56.
    Quote Quote  
  5. Member
    Join Date
    Apr 2010
    Location
    London
    Search PM
    Originally Posted by jagabo View Post
    Set SAR Width to 12, SAR height to 11.


    Where do you set the SAR ?? in the script ? or in virtual dub2

    can you please explain thanks



    Regarding speed of QTGMC, are you using a multithreaded build of AviSynth?
    hello thanks for your reply


    how would I know if I'm using multi thread build ?

    Code:
    [OS/Hardware info]
    Operating system:           Windows 10 (x64) (Build 19043)
    
    CPU:                        Intel(R) Xeon(R) CPU E5-2643 v3 @ 3.40GHz / Xeon (Woodcrest)
                                MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, FMA3, AVX, AVX2
                                6 physical cores / 12 logical cores
    
    
    [Avisynth info]
    VersionString:              AviSynth+ 3.7.0 (r3382, 3.7, i386)
    VersionNumber:              2.60
    File / Product version:     3.7.0.0 / 3.7.0.0
    Interface Version:          8
    Multi-threading support:    Yes
    Avisynth.dll location:      C:\WINDOWS\SysWOW64\avisynth.dll
    Avisynth.dll time stamp:    2021-01-11, 15:46:40 (UTC)
    PluginDir2_5 (HKLM, x86):   C:\Users\HP-Z640\AviSynth+\plugins
    PluginDir+   (HKLM, x86):   C:\Users\HP-Z640\AviSynth+\plugins+
    
    
    [C++ 2.6 Plugins (32 Bit)]
    C:\Users\HP-Z640\AviSynth+\plugins+\ConvertStacked.dll  [2021-01-11]
    C:\Users\HP-Z640\AviSynth+\plugins+\DirectShowSource.dll  [2021-01-11]
    C:\Users\HP-Z640\AviSynth+\plugins+\ImageSeq.dll  [2021-01-11]
    C:\Users\HP-Z640\AviSynth+\plugins+\Shibatch.dll  [2021-01-11]
    C:\Users\HP-Z640\AviSynth+\plugins+\TimeStretch.dll  [2021-01-11]
    C:\Users\HP-Z640\AviSynth+\plugins+\VDubFilter.dll  [2021-01-11]
    
    [Scripts (AVSI)]
    C:\Users\HP-Z640\AviSynth+\plugins+\colors_rgb.avsi  [2021-01-11]
    
    [Uncategorized files]
    C:\Users\HP-Z640\AviSynth+\plugins+\colors_rgb.txt  [2021-01-11]




    Code:
    [OS/Hardware info]
    Operating system:           Windows 10 (x64) (Build 19043)
    
    CPU:                        Intel(R) Xeon(R) CPU E5-2643 v3 @ 3.40GHz / Xeon (Woodcrest)
                                MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, FMA3, AVX, AVX2
                                6 physical cores / 12 logical cores
    
    
    [Avisynth info]
    VersionString:              AviSynth+ 3.7.0 (r3382, 3.7, x86_64)
    VersionNumber:              2.60
    File / Product version:     3.7.0.0 / 3.7.0.0
    Interface Version:          8
    Multi-threading support:    Yes
    Avisynth.dll location:      C:\WINDOWS\SYSTEM32\avisynth.dll
    Avisynth.dll time stamp:    2021-01-11, 15:47:06 (UTC)
    PluginDir2_5 (HKLM, x64):   C:\Users\HP-Z640\AviSynth+\plugins64
    PluginDir+   (HKLM, x64):   C:\Users\HP-Z640\AviSynth+\plugins64+
    
    
    [C++ 2.6 Plugins (64 Bit)]
    C:\Users\HP-Z640\AviSynth+\plugins64+\ConvertStacked.dll  [2021-01-11]
    C:\Users\HP-Z640\AviSynth+\plugins64+\DePan.dll  [2.13.1.6]
    C:\Users\HP-Z640\AviSynth+\plugins64+\DePanEstimate.dll  [2.10.0.4]
    C:\Users\HP-Z640\AviSynth+\plugins64+\DirectShowSource.dll  [2021-01-11]
    C:\Users\HP-Z640\AviSynth+\plugins64+\ffms2.dll  [2020-08-22]
    C:\Users\HP-Z640\AviSynth+\plugins64+\ImageSeq.dll  [2021-01-11]
    C:\Users\HP-Z640\AviSynth+\plugins64+\KNNEDI3.dll  [0.9.4.49]
    C:\Users\HP-Z640\AviSynth+\plugins64+\KTGMC.dll  [2018-11-23]
    C:\Users\HP-Z640\AviSynth+\plugins64+\masktools2.dll  [2.2.26.0]
    C:\Users\HP-Z640\AviSynth+\plugins64+\mvtools2.dll  [2.7.45.0]
    C:\Users\HP-Z640\AviSynth+\plugins64+\nnedi3.dll  [0.9.4.59]
    C:\Users\HP-Z640\AviSynth+\plugins64+\RgTools.dll  [1.2.0.0]
    C:\Users\HP-Z640\AviSynth+\plugins64+\Shibatch.dll  [2021-01-11]
    C:\Users\HP-Z640\AviSynth+\plugins64+\TimeStretch.dll  [2021-01-11]
    C:\Users\HP-Z640\AviSynth+\plugins64+\VDubFilter.dll  [2021-01-11]
    
    [Scripts (AVSI)]
    C:\Users\HP-Z640\AviSynth+\plugins64+\colors_rgb.avsi  [2021-01-11]
    C:\Users\HP-Z640\AviSynth+\plugins64+\KSMDegrain.avsi  [2018-02-12]
    C:\Users\HP-Z640\AviSynth+\plugins64+\KTGMC.avsi  [2018-07-08]
    C:\Users\HP-Z640\AviSynth+\plugins64+\QTGMC.avsi  [2021-09-03]
    C:\Users\HP-Z640\AviSynth+\plugins64+\Zs_RF_Shared.avsi  [2021-09-03]
    
    [Uncategorized files]
    C:\Users\HP-Z640\AviSynth+\plugins64+\colors_rgb.txt  [2021-01-11]
    
    
    
    [Plugin errors/warnings]
    _______________________________________________________________________________________________________
    
    Function duplicates:
    
    "undefined" : "[InternalFunction]"
    "Undefined" : "C:\Users\HP-Z640\AviSynth+\plugins64+\Zs_RF_Shared.avsi"
    
    _______________________________________________________________________________________________________
    
    "C:\Users\HP-Z640\AviSynth+\plugins64+\DePanEstimate.dll" requires the FFTW library for some functions.
    
    Note: 'libfftw3f-3.dll' can be downloaded here:
          http://www.fftw.org/install/windows.html
    
          'libfftw3f-3.dll' should be placed in "System32" and/or "SysWoW64"
    _______________________________________________________________________________________________________
    
    "C:\Users\HP-Z640\AviSynth+\plugins64+\mvtools2.dll" requires the FFTW library for some functions.
    
    Note: 'libfftw3f-3.dll' can be downloaded here:
          http://www.fftw.org/install/windows.html
    
          'libfftw3f-3.dll' should be placed in "System32" and/or "SysWoW64"
    _______________________________________________________________________________________________________

    thank you in advance for any hep
    Last edited by Johnnysh; 4th Sep 2021 at 12:42.
    Quote Quote  
  6. -crop 8 from left and 8 right or total 16
    -QTGMC
    -change YUV if you want
    -resize to 4:3, possibly good idea is to keep lines (576) and just stretch them to 768
    -if you still at this point insist to crop some faulty parts, you can do that, but it is not possible to resize it again without getting ar error (if someone upsizes in the future), because your current aspect ratio would be lost (even if shown correctly on screen after this border glitch crop), so good idea is just to mask those border glitches

    vapoursynth script(you do Avisynth, follow pattern):
    Code:
    import vapoursynth as vs
    from vapoursynth import core
    import havsfunc
    clip = core.lsmas.LibavSMASHSource("my_422P10_captured_as_720x576_from_VHS.mp4")
    clip = core.std.Crop(clip, left=8, right=8, top=0, bottom=0)
    clip = havsfunc.QTGMC(clip, Preset='Slower', TFF=True)
    clip = core.resize.Spline36(clip, width=768, height=576) 
    #clip = core.resize.Spline36(clip, width=768, height=576, format=vs.YUV420P8) #if YUV420P8 needed
    clip.set_output()
    Last edited by _Al_; 4th Sep 2021 at 13:09.
    Quote Quote  
  7. Member
    Join Date
    Apr 2010
    Location
    London
    Search PM
    Originally Posted by _Al_ View Post
    -crop 8 from left and 8 right or total 16
    -QTGMC
    -change YUV if you want
    -resize to 4:3, possibly good idea is to keep lines (576) and just stretch them to 768
    -if you still at this point insist to crop some faulty parts, you can do that, but it is not possible to resize it again without getting ar error, because your current aspect ratio would be lost (even if shown correctly on screen), so good idea is just to mask those border glitches

    vapoursynth script(you do Avisynth, follow pattern):
    Code:
    import vapoursynth as vs
    from vapoursynth import core
    import havsfunc
    clip = core.lsmas.LibavSMASHSource("my_422P10_captured_as_720x576_from_VHS.mp4")
    clip = core.std.Crop(clip, left=8, right=8, top=0, left=0)
    clip = havsfunc.QTGMC(clip, Preset='Slower', TFF=True)
    clip = core.resize.Spline36(clip, width=768, height=576) 
    #clip = core.resize.Spline36(clip, width=768, height=576, format=vs.YUV420P8) #if YUV420P8 needed
    clip.set_output()


    thanks for the info

    Sorry I don't really understand ??

    do I resize ?

    don't I resize ?

    should I do nothing ?

    by resizing will i lose aspect ratio or degrade image quality ?

    should I just crop and not resize ?


    should I just capture and do nothing and live with the artefacts around the edge ??



    I'm so confused

    thanks
    Quote Quote  
  8. Member DB83's Avatar
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    Well as I said, the cropping is down to personal choice. Borders have never troubled me.


    Resize is more critical. As it stands the 5:4 display will be slightly distorted. The choice comes down to two camps. I believe that jagabo's method, which will also result in 768*576 - the same that your original video displays as - relies on the player. Al's method forces the frame to 768*576 so will display correctly with all players. The only 'advantage' with 720*540 is the scaling. But if you watch a 4:3 dvd on a 1080p display with no obvious visual distraction it is perfectly good, and native, choice.


    As for the pink I really do not think this would be solved by a TBC. Possibly your high end capture card is 'too good' for the source.
    Quote Quote  
  9. Member
    Join Date
    Apr 2010
    Location
    London
    Search PM
    OK by following DB83 advice and cropping and resizing with the following

    Code:
    Crop(0,0,720,540)
    QTGMC(preset="Medium", EdiThreads=3, Sharpness=1)
    BilinearResize(720,540)
    I get this

    Image
    [Attachment 60571 - Click to enlarge]



    the original was this

    Image
    [Attachment 60572 - Click to enlarge]




    Please note the screen grabs of the two images are not as the same frame time,


    and the media info for the newly cropped and resized file looks good, I'm thinking 4:3 aspect



    General
    Complete name : C:\JERSEY\New AviSynth+ Script2.mp4
    Format : MPEG-4
    Format profile : Base Media
    Codec ID : isom (isom/iso2/avc1/mp41)
    File size : 23.1 MiB
    Duration : 47 s 480 ms
    Overall bit rate mode : Variable
    Overall bit rate : 4 087 kb/s
    Writing application : Lavf57.79.100

    Video
    ID : 1
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : High 4:2:2@L3.1
    Format settings : CABAC / 4 Ref Frames
    Format settings, CABAC : Yes
    Format settings, Reference frames : 4 frames
    Codec ID : avc1
    Codec ID/Info : Advanced Video Coding
    Duration : 47 s 480 ms
    Bit rate : 3 766 kb/s
    Width : 720 pixels
    Height : 540 pixels
    Display aspect ratio : 4:3
    Frame rate mode : Constant
    Frame rate : 50.000 FPS
    Color space : YUV
    Chroma subsampling : 4:2:2
    Bit depth : 10 bits
    Scan type : Progressive
    Bits/(Pixel*Frame) : 0.194
    Stream size : 21.3 MiB (92%)
    Writing library : x264 core 157 r2935M 545de2f
    Encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=17 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=81 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
    Color range : Limited
    Matrix coefficients : BT.470 System B/G
    Codec configuration box : avcC

    Audio
    ID : 2
    Format : AAC LC
    Format/Info : Advanced Audio Codec Low Complexity
    Codec ID : mp4a-40-2
    Duration : 47 s 467 ms
    Bit rate mode : Variable
    Bit rate : 311 kb/s
    Maximum bit rate : 576 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
    Stream size : 1.76 MiB (8%)
    Default : Yes
    Alternate group : 1

    so do we all agree there is nothing wrong with the script settings


    thanks in advance

    Regards
    Quote Quote  
  10. Member
    Join Date
    Apr 2010
    Location
    London
    Search PM
    Is BilinearResize the best option ? as there are others I have seen?


    BilinearResize(640,480)
    LanczosResize(720,540)
    Spline64Resize(720,540)
    Quote Quote  
  11. Member DB83's Avatar
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    Not so sure about the crop line. My interpretation of that is you have removed 36 lines which then renders the resize pointless.


    Better to post the same frame or sample before and after video.
    Quote Quote  
  12. Originally Posted by Johnnysh View Post
    I'm so confused
    Because there is a ton of scripts on web for VHS that confuses you.
    Principle is:
    - crop left and right to 704, cutting 16 pixels, whatever side needs more or less, use multiples by two pixels
    IF your video was captured as 704x576, you do not do that
    -use QTGMC
    -resize to 4:3 (if you encode with SAR in mp4 file you do not do that)
    -can crop more to get rid of border glitches, but I'd simply mask those to keep perfect 4:3 aspect ratio if someone later decides ti upscale. You skip this part for now, focus on getting it up to here
    Code:
    SetFilterMTMode("QTGMC",2) #not using these so just copying
    FFMPEGSource2("JERSEY TAPE 1 Final Interlaced.mov",atrack=1)
    AssumeTFF()
    Crop(left=8, top=0,width=704, height=576)
    QTGMC(preset="Medium", EdiThreads=3, Sharpness=1)
    Spline64Resize(768,576)  #768/576 is 4/3 , I would not use Lanczos, but that is a preference
    #now here you can crop border glitches but you should know the consequences as I explained
    #ConverttoYV12() #if your input was 422
    Prefetch(10) #again, not using this so just copying your code
    Quote Quote  
  13. Member
    Join Date
    Apr 2010
    Location
    London
    Search PM
    Thank you for your reply

    will try your script


    Kind Regards
    Quote Quote  
  14. You're using AviSynth+ so you have a multi threaded build. And the "prefetch(10)" (I missed that earlier) indicates you are enabling mutithreading. So you should be getting good use of your CPU. Without the prefetch the script would be much slower.

    With an ITU standard 720x576 video capture the 4:3 image is in a 704x576 (it's actually closer to 702x576 but most people like to stick with mod 16 frame sizes) portion of that frame. With a 704x576 frame the sample aspect ratio (SAR) is 12:11. (The SAR doesn't change when you crop the frame. Like when you cut the edges off a piece of graph paper the shape of the boxes on the remaining paper is still the same.) If you encode with that frame size and that SAR the player should play the video with a 4:3 frames size like 768x576, 1440x1080, etc. But not all players respect the SAR setting so it's safer to resize the frame yourself and set the SAR to 1:1. So crop to 704x576, QTGMC, then resize to a 4:3 frame size like 704x528, 768x576, etc. Of those two frame sizes the first loses a little vertical resolution. The second keeps the vertical resolution but requires a slightly higher bitrate.

    Regarding which algorithm to use for resizing: Bilinear is the least sharp. Spline64() is sharper. Lanczos is the sharpest. If your source is very sharp you may want to avoid the sharper resizers as they will produce oversharpening halos and aliasing artifacts. Bilinear will reduce oversharpening halos a bit. Use whatever is appropriate for your video. And it's possible to use one resizer for one axis, another for the other axis. So for example you could use a combination like BilinearResize(640,576) followed by Spline64Resize(640x480) to produce a final 640x480 (4:3) frame.
    Quote Quote  
  15. Member
    Join Date
    Apr 2010
    Location
    London
    Search PM
    Thank you very much for your detailed reply

    I will follow what you say and suggest and report back

    Thank you once again


    Regards John
    Quote Quote  



Similar Threads

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