Log in

View Full Version : Splitting planes into frames


Cary Knoop
29th September 2020, 22:01
I try to split planes into frames, for a 4:2:0 interlaced source I try:


c = core.std.SeparateFields(c, tff=True)
y = core.std.ShufflePlanes(c, planes=[0], colorfamily=vs.GRAY)
u = core.std.ShufflePlanes(c, planes=[1], colorfamily=vs.GRAY)
v = core.std.ShufflePlanes(c, planes=[2], colorfamily=vs.GRAY)
u = core.fmtc.resample(u, scale=2, interlaced=True, tff=True)
v = core.fmtc.resample(v, scale=2, interlaced=True, tff=True)
c = core.std.Interleave([y,u,v])


Which results in:
vapoursynth.Error: Interleave: the clips' formats don't match

poisondeathray
29th September 2020, 22:22
fmtc.resample changes to 16bit by default (GRAY16 in your case), so you cannot interleave GRAY8 with GRAY16. You can use fmtc.bitdepth or use a different scaling e.g. core.resize.Bicubic or whatever you want

Once you separate fields, you no longer need to scale in interlaced aware fashion, so interlaced should be False

Cary Knoop
29th September 2020, 23:03
fmtc.resample changes to 16bit by default (GRAY16 in your case), so you cannot interleave GRAY8 with GRAY16. You can use fmtc.bitdepth or use a different scaling e.g. core.resize.Bicubic or whatever you want

Once you separate fields, you no longer need to scale in interlaced aware fashion, so interlaced should be False
Oops, user error, the clip was never converted to float which I depended on.

By the way the fmtc documentation shows an example where the interlaced option is used after a SeparateFields().

videoh
29th September 2020, 23:12
By the way the fmtc documentation shows an example where the interlaced option is used after a SeparateFields(). Monkey see, monkey do.

poisondeathray
29th September 2020, 23:36
By the way the fmtc documentation shows an example where the interlaced option is used after a SeparateFields().


It's correct and works ok. Chroma looks ok

It works differently in avisynth and I assumed it would be the same. I was wrong. In avisynth an interlaced=true switch causes operations to be treated and manipulated as interlaced (woven interleaved even and odd fields) , not as separated fields which are treated as progressive images