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] Passing interlaced content
#1
Hi! Is there a way to pass interlaced content w/o deinterlacing it? The only option I found was overwriting scan type to progressive but that would require adding at least AssumeTFF somewhere up in the chain...
I need to re-encode FFV1 422 interlaced to x254 420 interlaced with proper interlacing handling to avoid halving my chroma framerate due to improper 4:2:0 conversion
Reply
#2
Hybrid will only deinterlace if the output is set to progressive output and the content is detected as interlaced.
If your content is interlaced and not detected as interlaced, you should use 'overwrite input scan type' to let Hybrid know that the content is interlaced.
If you do not want Hybrid to deinterlace the content, you simply need to configure the encoder to encode to interlaced output.
When using x265 for example, you need to enable x265->Frames->Intra/Inter->Interlace.
You can check what Hybrid is doing by checking the Vapoursynth Script View.

Cu Seöur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#3
Unfortunately this doesn't work and Hybrid still treats target as progressive(?)
# Current color space: YUV422P8, bit depth: 8, resolution: 720x576, frame rate: 25fps, scanorder: top field first, yuv luminance scale: limited, matrix: 470bg, transfer: bt.709, primaries: bt.709, format: FFV1
# converting interlaced to full-height progressive for filtering (vsCAS) (using: QTGMC(preset="Fast"))
clip = qtgmc.QTGMC(Input=clip, Preset="Fast", Lossless=2, TFF=True) # new fps: 50
# converting full-height progressive to interlaced for 'progressive to interlaced (1)'
clip = core.std.SeparateFields(clip=clip, tff=True)
clip = core.std.DoubleWeave(clip=clip, tff=True) # resolution 720x576
clip = core.std.SelectEvery(clip=clip, cycle=4, offsets=[0, 1])
clip = core.std.SelectEvery(clip=clip, cycle=2, offsets=[1])
clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_TOP) # tff
# adjusting output color from: YUV422P8 to YUV420P8 for x264Model
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8)
# set output frame rate to 25fps (top field first)
x264->Frames->Interlaced encoding was enabled
Reply
#4
Ah, I see. Hybrid handles the source as configured.
Applying a filter that does not support interlaced content on an interlaced source would cause unwanted results.
When applying a filter, that does not support interlaced content, Hybrid does convert the content to progressive content based on what is configured under "Filtering->Vapoursynth->Misc->Source->Filter interlace handling" and converts it back to interlaced content at the end of the script.
In your example, Hybrid does exactly that. Smile

You are using CAS, which Hybrid assume to not support interlaced content.
Quote:converting interlaced to full-height progressive for filtering (vsCAS)
Hybrid thus deinterlaces the content according to your settings and reinterlaces the content at the end of the script.

"Filter interlace handling" atm. has the following options:
  • separate fields: here the top and bottom fields will be filtered separately
  • separate fields (join): here the top and bottom fields will be filtered as if they are following each other
  • TDeint(): content will be 'bob deinterlaced' using TDeint.
  • QTGMC(preset="XXX"): content will be 'bob deinterlaced' using QTGMC with the set preset (and ', Lossless=2')
Note that if you have filters that apply temporal based operations, deinterlacing and reinterlacing (the default setting) is the correct choice. In case of CAS which only works on static single frames (not tacking the neighboring frames into account), 'separate fields' is probably the most 'lossless' approach.
If you have a better suggestion how Hybrid could deal with this, let me know, and I will at least think about adding that method to Hybrid.
None of these methods should result in improper color space conversions or be unreasonably lossy.

So your options are:
a. use another setting for Hybrid on how to filter interlaced content with filters that only support progressive content.
b. do not use filters that do not support interlaced content

Cu Selur

Ps.: The "Filter interlace handling" will also be applied when a filter that does not support interlaced content is moved before the deinterlacing step in the filter order/queue and while dealing with interlaced content, which later gets converted to progressive content.
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#5
Wow, that was actually so easy, thank you! Such a shame it won't tell you explicitly that you're trying to use a filter that doesn't support current source parameters
Reply
#6
Happy, that explanation helped.

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#7
(26.12.2025, 09:31)Selur Wrote: Happy, that explanation helped.

Cu Selur
Thanks for the great software merry Christmas 🎄 
Happy new year.

Just a quick question.
I've downloaded the new version of hybrid.
It has a NEO option ticked, what does that option do? Why has it been added ?

I overwrite input scan and it seems ok 
should NEO be ticked or not?
Reply
#8
'neo' usually refers to using:
https://github.com/HomeOfAviSynthPlusEvo.../neo_FFT3D
instead of
https://github.com/VFR-maniac/VapourSynth-FFT3DFilter
depending on your system, one or the other might be faster.

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#9
(26.12.2025, 21:30)Selur Wrote: 'neo' usually refers to using:
https://github.com/HomeOfAviSynthPlusEvo.../neo_FFT3D
instead of
https://github.com/VFR-maniac/VapourSynth-

FFT3DFilter
depending on your system, one or the other might be faster.

Cu Selur

Should I leave it ticked ?
Should I un tick it?
Does it effect the de-interlacing
Reply
#10
Try it, output should be the same, it is just a question of which is faster in your system.

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)