Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.


Go Back   Doom9's Forum > Capturing and Editing Video > VapourSynth

Thread Tools Search this Thread Display Modes
Old 17th December 2016, 22:10   #1  |  Link
Registered User
juhok's Avatar
Join Date: Dec 2005
Posts: 110

Q1: Is there an easier way to kick chroma around?

sl = 0
sr = 2

chroma_u = core.std.ShufflePlanes(video, planes=[1], colorfamily=vs.GRAY)
chroma_u = core.std.CropRel(chroma_u, left=sl)
chroma_u = core.std.AddBorders(chroma_u, right=sl)
chroma_u = core.std.CropRel(chroma_u, right=sr)
chroma_u = core.std.AddBorders(chroma_u, left=sr)

chroma_v = core.std.ShufflePlanes(video, planes=[2], colorfamily=vs.GRAY)
chroma_v = core.std.CropRel(chroma_v, left=sl)
chroma_v = core.std.AddBorders(chroma_v, right=sl)
chroma_v = core.std.CropRel(chroma_v, right=sr)
chroma_v = core.std.AddBorders(chroma_v, left=sr)

video = core.std.ShufflePlanes(clips=[video, chroma_u, chroma_v], planes=[0, 0, 0], colorfamily=vs.YUV)
Q2: Does Resize with 'matrix, transfer, primaries' do the work of Colormatrix() nowdays? Couldn't find much up to date discussion about this (maybe it's too obvious).
juhok is offline   Reply With Quote
Old 18th December 2016, 00:08   #2  |  Link
Professional Code Monkey
Myrsloik's Avatar
Join Date: Jun 2003
Location: Ikea Chair
Posts: 1,989
Mildly inefficient since luma gets shifted too but much shorter:
sl = 0
sr = 2
video = core.std.ShufflePlanes(clips=[video, core.std.CropRel(video, left=sl, right=sr).std.AddBorders(right=sl, left=sl)], planes=[0, 1, 2], colorfamily=vs.YUV)
Just make your own collection of helper scripts if you need it often

Q2: Yes
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote

chromashift, colormatrix, vapoursynth

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +1. The time now is 05:27.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.