On the compression ratio of xvidcore
lingan <[email protected]> Sat, 22 Nov 2008 22:41:14 +0800
| Newsgroups | gmane.comp.video.xvid.user |
|---|---|
| Message-ID | <[email protected]> |
--===============0129934686== Content-Type: multipart/alternative; boundary="----=_Part_108838_27045460.1227364874146" ------=_Part_108838_27045460.1227364874146 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello, dear: I'm studying to use xvidcore to encode yuv images into mpeg4, But I find the compression ratio I get is quite low. For example, I use the following command to encode a yuv file : p9322@wllab1:~/program863/xvidcore-1.1.3/examples$ ./xvid_encraw -i coastguard_cif.yuv -type 0 -w 352 -h 288 -frames 1000 -o coastguard.mpeg4 -max_key_interval 10 then : p9322@wllab1:~/program863/xvidcore-1.1.3/examples$ ls -lh coastguard* -rw-r--r-- 1 p9322 p9322 44M 2008-10-31 17:35 coastguard_cif.yuv -rw-r--r-- 1 p9322 p9322 6.1M 2008-11-21 22:35 coastguard.mpeg4 you see? the compression ratio is only about 7. this is part of the encoding output info: xvid_encraw - raw mpeg4 bitstream encoder written by Christoph Lampert 2002-2003 0: key=2, time= 21, len= 36006 | type=I, quant= 2, len= 36006 1: key=0, time= 24, len= 19250 | type=P, quant= 2, len= 19250 2: key=0, time= 28, len= 20667 | type=P, quant= 2, len= 20667 3: key=0, time= 23, len= 20431 | type=P, quant= 2, len= 20431 4: key=0, time= 29, len= 22397 | type=P, quant= 2, len= 22397 5: key=0, time= 23, len= 20005 | type=P, quant= 2, len= 20005 6: key=0, time= 28, len= 21632 | type=P, quant= 2, len= 21632 7: key=0, time= 27, len= 21329 | type=P, quant= 2, len= 21329 8: key=0, time= 23, len= 20117 | type=P, quant= 2, len= 20117 9: key=0, time= 24, len= 20940 | type=P, quant= 2, len= 20940 10: key=2, time= 11, len= 36691 | type=I, quant= 2, len= 36691 11: key=0, time= 34, len= 18852 | type=P, quant= 2, len= 18852 12: key=0, time= 35, len= 21458 | type=P, quant= 2, len= 21458 13: key=0, time= 34, len= 20337 | type=P, quant= 2, len= 20337 the resulted P frames are not much larger than I frames. Then I use xvidcore to encode the webcam stream, the output info is as follows: frame: key=2,len= 14441 | type=^@, quant= 0, stat_len= 0 frame: key=0,len= 0 | type=^@, quant= 0, stat_len= 0 frame: key=0,len= 8593 | type=I, quant= 2, stat_len= 14441 frame: key=0,len= 2676 | type=B, quant= 4, stat_len= 2676 frame: key=2,len= 14325 | type=P, quant= 2, stat_len= 8593 frame: key=0,len= 8105 | type=I, quant= 2, stat_len= 14325 frame: key=0,len= 2813 | type=B, quant= 4, stat_len= 2813 frame: key=2,len= 14290 | type=P, quant= 2, stat_len= 8105 frame: key=0,len= 6932 | type=I, quant= 2, stat_len= 14290 ...... The second column is the length of coded frame. My webcam is 320x240, so the compression ratio is about 320x240x3/10000=23. And strangely, the volume of P frames is even larger than I frames sometimes. It's said that mpeg4 can achieve at most 400 compression ratio. Generally, it can achieve 6,70 compression ratio easily. But why the CR I get is so small ? Any suggestions? The version is xvidcore-1.1.3, and the OS is debian linux-2.6.21.7. Thank you very much!! ------=_Part_108838_27045460.1227364874146 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello, dear:<br> I'm studying to use xvidcore to encode yuv images into mpeg4, But<br> I find the compression ratio I get is quite low. For example, I use<br> the following command to encode a yuv file :<br> p9322@wllab1:~/program863/<div id=":1h" class="ArwC7c ckChnd">xvidcore-1.1.3/examples$ ./xvid_encraw -i<br> coastguard_cif.yuv -type 0 -w 352 -h 288 -frames 1000 -o<br> coastguard.mpeg4 -max_key_interval 10<br> then :<br> p9322@wllab1:~/program863/xvidcore-1.1.3/examples$ ls -lh coastguard*<br> -rw-r--r-- 1 p9322 p9322 44M 2008-10-31 17:35 coastguard_cif.yuv<br> -rw-r--r-- 1 p9322 p9322 6.1M 2008-11-21 22:35 coastguard.mpeg4<br> <br> you see? the compression ratio is only about 7.<br> this is part of the encoding output info:<br> xvid_encraw - raw mpeg4 bitstream encoder written by Christoph Lampert 2002-2003<br> <br> 0: key=2, time= 21, len= 36006 | type=I, quant= 2, len= 36006<br> 1: key=0, time= 24, len= 19250 | type=P, quant= 2, len= 19250<br> 2: key=0, time= 28, len= 20667 | type=P, quant= 2, len= 20667<br> 3: key=0, time= 23, len= 20431 | type=P, quant= 2, len= 20431<br> 4: key=0, time= 29, len= 22397 | type=P, quant= 2, len= 22397<br> 5: key=0, time= 23, len= 20005 | type=P, quant= 2, len= 20005<br> 6: key=0, time= 28, len= 21632 | type=P, quant= 2, len= 21632<br> 7: key=0, time= 27, len= 21329 | type=P, quant= 2, len= 21329<br> 8: key=0, time= 23, len= 20117 | type=P, quant= 2, len= 20117<br> 9: key=0, time= 24, len= 20940 | type=P, quant= 2, len= 20940<br> 10: key=2, time= 11, len= 36691 | type=I, quant= 2, len= 36691<br> 11: key=0, time= 34, len= 18852 | type=P, quant= 2, len= 18852<br> 12: key=0, time= 35, len= 21458 | type=P, quant= 2, len= 21458<br> 13: key=0, time= 34, len= 20337 | type=P, quant= 2, len= 20337<br> the resulted P frames are not much larger than I frames.<br> <br> Then I use xvidcore to encode the webcam stream, the output info is as follows:<br> frame: key=2,len= 14441 | type=^@, quant= 0, stat_len= 0<br> frame: key=0,len= 0 | type=^@, quant= 0, stat_len= 0<br> frame: key=0,len= 8593 | type=I, quant= 2, stat_len= 14441<br> frame: key=0,len= 2676 | type=B, quant= 4, stat_len= 2676<br> frame: key=2,len= 14325 | type=P, quant= 2, stat_len= 8593<br> frame: key=0,len= 8105 | type=I, quant= 2, stat_len= 14325<br> frame: key=0,len= 2813 | type=B, quant= 4, stat_len= 2813<br> frame: key=2,len= 14290 | type=P, quant= 2, stat_len= 8105<br> frame: key=0,len= 6932 | type=I, quant= 2, stat_len= 14290<br> ......<br> <br> The second column is the length of coded frame. My webcam is 320x240,<br> so the compression ratio is about 320x240x3/10000=23. And strangely,<br> the volume of P frames is even larger than I frames sometimes.<br> <br> It's said that mpeg4 can achieve at most 400 compression ratio.<br> Generally, it can achieve 6,70 compression ratio easily. But why the<br> CR I get is so small ? Any suggestions?<br> <br> The version is xvidcore-1.1.3, and the OS is debian linux-2.6.21.7.<br> Thank you very much!!</div> ------=_Part_108838_27045460.1227364874146-- --===============0129934686== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ XviD-users mailing list [email protected] http://list.xvid.org/mailman/listinfo/xvid-users --===============0129934686==--