On Sun, Nov 05, 2006 at 06:31:32PM -0800, Ralph Giles wrote:
On Mon, Nov 06, 2006 at 01:56:53AM +0100, Michael Niedermayer wrote:
thats ~ 20 bytes per frame overhead or ~ 0.11% with 15k frames it would have been ~ 11 or ~ 0.07% with 2mb frames you would end up with ~ 22 byte or ~ 0.001%
Thanks, Michael. Could you do a similar sketch for vorbis audio? I tried nutmerge on a couple of files and it reported 1.2-1.5% overhead, and was curious if the claimed 2 bytes per frame is possible with vorbis.
If you modify nutmerge.c, there's a table at the top, you need to change it to this: frame_table_input_t ft_default[] = { // There must be atleast this safety net: //{ 4128, 3, 0, 1, 0, 0, 0 }, //{ flag, fields, pts, mul, stream, size, count } { 8192, 0, 0, 1, 0, 0, 0 }, // invalid 0x00 { 56, 0, 0, 1, 0, 0, 0 }, // safety net non key frame { 56, 0, 0, 1, 0, 0, 0 }, // safety net key frame { 4128, 0, 0, 1, 0, 0, 0 }, // one more safety net { 27, 0, 0, 1, 0, 0, 0 }, // EOR frame { 1, 4, 16, 386, 0, 190, 0 }, { 1, 4, 2, 90, 0, 40, 0 }, { 32|1, 3, 9, 1, 0, 0, 0 }, { 32|1, 3, 23, 1, 0, 0, 0 }, { 32|1, 3, 2, 1, 0, 0, 0 }, { 8192, 2, 0, 1, 0, 0, 0 }, // invalid 0xFF { -1, 0, 0, 0, 0, 0, 0 }, // end }; With this, trying 2 samples I have, I got this overhead: Stream 0: frames: 13156 TOT: packet size: 2764411 packet overhead: 15660 (0.57%) AVG: packet size: 210.13 packet overhead: 1.19 Syncpoints: 86 size: 1536 TOTAL: 2764411 bytes data, 29609 bytes overhead, 1.07% overhead Stream 0: frames: 122493 TOT: packet size: 20807068 packet overhead: 148978 (0.72%) AVG: packet size: 169.86 packet overhead: 1.22 Syncpoints: 643 size: 11564 TOTAL: 20807068 bytes data, 175184 bytes overhead, 0.84% overhead BTW, note that in the former, ~30% of the overhead is the header repetition :) (3 header copies, each 4kb big because of vorbis) - ods15