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. |
|
|
Thread Tools | Search this Thread | Display Modes |
12th December 2017, 10:21 | #1 | Link |
Registered User
Join Date: Sep 2006
Posts: 1,657
|
How do I draw vertical and horizontal line across the frame?
I'm trying to sync 2 videos with different display ratio (16:9 and 4:3) in my editing and I'm having trouble finding the sync point on all vertical and horizontal panning shots. I need guide lines to indicate the center point of the frame, so I need draw a horizontal and vertical line across the middle of the frame to find that point. Right now I'm physically measuring my monitor with a ruler to do this.
|
12th December 2017, 13:10 | #2 | Link |
Registered User
Join Date: Jun 2012
Location: Ibiza, Spain
Posts: 321
|
Not the prettiest in the world but in most cases, it should work.
Code:
def draw_guide(clip): h_line = [] h_white = core.std.BlankClip(width=clip.width, height=clip.height/2-1, format=vs.GRAY8, color=255) h_line.append(h_white) h_line.append(core.std.BlankClip(width=clip.width, height=2, format=vs.GRAY8, color=0)) h_line.append(h_white) v_line = [] v_white = core.std.BlankClip(width=clip.width/2-1, height=clip.height, format=vs.GRAY8, color=255) v_line.append(v_white) v_line.append(core.std.BlankClip(width=2, height=clip.height, format=vs.GRAY8, color=0)) v_line.append(v_white) guide = core.std.Expr([core.std.StackVertical(h_line), core.std.StackHorizontal(v_line)], 'x y min') result = core.std.MaskedMerge(clip, core.resize.Bicubic(guide, format=clip.format), core.std.Invert(guide)) return result |
12th December 2017, 18:22 | #5 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
A bit OT but related.
In Avisynth, vcMohan has a Grid() function (draws graticule on frame), is quite handy in some circumstances. I assume that same exists in his VS plugs. EDIT: Example image here:- https://forum.doom9.org/showpost.php...6&postcount=90 EDIT: I guess that it could be persuaded to do close to that required in this thread.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 14th December 2017 at 01:40. |
Thread Tools | Search this Thread |
Display Modes | |
|
|