Log in

View Full Version : XviD Stat file import plugin for AviSynth 0.90


sh0dan
4th January 2004, 05:26
Hi!

Just got inspired and did a stat-import filter for AviSynth.

This plugin will import information from XviD 1.0 beta 3 first pass stat files, and make them available for conditional filtering and/or display the per-frame information onscreen.

Documentation and download is at:

http://cultact-server.novi.dk/kpo/xstat/xstat.html

I must warn you this is for fairly advanced people. Either to explore their encodes or to experiment on how to make them better.

Furthermore it's very sparsely tested (I don't have more than a few ready-to-use stat-files).

RadicalEd
4th January 2004, 06:13
Awesome, opens up the interesting possibility of using xvid itself to determine the levels of filtering. mvdata > some threshold, more temporal filtering, pixeldata, more spatial filtering. I can see that being quite useful, especially on low bitrate encodes where every ounce of compressibility helps. Sort of a smarter, more applicable variety of QMF style motion filters, but with spatial info and frame type as well. Thanks! /plays

Zep
4th January 2004, 12:33
Originally posted by sh0dan
Hi!

Just got inspired and did a stat-import filter for AviSynth.

This plugin will import information from XviD 1.0 beta 3 first pass stat files, and make them available for conditional filtering and/or display the per-frame information onscreen.



excellent!

now for the whine lol

The first pass is way off from what xvid actually does in the second pass.
(well that is what I see here on my setup anyway) heck I'm not even getting
in the same ballpark numbers on some frames so is using that first pass info wise?

Didée
4th January 2004, 15:34
Excellent!

Well, my first thought was:

" '... for AviSynth 0.90' -- are we caught in a time loop ?!?" :D


@ Zep:

The easiest way to use it for filtering would be to do a 1st-pass WITHOUT B-frames. Otherwise, nearly all of the 1st-pass P-frames would be above average, and nearly all B-frames would be below average.
With a 1st-pass with B-frames, one must compare each frame with respect to its frametype and the respective average size for the given frametype.


Bottomline:

Sh0dan is coding nifty tools much faster than I can get around to test them. :)

Thanks again, sh0dan!

- Didée

sh0dan
4th January 2004, 16:07
Originally posted by Didée
The easiest way to use it for filtering would be to do a 1st-pass WITHOUT B-frames. Otherwise, nearly all of the 1st-pass P-frames would be above average, and nearly all B-frames would be below average.
With a 1st-pass with B-frames, one must compare each frame with respect to its frametype and the respective average size for the given frametype.

I don't think B-frames are a big problem. For the same purpose I put up the third example, where frames are compared to the average of the current frame type. If the current frame is an I-frame, the average I-frame sizes are put into the "xvid_avg_pixdata" variable. So you are able to only compare I-frames to I-frames, etc.

The XX% percent of type average displayed in show = true is equal to:

100 * xvid_data / xvid_avg_data

Bframes "MV data" doesn't make much sense, but it's included for completeness.

Zep
5th January 2004, 16:27
Originally posted by Didée



@ Zep:

The easiest way to use it for filtering would be to do a 1st-pass WITHOUT B-frames. Otherwise, nearly all of the 1st-pass P-frames would be above average, and nearly all B-frames would be below average.
With a 1st-pass with B-frames, one must compare each frame with respect to its frametype and the respective average size for the given frametype.



ahh yes good point. Looking at the a first pass i just did on a 1920 x 1080i HDTV .ts
with and without B-frames what you said looks correct.

Now the thing is could you do a first pass without b-frames and second with them
and not screw everything up :D Yes i will try it when i get the chance :)


NOTE: I still wish Xvid saved/logged the second pass stats to a file. i.e. the debug
window stats so i could get a better idea at what to tweak by using some of
these great graph tools and what not. ( the data in the second pass would
really help in setting up zones for a re encode and other tweaks)

Zep
5th January 2004, 16:29
Originally posted by sh0dan
I don't think B-frames are a big problem. For the same purpose I put up the third example,

which I tested and it works well. I also did a sharpen on frames that were way under
and that also works very well.

mikeson
5th January 2004, 18:00
Originally posted by Zep
Now the thing is could you do a first pass without b-frames and second with them and not screw everything up
I don't think this will work. If you want to use b-frames, you have to use them in both passes.