View Full Version : assumeframebased and assumefieldbased
rkalwaitis
30th October 2009, 13:36
Im not sure I understand the diffrerence between framebased and fieldbased. Is one progressive? in which case would I have to assumeframebased or assumefieldbased in a script?
Thanks
k
thewebchat
30th October 2009, 20:31
AssumeFrameBased/AssumeFieldBased have nothing to do with interlaced/progressive video. Field-based in AviSynth only means that each frame presented to the calling application corresponds to one field of a "real" frame. You can see what this means by adding a SeparateFields to your script.
Gavino
30th October 2009, 20:42
Firstly, have a look at the first section of this page (http://avisynth.org/mediawiki/Interlaced_fieldbased).
I'm not surprised you're confused, as this is a confusing aspect of Avisynth. You rarely need to use AssumeFrameBased or AssumeFieldBased, as Avisynth keeps track of whether a clip is field or frame based, eg after SeparateFields it becomes field based. One example where you might use AssumeFieldBased would be if you were importing a clip that had been saved as fields instead of frames.
rkalwaitis
31st October 2009, 12:51
Thanks Gavino
Gavino
31st October 2009, 13:23
Thanks Gavino
... and thewebchat, who provided a concise definition of what field based really means.
rkalwaitis
1st November 2009, 09:39
Im sorry and to thewebchat. I played with the command seperatefields to see what happened. In my case it shortened the clip vertically. If it would not have shrank the clip it would of been frame based....right?
Gavino
1st November 2009, 12:17
After SeparateFields, the clip is half the original height, since each frame is torn apart into its two fields, one consisting of the odd lines and the other consisting of the even lines.
So for example,
Input: 720x576, 25fps (frame-based)
Output: 720x288, 50fps (field-based)
thewebchat
1st November 2009, 17:16
Like Gavino said, once you use SeparateFields, each frame of the input clip is converted to two frames (actually fields, but they're presented as frames), so you can use your usual frame-based manipulation on them. For example, if you have an interlaced clip, you can't just go and use, say, Deen because it will blur the fields together and then you'll just have a mess. However, if you use SeparateFields first, each field becomes its own frame, and you can run Deen safely. Or, if you want to make a progressive clip interlaced, you can first run SeparateFields, and then SelectEvery(4,0,3) or SelectEvery(4,1,2) to drop half the even fields and half the odd fields. Then, when you use Weave to combine the separated fields back to a frame-based clip, it will be half the framerate and interlaced.
I believe the only reason that AviSynth even cares if something is "frame-based" or "field-based" is to keep track of the field parity (if you trim one field out of a field-based clip, that reverses the parity). If you want proof that SeparateFields shows the even and odd fields, try stepping through a few "frames." The video should jump up and down, because the even and odd fields show information from different spatial locations.
rkalwaitis
2nd November 2009, 09:21
Awe, me thinks I got it. Thanks for your help and patience guys, I appreciate it.
K
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.