Greetings - I was curious about how -K and the 3 choices for quantization matrices (default, tmpgenc and kvcd) behaved with different values of '-q'.
Source material was a 12962 (NTSC) frame (7m12s) cartoon captured from laserdisc using a S-Video cable to a Canopus ADVC100 analog->DV converter. The basic script used was: -------------- #!/bin/sh # Takes two arguments: -q and -K: # Example: # ./dvd.sh 4 0.1 smil2yuv -i 2 redhotridinghood.dv | \ y4mshift -b 12,4,696,476 | \ y4mscaler -O chromass=420_MPEG2 | \ bfr -b 10m | \ mpeg2enc -f 8 -M 2 -q $1 -K $2 -o foo.m2v --------------- The default bitrate used by mpeg2enc for -f 8 is 7500. The 4:1:1 (NTSC DV) to 4:2:0 conversion was done in 'y4mscaler', thus the use of "smil2yuv -i 2" (y4mscaler seems to produce better output than doing the conversion in smil2yuv+libdv). Other than that no filtering/manipulation of the data was done. Audio was prepared manually ahead of time with the usual 'smil2wav' and toolame. The I/P/B frame sizes and average bitrate reported in the tables below were extracted via perl scripts from the output of 'mplex -f 8 -o /dev/null foo.m2v foo.mp2". The bitrate is in kbits/sec (1000) and is the number reported by mplex in the 'Average bit-rate' field divided by 1000. I/P/B frame sizes are in bytes. The 'ratio' column is the current -K's average bitrate divided by the avearage bitrate for '-K default' within a -q table. There were 5 values of -q used ranging from a quite low (high quality) of 4 and up to and including 9 (8 is the default used by mpeg2enc for DVD (-f 8)). For each -q the -K parameter took on one of the three choices: default (standard MPEG-2), tmpgenc, kvcd. The main observation is that the amount of influence -K has increases as the quality is lowered (-q increases). At a high quality setting (-q 4) changing -K has little effect because the encoder is up against the bitrate limit, while at a slightly lower quality setting (-q 6) it can be seen that altering -K has a much larger effect and at -q 9 the difference between 'default' and the other two choices is quite substantial Enjoy. Cheers, Steven Schultz
q -K I P B Rate Ratio - - - - - ---- ----- 4 default 33898 32730 29832 7405.2 1.000 4 tmpgenc 45287 34523 27975 7412.0 1.001 4 kvcd 55975 35575 26394 7403.2 1.000 5 default 33133 32414 29840 7373.6 1.000 5 tmpgenc 43874 33855 27792 7316.4 0.992 5 kvcd 54730 34220 25401 7137.6 0.968 6 default 32515 32082 29625 7308.0 1.000 6 tmpgenc 43002 32463 26204 6960.4 0.952 6 kvcd 51634 29877 21542 6194.0 0.848 7 default 31817 31347 28767 7112.8 1.000 7 tmpgenc 41678 28127 22235 6028.4 0.848 7 kvcd 48115 25323 17916 5267.2 0.741 8 default 29736 30762 28838 7052.4 1.000 8 tmpgenc 35126 24703 19886 5327.6 0.755 8 kvcd 39646 22008 16215 4644.0 0.658 9 default 28059 21852 19083 4900.4 1.000 9 tmpgenc 28665 16317 12707 3540.4 0.722 9 kvcd 34260 15508 11058 3318.0 0.677