Log in

View Full Version : Picture-in-Picture with H264 (MTS/TS/M2TS) video using VirtualDubMod... Possible?


TaaDow
1st May 2010, 10:16
Hey everyone.

I have searched quite a bit and still haven't found a guide on how to do PiP using AviSynth and VirtualDub. I use the VirtualDubMod that was edited by Jake Ludington (http://www.topdrawerdownloads.com/download/104913) that allows import of H264 files of any type/extension and it works great. The only thing I can't figure out how to do is PiP.

Just in case anyone is wondering, I'm using videos from my Sony HDR-SR12 camcorder.

If anyone has any information on how or if this can be achieved I would be VERY grateful! I have looked and looked (on the web and here in this forum) but can't find what I need to know. I'm not very good with AviSynth scripts because I've never really edited one.

Thanks all!

wonkey_monkey
1st May 2010, 16:43
Edited: deleted a bunch of stuff.

Use overlay(bigclip, smallclip, x=x_offset,y=y_offset)

David

TaaDow
3rd May 2010, 01:55
Thanks for the reply David.

For bigclip, smallclip do I just put the path to each one?

overlay(c:\mainvideo.mts, c:\pipvideo.mts, x=x_offset,y=y_offset)

What about resizing the small video within that line? How would I do that?

Thanks!

wonkey_monkey
3rd May 2010, 02:03
Using overlay was a slightly obscure one... importing clips and resizing are the kind of stuff you should turn to the AviSynth documentation for.

David

LoRd_MuldeR
3rd May 2010, 11:09
For bigclip, smallclip do I just put the path to each one?

overlay(c:\mainvideo.mts, c:\pipvideo.mts, x=x_offset,y=y_offset)

Nope, you neeed to pass clips, not strings! So first you need to load the clips. Then you can add the overlay.

Please try like this:

bigclip = FFVideoSource("c:\mainvideo.mts")
smallclip = FFVideoSource("c:\pipvideo.mts")
return bigclip.overlay(smallclip, x=42, y=42)

What about resizing the small video within that line? How would I do that?

Change the line (from example above) like this:

smallclip = FFVideoSource("c:\pipvideo.mts").Spline36Resize(320,240)