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 > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 20th November 2009, 22:51   #1  |  Link
rikun
Registered User
 
Join Date: Nov 2009
Posts: 5
How to interlace progressive footage in Avisynth?

Hi,

I would need to interlace two separate avi files in avisynth and then combine the odd fields from the other one, and the even fields from the other one to the output stream.

The goal is to create interlaced stereo output from separate L&R camera progressive files. Any tips?

I know how to combine two clips together, but have been unable to find a way to interlace progressive material in avisynth. There is really no need to recreate the time difference between the fields.

The source footage is usually 25P, sometimes originally shot in 50i, sometimes 25P straight from the camera.
rikun is offline   Reply With Quote
Old 20th November 2009, 23:02   #2  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,380
Interleave(clip1, clip2)
SeparateFields()
SelectEvery(4, 0, 3)
Weave()
Gavino is offline   Reply With Quote
Old 20th November 2009, 23:03   #3  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 1,771
Code:
source1=...
source2=...

source1even=separatefields(source1).selecteven
source2odd=separatefields(source2).selectodd

interleave(source1even,source2odd)

weave
...will probably do what you want. I think that an "assumebff" or "assumetff" immediately before the weave which change which way round the fields get weaved.

David

Last edited by wonkey_monkey; 20th November 2009 at 23:07.
wonkey_monkey is offline   Reply With Quote
Old 20th November 2009, 23:51   #4  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,380
Quote:
Originally Posted by davidhorman View Post
I think that an "assumebff" or "assumetff" immediately before the weave which change which way round the fields get weaved.
No, it would have to come earlier, before each of the SeparateFields (and for both source1 and source2), so that the fields have the right parity.

I think your solution is correct, but if you work it through, it is just a longer way of doing what mine does.
Gavino is offline   Reply With Quote
Old 21st November 2009, 01:03   #5  |  Link
rikun
Registered User
 
Join Date: Nov 2009
Posts: 5
It works... Sort of. All stationary parts of the clips look correct in stereo depth, but all the moving parts look like they are double interlaced. I'm assuming this is because I've deinterlaced the source footage already first..
rikun is offline   Reply With Quote
Old 21st November 2009, 01:08   #6  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 1,771
How are you viewing it? Some kind of shutter-glasses system?

David
wonkey_monkey is offline   Reply With Quote
Old 21st November 2009, 01:09   #7  |  Link
rikun
Registered User
 
Join Date: Nov 2009
Posts: 5
On the other hand, the footage looks like it's missing half of its' resolution (which it is). I would need a way to make the both sources look like they had both of the fields in tact. So, I think I should be interlacing AND converting the footage back to 50i before interleaving...
rikun is offline   Reply With Quote
Old 21st November 2009, 01:31   #8  |  Link
rikun
Registered User
 
Join Date: Nov 2009
Posts: 5
Ok, I probably know what's going on... When I'm taking only half of the lines, I'm losing half of the vertical resolution.

That's ok, but I don't want to see any spaces between the lines, so I should probably resize the footage vertically before interleaving...? The solution is probably really simple, but I just can't get my head around it..

I have a 22" Zalman polarized stereoscopic monitor and with circularly polarized glasses.
rikun is offline   Reply With Quote
Old 21st November 2009, 02:13   #9  |  Link
rikun
Registered User
 
Join Date: Nov 2009
Posts: 5
Hmmmm, stereoscopic player shows the output stream correctly. Maybe media player classic does some kind of resizing and breaks the interlacing...
rikun is offline   Reply With Quote
Old 21st November 2009, 02:46   #10  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 1,771
Quote:
Maybe media player classic does some kind of resizing and breaks the interlacing...
Quite likely. You may have to resize up the height of your monitor before weaving, unless you can some player for your monitor that can resize and weave by itself.

David
wonkey_monkey is offline   Reply With Quote
Old 21st November 2009, 09:11   #11  |  Link
Alex_ander
Registered User
 
Alex_ander's Avatar
 
Join Date: Apr 2008
Location: St. Petersburg, Russia
Posts: 334
Media player classic deinterlaces (I can't even find turning it off). Try VLC.
A 1 line shorter script doing the same (formal field order is the opposite, but is doesn't matter here - both fields carry the same phase):

Code:
Interleave(clip1, clip2)
DoubleWeave()
Select Every(4,1)
BTW, I suspect it may be useful (for keeping more sharpness in stationary scenes) to alternate frames like top1/bottom2 and top2/bottom1 - by interleaving 2 interlaced sequences created with different assumed field order:

Code:
a=Interleave(clip1, clip2).DoubleWeave().Select Every(8,1)
b=Interleave(clip2, clip1).DoubleWeave().Select Every(8,5)
interleave(a,b)
But I don't know if it's compatible with the playback methods used.
Alex_ander is offline   Reply With Quote
Reply

Tags
interlace, stereo

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 00:27.


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