Selur's Little Message Board

Full Version: Problems with de-interlacing
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've processed several 29.97 interlaced videos recently (originally shot on film), and have tried using both TIVTC and sRestore (Avisynth) to go from 29.97 interlaced to 23.976 progressive. However, MediaInfo is reporting the following on the processed files. Am I doing something so obviously wrong I've missed it?


[Image: Screenshot-2026-03-18-at-13-49-56.png]
Judging by the MediaInfo output the container and video scan type info differs.
My guess is that you enabled 'Interlacing' in your ProRes Settings and Hybrid assumes the source is still interlaced while the script returns progressive output or something like that.
Since you didn't care to share a debug output or enough details to exactly say what happens I can't really say what you are doing ...

=> no clue, not enough details to reproduce, so you might want to check what is happening in the script you use.

Cu Selur
I definitely did not enable Interlacing in the ProRes settings. I'll process another video and create a debug file for you to look through for what is causing this.
do that
Here's a debug from my last sRestore project.
Looking at the used VapourSynth script:
Code:
ClearAutoloadDirs()
SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
LoadPlugin("C:\Program Files\Hybrid\64bit\Avisynth\avisynthPlugins\LSMASHSource.dll")
LoadPlugin("C:\Program Files\Hybrid\64bit\Avisynth\avisynthPlugins\hqdn3d.dll")
LoadPlugin("C:\Program Files\Hybrid\64bit\Avisynth\avisynthPlugins\MedianBlur2.dll")
LoadPlugin("C:\Program Files\Hybrid\64bit\Avisynth\avisynthPlugins\grunt-x64.dll")
LoadPlugin("C:\Program Files\Hybrid\64bit\Avisynth\avisynthPlugins\Average.dll")
LoadPlugin("C:\Program Files\Hybrid\64bit\Avisynth\avisynthPlugins\TIVTC.dll")
LoadPlugin("C:\Program Files\Hybrid\64bit\Avisynth\avisynthPlugins\nnedi3.dll")
LoadPlugin("C:\Program Files\Hybrid\64bit\Avisynth\avisynthPlugins\mvtools2.dll")
LoadPlugin("C:\Program Files\Hybrid\64bit\Avisynth\avisynthPlugins\masktools2.dll")
LoadPlugin("C:\Program Files\Hybrid\64bit\Avisynth\avisynthPlugins\RgTools.dll")
Import("C:\Program Files\Hybrid\64bit\Avisynth\avisynthPlugins\mtmodes.avsi")
Import("C:\Program Files\Hybrid\64bit\Avisynth\avisynthPlugins\MCDegrainSharp.avs")
Import("C:\Program Files\Hybrid\64bit\Avisynth\avisynthPlugins\Srestore.avsi")
Import("C:\Program Files\Hybrid\64bit\Avisynth\avisynthPlugins\Zs_RF_Shared.avsi")
Import("C:\Program Files\Hybrid\64bit\Avisynth\avisynthPlugins\QTGMC.avsi")
# loading source: S:\Sinister Trailers\Captures - FCP exports\Dusk To Dawn 07 FCP.mov
# color sampling YV411@8, matrix: bt601, scantyp: bottom field first, luminance scale: limited
LWLibavVideoSource("S:\Sinister Trailers\Captures - FCP exports\Dusk To Dawn 07 FCP.mov",cache=false,format="YUV411P8", prefer_hw=0)
# current resolution: 720x480
# deinterlacing
propDelete("_ChromaLocation")
ConvertToYV12(interlaced=true)
AssumeBFF()
QTGMC(Preset="Slow", ediThreads=2)
# removing ghosting
srestore(frate=23.976,omode=6)
Preroll(Int(last.FrameRate()))
# cropping
Crop(10,4,-6,-6)# 704x470
Levels(0,1.00,255,0,255)
Tweak(sat=0.90)
hqdn3d(cs=3.00,ct=4.50,restart=7)
McDegrainSharp(frames=1)
# scaling to 960x720
nnedi3_rpow2(rfactor=2,cshift="LanczosResize",fwidth=960,fheight=720)
# Converting from 8 to 10bit for encoder
ConvertBits(10)
# adjust color to YV16 (color matrix: Rec601)
ConvertToYUV422()
# setting output fps to 23.97600fps
AssumeFPS(24000,1001)
#  output: color sampling YV16@10, matrix: bt601, scantyp: progressive, luminance scale: limited
return last
the output should be progressive.

Looking at the encoding call:
Code:
"C:\Program Files\Hybrid\64bit\ffmpeg.exe" -y -noautorotate -nostdin -threads 8     -color_range tv -i "M:\5994-2997 Prog-Temp\encodingTempSynthSkript_2026-03-19@16_43_13_0010_0.avs" -an -sn -color_primaries bt470m -color_trc bt709 -colorspace bt470bg -color_range tv  -pix_fmt yuv422p10le -strict -1 -fps_mode auto -r 24000/1001  -vcodec prores_ks -profile:v 2 -vtag apcn -metadata encoding_tool="Hybrid 2026.03.07.1" -aspect 960:720 -f mov "M:\5994-2997 Prog-Temp\Dusk To Dawn 07 FCP_1_2026-03-19@16_43_13_0010_03.mov"
There are no container flags to indicate interlaced signaling.

But FFmpeg does report the input as BFF:
Code:
Input #0, avisynth, from 'M:\5994-2997 Prog-Temp\encodingTempSynthSkript_2026-03-19@16_43_13_0010_0.avs':
  Duration: 01:41:26.00, start: 0.000000, bitrate: 0 kb/s
  Stream #0:0: Video: rawvideo (Y3[10][10] / 0xA0A3359), yuv422p10le(tv, smpte170m/smpte170m/bt709, bottom first), 960x720, 23.98 fps, 23.98 tbr, 23.98 tbn
and consequently the output also BFF too:
Code:
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> prores (prores_ks))
Output #0, mov, to 'M:\5994-2997 Prog-Temp\Dusk To Dawn 07 FCP_1_2026-03-19@16_43_13_0010_03.mov':
  Metadata:
    encoding_tool   : Hybrid 2026.03.07.1
    encoder         : Lavf62.10.101
  Stream #0:0: Video: prores (Standard) (apcn / 0x6E637061), yuv422p10le(tv, bt470bg/smpte170m/bt709, bottom coded first (swapped)), 960x720 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 23.98 fps, 24k tbn
    Metadata:
      encoder         : Lavc62.24.101 prores_ks

=> Seems like the problem is with the AviSynth script or with ffmpeg. I would have assumed that an explicit 'AssumeFrameBased()', wouldn't be necessary and after QTGMC AviSynth should not signal BFF anymore.

I'll look into it.

Cu Selur
Thanks for confirming, this was driving me crazy.
Uploaded a new dev version which explicitly adds 'AssumeFrameBased()' after the deinterlacing.
Hopefully that fixes the problem. (I suspect this is a side effect of newer ffmpeg versions 'better' supporting AviSynth.)

Cu Selur