Why are my compressed files being compressed in RAR so well?

Locked
User avatar
DJ_Izumi
Joined: Wed Oct 03, 2001 8:29 am
Location: Canada
Contact:
Org Profile

Why are my compressed files being compressed in RAR so well?

Post by DJ_Izumi » Sat Jul 23, 2005 2:25 pm

Standard school of thought: Compression like ZIP or RAR used on compressed media such as Jpeg or Mpeg is futile, it's only good for archiving so many files will be stored in one, or in segmented files, but you get little to no compression.

I took a shot and I compresed the entire folder that my new trailer was made in, about 5.2GB of HuffYUV files in RGB mode, yet the resulting RAR file weighed in at 3.12GB.

On the other hand, I took the master of my video, 2.7GB uncompressed AVI, compressed it with Lagarith Lossless down to 343mb, I then ran it threw WinRAR. 35mins later I had a 638mb RAR file... That just hurt my brain.
Image

User avatar
Jnzk
Artsy Bastid
Joined: Tue Jan 28, 2003 5:30 pm
Location: Finland
Org Profile

Post by Jnzk » Sat Jul 23, 2005 3:25 pm

Huffyuv is optimized for speed, Lagarith for compression.

User avatar
Zarxrax
Joined: Sun Apr 01, 2001 6:37 pm
Contact:
Org Profile

Post by Zarxrax » Sat Jul 23, 2005 3:44 pm

It is very strange that a file would double in size when you rar it. Perhaps you put both the huffyuv and the lagarith into the same rar, or something like that.

In any case, both lagarith and huffyuv are intraframe codecs, which means every single frame is a keyframe. This means that there is still a lot that can be done compression-wise, so its not surprising that raring the resulting file could make it smaller.

User avatar
Sir_Lagsalot
Joined: Mon Jun 23, 2003 6:42 pm
Org Profile

Post by Sir_Lagsalot » Sat Jul 23, 2005 9:05 pm

Zarxrax wrote: In any case, both lagarith and huffyuv are intraframe codecs, which means every single frame is a keyframe. This means that there is still a lot that can be done compression-wise, so its not surprising that raring the resulting file could make it smaller.
Rar is not taking advantage of that; that would require decoding the video, compressing it, and then somehow knowing how to turn the resulting video back into the original Huffyuv/Lagarith on the other end.

Judging from the size of the Lagarith master, the video you are compressing is pretty simple, or has lots of identical frames. With simple video, Huffyuv will generate long runs of identical symbols, which in turn will compress great with run-length or string matching. Likewise, encoded identical frames would also be picked up by string matching.

With Lagarith, the arithmetic coding, run-length encoding, and null frame support eliminates such compression opportunities for Rar. Still, I'm surprised it expanded the file like that; if you are using the most recent version of Winrar you might want to submit a bug report.
Lagarith: Best lossless codec ever in my completely objective opinion.

trythil
is
Joined: Tue Jul 23, 2002 5:54 am
Status: N͋̀͒̆ͣ͋ͤ̍ͮ͌ͭ̔̊͒ͧ̿
Location: N????????????????
Org Profile

Post by trythil » Tue Jul 26, 2005 11:37 am

Zarxrax wrote:It is very strange that a file would double in size when you rar it. Perhaps you put both the huffyuv and the lagarith into the same rar, or something like that.
Large recovery records might do it too.

Locked

Return to “Video & Audio Help”