This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

[HELP] 25i to 29.97i with interpolation
25p to 29.97i:
  • loading a 25p source
  • setting "Filtering->Vapoursynth->Misc->Script->Finter interlace handling' to 'QTGMC(preset="Fast")'.
  • enabling "Filtering->Vapoursynth->Frame->Interpolation"
  • setting "Filtering->Vapoursynth->Frame->Interpolation" to "Interframe/SVP"
  • setting "Filtering->Vapoursynth->Frame->Interpolation->Interframe/SVP->FPS" to "59.94"
  • setting "Filtering->Vapoursynth->Frame->Interpolation->Interframe/SVP->Tuning" to "smooth"
  • enabling "Filtering->Vapoursynth->Frame->Interpolation->Interframe/SVP->GPU" (if your gpu is supported by SVP)
  • settinng "Prores->Interlacing" to either 'top field first' or 'bottom field first'
  • Vapoursynth script now looks like this:
    # Imports
    import vapoursynth as vs
    import os
    import sys
    # getting Vapoursynth core
    core = vs.core
    # Import scripts folder
    scriptPath = 'i:/Hybrid/64bit/vsscripts'
    sys.path.insert(0, os.path.abspath(scriptPath))
    # Loading Plugins
    # Import scripts
    import havsfunc
    # source: 'G:\TestClips&Co\files\test.avi'
    # current color space: YUV420P8, bit depth: 8, resolution: 640x352, fps: 25, color matrix: 470bg, yuv luminance scale: limited, scanorder: progressive
    # Loading G:\TestClips&Co\files\test.avi using LWLibavSource
    clip = core.lsmas.LWLibavSource(source="G:/TestClips&Co/files/test.avi", format="YUV420P8", stream_index=0, cache=0, fpsnum=25, prefer_hw=0)
    # Setting color matrix to 470bg.
    clip = core.std.SetFrameProps(clip, _Matrix=5)
    clip = clip if not core.text.FrameProps(clip,'_Transfer') else core.std.SetFrameProps(clip, _Transfer=5)
    clip = clip if not core.text.FrameProps(clip,'_Primaries') else core.std.SetFrameProps(clip, _Primaries=5)
    # Setting color range to TV (limited) range.
    clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
    # making sure frame rate is set to 25
    clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
    clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=0)
    # adjusting frame count with Interframe/SVP
    clip = havsfunc.InterFrame(clip, Tuning="smooth", NewNum=60000, NewDen=1001, GPU=True) # new fps: 59.94
    # converting progressive to interlaced for 'progressive to interlaced (1)'
    clip = core.std.SeparateFields(clip=clip, tff=True)
    clip = core.std.SelectEvery(clip=clip, cycle=4, offsets=[0, 3])
    clip = core.std.DoubleWeave(clip=clip, tff=True) # resolution 640x352
    clip = core.std.SelectEvery(clip=clip, cycle=2, offsets=0) # new fps: 29.97
    clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=2)
    # adjusting output color from: YUV420P8 to YUV422P10 for ProResModel
    clip = core.resize.Bicubic(clip=clip, format=vs.YUV422P10, range_s="limited")
    # set output frame rate to 29.97fps
    clip = core.std.AssumeFPS(clip=clip, fpsnum=30000, fpsden=1001)
    # Output
    for me

Adding a new job and processing that job, creates:
ID                                       : 1
Format                                   : ProRes
Format version                           : Version 0
Format profile                           : 422 Proxy
Codec ID                                 : apco
Duration                                 : 17 s 151 ms
Bit rate mode                            : Variable
Bit rate                                 : 5 591 kb/s
Width                                    : 640 pixels
Height                                   : 352 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 29.970 (30000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:2
Scan type                                : Interlaced
Scan type, store method                  : Separated fields (2 fields per block)
Scan order                               : Top Field First
Bits/(Pixel*Frame)                       : 0.828
Stream size                              : 11.4 MiB (100%)
Writing library                          : Lavc

=> works here.

Cu Selur
Can I go also go from an NTSC 29.97i capture to upscaled 29.97i/59.94?
NTSC 29.97 interlaced -> upscaled 29.97i:
Load the source, set output to interlaced and upscale.

NTSC 29.97 interlaced -> upscaled 59.94p:
Load the source, bob deinterlacing and upscaling.

NTSC 29.97 telecined -> upscaled 29.97i:
Load the source, set output to interlaced, apply IVTC, upscale, interpolate frames.
(instead of IVTC, one could also bob deinterlaced and use FillDrops to replace the duplicates with interpolated frames)

NTSC 29.97 telecined -> upscaled 59.94p:
Load the source, apply IVTC, upscale, interpolate frames.
(instead of IVTC, one could also bob deinterlaced and use FillDrops to replace the duplicates with interpolated frames)

Cu Selur
The 29.97i capture is from an NTSC VHS which was originally shot in the UK on 25i video, then converted to 29.97 for its USA video release back in the 1990s. I'd like to leave it as 29.97i/59.94 for its USA Blu-ray premiere Smile

I just tried the same settings I have been using for 25i and it seems to work OK.
What is the difference between 29.97i and 59.94?
Different frame rates and one is interlaced while the other is progressive.
Is there be any benefit to convert the 29.97 interlaced fields to 59.94 progressive frames? I've seen this done on some Blu-ray releases.
a. Not having the playback device having to deal with the deinterlacing. (Some devices do a good job, others don't. Clients are usually not happy if the content they are presented with shows combing artifacts, even when it's their equipment that is faulty)
b. While at it, additional filtering can be applied.
(+ you can sell a DVD->Blu-ray conversion, but better than a Blu-ray with 1:1 copied DVD content, even though the standard supports it)
c. Tons of DVD releases are a mess since folks mixed progressive, interlaced, telecined, field shifted content (thinking about tons of anime and sci-fi dvd releases). Handling progressive content in an NLE is more straight forward and thus hopefully avoids such botched up releases.
d. Encoding progressive content usually is more effective than encoding interlaced content. Newer formats more and more drop support for interlaced content.
Would the 59.95 progressive file still have that "video" look? After all, the content I'm working with was shot on videotape. It would be a shame to lose the analogue appeal of the original videotape footage. I guess I can only try and see how it looks.
Quote: I guess I can only try and see how it looks.
Yup, best test it for yourself. Smile

Forum Jump:

Users browsing this thread: 1 Guest(s)