View Full Version : Info about I,P or B frametype in avisynth
Malcolm
2nd June 2004, 14:07
Often, I-Frames in MPEG-1/2/4 encodes have a (slightly) better quality than P&B-Frames.
Mpeg2source()/DGDecode could deliver the frametype of the current frame to avisynth. Now, if avisynth would know whether a frame is an I, P or B frame, you (or a filter) could take advantage of this in some situations/scripts. E.g. denoising/image enhancing filters could rely more on I frames than on P&B-Frames.
Also functions like isIFrame(), isPFrame() and isBFrame() were possible.
It would also be useful if info() would display the frametype.
Greetings,
Malcolm
WarpEnterprises
2nd June 2004, 15:32
it's quite easy to hack it into AviSource but AFAIK impossible to pass that info down to the next filter - you would need some kind of per-frame properties.
What would work is a two-pass-processing:
1. make an index file (K/I/B/P/D)
2. use that in e.g. ConditionalReader
Bidoche
2nd June 2004, 21:04
Since avs3.0 has per frame properties, I guess it could do it that way.
But, after many talks with esby, I am finally considering to add video direct streaming built-in.
Then the info will be directly available.
Anyway I am thinking about it.
Didée
2nd June 2004, 21:26
Originally posted by WarpEnterprises
it's quite easy to hack it into AviSource but AFAIK impossible to pass that info down to the next filter - you would need some kind of per-frame properties.
What would work is a two-pass-processing:
1. make an index file (K/I/B/P/D)
2. use that in e.g. ConditionalReader
Why are you now coming down to a two-pass-scenario? Why not "simply" (*cough*) define a dedicated variable that can be directly evaluated in AviSynth's conditional environment - similar to the way you did in your previous hack (http://forum.doom9.org/showthread.php?s=&threadid=73203&highlight=conditional+frametype)?
(Hah! At first I thought I'd have a bad déjà vu ... but no, I knew there already had been something about this stuff: that thread.)
- Didée
WarpEnterprises
3rd June 2004, 07:29
Because with the previous way it's not reliable if there is the mentioned delay or not (and "normally" there IS a delay).
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.