Log in

View Full Version : how to determine, whether a frame is I P or B for Conditionalfilter?


scharfis_brain
5th January 2004, 00:35
As the Title said, we need a function that returns whether the current processed Frame of an MPEG-Video is a I, P or B-Frame.
Its result should be usable als Condition for Conditionalfilter to remove pumping-effects on over-compressed DVB-Streams.

Any thoughts about this Idea?

bilu
5th January 2004, 01:00
Well, if this is possible for XVID:

XviD Stat file import plugin for AviSynth 0.90
http://forum.doom9.org/showthread.php?s=&threadid=68027

It should be possible to do something like that out of MPEGDecoder/MPEG2DEC3.

Bilu

Mug Funky
7th January 2004, 14:56
it could be fudged with compare().

i've noticed that the PSNR is pretty consistently I > P > B.

a few frames could be examined (or even just a 16x16 block of each frame if that'll speed it up) and some filter or other could deduce which frame type it's looking at.

[edit]

oops, i just realised that this would only work for still sections without a reference clip.

ronnylov
9th January 2004, 16:29
You can analyze the mpeg2 file with the registered version of bitrateviewer and save the GOP information to a text file. Then perhaps it is possible to read this text file with the conditional filter? I think there is an option to read data from textfiles in avisynth but I don't remember where I saw it and how to do it...

If you open the mpeg2 file in virtualdubmod you can see the frame type but I don't know how to extract it from there. Maybe you can examine source code files for virtualdubmod?