PDA

View Full Version : Adding a thin vertical line to a clip


dosdan
24th May 2006, 11:42
I'm comparing two MPEG-2 encoders using the following script


LoadPlugin("G:\Avi2Dvd\Programs\Dgmpgdec\DGDecode.dll")

left=MPEG2Source("y:\Gaitner\Ryman_tmpegenc.d2v")
right=MPEG2Source("y:\Gaitner\ryman_hcenc.d2v")

width=left.width()/2
height=left.height()

left=crop(left,0,0,width,height)
right=crop(right,width,0,width,height)

StackHorizontal(left.subtitle("TMPEGenc"),right.subtitle("HCenc"))


How can I add a thin black, white or coloured vertical separator line down the middle to indicate where the boundary is between the two sides/clip-halves?

techmule
24th May 2006, 12:29
I'm comparing two MPEG-2 encoders using the following script


LoadPlugin("G:\Avi2Dvd\Programs\Dgmpgdec\DGDecode.dll")

left=MPEG2Source("y:\Gaitner\Ryman_tmpegenc.d2v")
right=MPEG2Source("y:\Gaitner\ryman_hcenc.d2v")

width=left.width()/2
height=left.height()

left=crop(left,0,0,width,height).addborders(0,0,2,0,$0000FF).crop(2,0,-0,-0)
right=crop(right,width,0,width,height).addborders(2,0,0,0,$0000FF).crop(0,0,-2,-0)

StackHorizontal(left.subtitle("TMPEGenc"),right.subtitle("HCenc"))



This should work

foxyshadis
24th May 2006, 13:03
StackHorizontal(left.subtitle("TMPEGenc"),blankclip(left,width=2,color=$FF8080),right.subtitle("HCenc"))

Blankclip syntax may not be exact, but should be close.

dosdan
25th May 2006, 00:50
Thanks for the help. I'll probably use the blankclip-between-the-two-clips method.

It's a a little more straightforward. I looked at the StackVertical() command before posting and misread it. I thought the height & width have to be the same for all clips, but it's only the height:

StackHorizontal takes two or more video clips and displays them together in left-to-right order. The heights of the images and their color formats must be the same.

If maintaining the exact width was a requirement I'd probably do it like this:

width=left.width()/2 - 2
...
StackHorizontal(left.subtitle("TMPEGenc"),blankclip(left,width=4,color=$FF8080),right.subtitle("HCenc"))


That would leave room for a 4-pixel separator.