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 Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 1st July 2004, 13:10   #1  |  Link
scharfis_brain
brainless
 
scharfis_brain's Avatar
 
Join Date: Mar 2003
Location: Germany
Posts: 3,642
feature request: interlacedinterleaving

I want to interleave 3 (or more, it should be arbitary) clips in the following way:

frame of clip 1 :

XXXXXXXXXX
XXXXXXXXXX
XXXXXXXXXX

frame of clip 2 :

YYYYYYYYYY
YYYYYYYYYY
YYYYYYYYYY

frame of clip 3 :

ZZZZZZZZZZ
ZZZZZZZZZZ
ZZZZZZZZZZ

result of interlacedinterleave

XXXXXXXXXX
YYYYYYYYYY
ZZZZZZZZZZ
XXXXXXXXXX
YYYYYYYYYY
ZZZZZZZZZZ
XXXXXXXXXX
YYYYYYYYYY
ZZZZZZZZZZ

i don't know any instructions to achive that in avisynth...
__________________
Don't forget the 'c'!

Don't PM me for technical support, please.
scharfis_brain is offline   Reply With Quote
Old 1st July 2004, 13:31   #2  |  Link
MfA
Registered User
 
Join Date: Mar 2002
Posts: 1,075
This is way too esotheric, this belongs in a plugin
MfA is offline   Reply With Quote
Old 1st July 2004, 16:32   #3  |  Link
kassandro
Registered User
 
Join Date: May 2003
Location: Germany
Posts: 502
Scharfi,
If you would have a serious application for such a plugin, I could easily make one. Actually I would divide the job into two filters. The first one, like the builtin Interleave, interleaves an arbitrary number of clips sequentially (i.e. the number of frames is multiplied). This is zero cost filter. The second, a generalisation of the classical weave, weaves a fixed number of frames vertically, like the classical weave with two frames. This filter is no more zero cost, but very fast (bitblt speed).
kassandro is offline   Reply With Quote
Old 1st July 2004, 19:21   #4  |  Link
stickboy
AviSynth Enthusiast
 
Join Date: Jul 2002
Location: California, U.S.
Posts: 1,268
Interleave already handles an arbitrary number of clips.

All you really need is a generalized version of Weave.

Last edited by stickboy; 1st July 2004 at 19:36.
stickboy is offline   Reply With Quote
Old 2nd July 2004, 00:52   #5  |  Link
scharfis_brain
brainless
 
scharfis_brain's Avatar
 
Join Date: Mar 2003
Location: Germany
Posts: 3,642
okay, then I will precise my request:

I need:

an arbitary weave()
and an arbitary separatefields()

so, I could select, for example, every fifth line starting with the seconde one of the picture...
meaning lines 1,6,11,16,17

this would be really really great, if someone could do such a filter.
__________________
Don't forget the 'c'!

Don't PM me for technical support, please.
scharfis_brain is offline   Reply With Quote
Old 2nd July 2004, 11:35   #6  |  Link
vion11
Registered User
 
Join Date: Oct 2002
Posts: 167
Assuming no general solution is needed you could
achieve the result when preparing some bmps masking
out (un)wanted lines and combine output with overlay.

And it is possible to create these bmps/masks with
avisynth. Simply verticalstack some alternating
white/black blankclips to desired height.
vion11 is offline   Reply With Quote
Old 2nd July 2004, 11:41   #7  |  Link
scharfis_brain
brainless
 
scharfis_brain's Avatar
 
Join Date: Mar 2003
Location: Germany
Posts: 3,642
vion11, that wont work.

I need to:

- cut out every 4th line of a clip, so the resulting clip is 3/4 height.

- reinsert after some processing that missing line.
__________________
Don't forget the 'c'!

Don't PM me for technical support, please.
scharfis_brain is offline   Reply With Quote
Old 2nd July 2004, 18:00   #8  |  Link
kassandro
Registered User
 
Join Date: May 2003
Location: Germany
Posts: 502
multi line weave

Scharfi,
here you can download the multi line weave. Usage: Weave(int "frames"). frames=2 is the default. It then behaves like the builtin weave. The number of frames and the frame rate is adjusted. Strangely, the builtin weave works only with field based video. It should be just the opposite: input frame based and output field based, but who cares?
I have added the filter Extract(clip, start,period) to the plugin.
Extract(1,5) just extracts a clip with lines 1, 6, 11, 16, 21, ....
By obvious reasons Extract does not work with yv12 clips.

Last edited by kassandro; 2nd July 2004 at 21:48.
kassandro is offline   Reply With Quote
Old 2nd July 2004, 18:13   #9  |  Link
MfA
Registered User
 
Join Date: Mar 2002
Posts: 1,075
It takes fields and it outputs frames, why should it go from framebased to fieldbased?
MfA is offline   Reply With Quote
Old 2nd July 2004, 20:42   #10  |  Link
kassandro
Registered User
 
Join Date: May 2003
Location: Germany
Posts: 502
Quote:
It takes fields and it outputs frames, why should it go from framebased to fieldbased?
For me field based clip has a field structure, i.e. has to be regarded as a composition of two fields (interlaced, telecined, ...). A frame based clip on the other hand has no field structure. Now you usually don't want to weave a field based clip, because it consists already of two fields. On the other hand, if I weave a frame based clip it becomes a field based clip, essentially it is now an interlaced clip with half the frame rate.
kassandro is offline   Reply With Quote
Old 2nd July 2004, 21:43   #11  |  Link
stickboy
AviSynth Enthusiast
 
Join Date: Jul 2002
Location: California, U.S.
Posts: 1,268
Quote:
Originally posted by kassandro:
On the other hand, if I weave a frame based clip it becomes a field based clip
Field-based really means "field-separated" (the video resulted from SeparateFields). Frame-based means "not field-separated". The semantic contents of the frame isn't relevant. (The original naming is poor.)

Weave is the opposite of SeparateFields; takes field-based input and produces frame-based output. Weave currently does nothing on frame-based input.
Quote:
but who cares?
It's important that all AviSynth filters get the terminology straight.

Last edited by stickboy; 2nd July 2004 at 21:50.
stickboy is offline   Reply With Quote
Old 2nd July 2004, 21:53   #12  |  Link
kassandro
Registered User
 
Join Date: May 2003
Location: Germany
Posts: 502
Quote:
Originally posted by stickboy
Field-based really means "field-separated" (the video resulted from SeparateFields). Frame-based means "not field-separated". The semantic contents of the frame isn't relevant. (The original naming is poor.)

Weave takes field-based input and produced frame-based output. Weave currently does nothing on frame-based input.
If "field based" really means that the clip must originate from an output of SeparateFields, then there is a lot of confusion going on in this forum. So let's clarify this. Experts, what is field based?
kassandro is offline   Reply With Quote
Old 2nd July 2004, 21:53   #13  |  Link
MfA
Registered User
 
Join Date: Mar 2002
Posts: 1,075
Kassandro, it is very simple ... if you have a sequence of fields it is field based, if you have a sequence of frames it is frame based.

I think naming is spot on, the practice of processing interlaced content as weaved frames ... now that is silly and inefficient. Given the fact that the community has decided to be stupid about this issue and is unlikely to reform avisynth could give it its own type I guess, and avoid things like the ugly interlaced=true options for functions, but we would need three types then and not two.

fieldbased framebased weaved

Last edited by MfA; 2nd July 2004 at 22:00.
MfA is offline   Reply With Quote
Old 3rd July 2004, 03:32   #14  |  Link
stickboy
AviSynth Enthusiast
 
Join Date: Jul 2002
Location: California, U.S.
Posts: 1,268
Quote:
Originally posted by kassandro
If "field based" really means that the clip must originate from an output of SeparateFields, then there is a lot of confusion going on in this forum.
Yes, there is. This is why Info() specifically uses the "field separated" terminology.
Quote:
So let's clarify this. Experts, what is field based?
See this thread (and the threads it links to):
Frame/Field Based vs Interlaced/Progressive
stickboy is offline   Reply With Quote
Old 3rd July 2004, 06:58   #15  |  Link
stickboy
AviSynth Enthusiast
 
Join Date: Jul 2002
Location: California, U.S.
Posts: 1,268
Additionally, although the AviSynth documentation doesn't explicitly state it, it's implied:
Quote:
(from AssumeFrameBased/AssumeFieldBased)
AviSynth keeps track of whether a given clip is field-based or frame-based. If the clip is field-based is also keeps track of the parity of each field (that is, whether it's the top or the bottom field of a frame).
The above wouldn't make any sense if "field-based" meant "interlaced".

(Nevertheless, the documentation ought to make this clearer, and I'm all for renaming them.)
stickboy is offline   Reply With Quote
Old 3rd July 2004, 09:18   #16  |  Link
Si
Simply me
 
Si's Avatar
 
Join Date: Aug 2002
Location: Lancashire, England
Posts: 610
stickboy is just telling it the way it is (and doing a good job of it)

In my experience, Avisynth always evolves.

Calling the current developers is (IMO) not the best way to get changes made

regards

Simon
Si is offline   Reply With Quote
Old 4th July 2004, 00:26   #17  |  Link
tritical
Registered User
 
Join Date: Dec 2003
Location: MO, US
Posts: 999
Maybe there should be, in big huge 30 point font, "These do not correspond to interlaced/progressive" in the documentation . Though even among the original definitions there are inconsistencies since using:

assumeframebased()
weave()

does nothing, as weave() only accepts field based input. Yet, using

assumefieldbased()
separatefields()

still does something!! No wonder there is confusion .
tritical is offline   Reply With Quote
Old 4th July 2004, 01:00   #18  |  Link
MfA
Registered User
 
Join Date: Mar 2002
Posts: 1,075
How do you seperate a sequence of fields into fields?

Weaved frames are neither interlaced nor field based, they are just really badly deinterlaced
MfA is offline   Reply With Quote
Old 4th July 2004, 08:45   #19  |  Link
kassandro
Registered User
 
Join Date: May 2003
Location: Germany
Posts: 502
If I correctly understand the discussion here, then all video sources are frame based from the beginning. They only get field based through avisynth filters like SeparateFields (in fact, the only one I know). That makes the distinction frame/field based a rather useless one, because the script writer knows this anyway. It should be very clear to him, that that the output of SeparateFields is not a normal clip and at some point he will either separate the fields into separate clips or will weave the fields together again.
On the other hand, it would be important to know for the script writer, whether a clip is weaved or not (I follow MfA's terminology here), i.e. whether the clip was encoded with the interlaced source flag turned on or not. Unfortunately, digital tv is always weaved no matter whether the video is progressive, interlaced or telecined.
kassandro is offline   Reply With Quote
Old 4th July 2004, 13:44   #20  |  Link
MfA
Registered User
 
Join Date: Mar 2002
Posts: 1,075
If the video is true progressive (ie. not telecined) then no it isnt weaved, it is just plain progressive. Progressive video doesnt really have fields, and interlaced video doesnt really have frames.

From the thread above 3.0 seems to go the way you want though, it will indicate wether the sequence consists of frames or fields ... and give additional flags to understand if/how fields are combined into frames. BTW DTV never encodes in interlaced mode? That would suck, because coding everything as frames is really really bad for compression (ffmpeg for instance doesnt even support that mode).

Last edited by MfA; 4th July 2004 at 13:48.
MfA is offline   Reply With Quote
Reply

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 09:54.


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