Log in

View Full Version : compressibility test in theory


-NoXy-
28th April 2004, 08:46
hi, i have to write a little tool to make a compressibility test (for xvid-lavc encoding) under linux because i dont like what i've found and wanna know more about it but i'm not sure i really know how it works. plz correct me if i m wrong :-)

so a compressibility test is a simple pass with a constant quantizer encoding (=2) and any scaling (no-rescaling better), giving us an average bitrate used by the encoder to achieve this quality. now we got the bitrate, the size, etc so we can easily calculate the bits per pixel or bits per block used. we have to fix a percentage of that value to be used in our real encoding because we cant afford to spend that much.
this is my first question: what is the perfect % to take ? think i've read somethin in between 50% and 60% but i'm not sure.
with this we can calculate the perfect size (width-height) of our movie if we fix the bitrate in our second pass.

of course we wont encode the whole movie in the test but just a part of it (or several parts to be exact :p).

thnx to the one kind enough to answer me :D

evade
28th April 2004, 11:52
Hi.

I generally use %60 of my compressibility test and am almost always happy with the results. The quality does keep getting better the higher you go. I think the reason you haven't seen any hard and fast rules here is because people are willing to tolerate different levels of quality.

I have done a bunch of encoding with lavc and with xvid and have found that I prefer xvid. I have written a small perl script to do my compressibility test for xvid. It encodes the first 6 seconds every 2 minutes for the length of the movie and averages the bitrate.

http://mencoder.szczuka.com/comptest.pl

Feel free to take this and modify it to do lavc or add bpp calculation or whatever you want.

Have Fun.

echo
28th April 2004, 11:59
You've got everything right. You'll be safe with a compressibility test >60%, but I've gone down to 55% with lavc with no problems at all. You can take a look at this perl script (http://forum.doom9.org/showthread.php?s=&threadid=73124) from evade here and an excel spredsheet (http://forum.doom9.org/showthread.php?s=&threadid=44414&highlight=compressibility+test+excel) that will help you out.

regards
echo

edit: evade was faster :D

-NoXy-
28th April 2004, 21:00
thnx for the fast answers :-)
sure evad I ll take ur script as a base to be included in my do-it-all script. it ll be heavily modified but thnx. I ll release it here when i'm done with the "i-do-it-all" part. (might be useful, who knows :p)

pyt0n
10th May 2004, 22:09
any news of your script?

eta? :)

-NoXy-
18th May 2004, 17:58
yup, the script is on its way. unfortunately because of some personnal problems I didnt have much time to spend on it but here is a short list of the things included so far :
-auto-cropping
-guess what, a compressibility test :D
-autoresizing
-mp3/ogg audio encoding (yeah, u even got the choice)
-2 passes xvid/lavc encoding
-other things

the goal was to make a tool as simple as a single command (read "./script) to encode a movie with mencoder with strong (read here: "not ugly") default options and yet let more advanced ppl tweak their encoding (via file or command-line). In fact i'm a lazy person, id rather write a tool like this and then encode 20 movies with it than do every step by-hand each time.
now to answer ur question: i'll speed up the process and expect the first release within a few days.