View Full Version : Recompressing
Psymaster
6th September 2002, 14:10
I was thinking about recompressing divx files. It is widely accepted that if we compress a movie and then we recompress it, quality is lost. But then how is it possible that the recompressed file can be the same or even bigger size?
And if there really is a quality loss, how big is it? I am asking all these because I hear many people from time to time wanting to make sth with their files and they don't do it because of the quality loss involved in recompressing them.
DJ Bobo
6th September 2002, 14:55
When you get a bigger size, you used a bitrate higher than the one used in the original file. Even then, the quality will be worse than the original, since you're recompressing an already compressed file using a lossy compression technology. The lower the bitrate you use when you recompress, the lower the quality of the new file. The only recompressing method that preserves the same quality as the original is recompressing using lossless compression like Huffyuv. Using this you'll become huge files.
A popular example is recompressing an 128kbps MP3 over and over again to 128kbps, the more time you recompress the worse the quality.
Psymaster
6th September 2002, 15:57
When you get a bigger size, you used a bitrate higher than the one used in the original file. Even then, the quality will be worse than the original, since you're recompressing an already compressed file using a lossy compression technology
But how can it be worse, if the file is the same size? Shouldn't the lost quality be lost bits? I'm trying to think logical here and I don't know what I'm missing.
Psymaster
7th September 2002, 08:24
So, I guess nobody knows what goes on here...
eXistenZ
7th September 2002, 16:40
Originally posted by Psymaster
Shouldn't the lost quality be lost bits?
well,... in one word,... no
there's no straight relations between the amount of bits and the quality achieved, it's all about how "good" the available bits are used...
it's simply the principle of compression
Bye, eXistenZ
Psymaster
7th September 2002, 21:49
it's simply the principle of compression
Come on man... we're talking about a high compression codec, a very advanced one. It doesn't throw bits away like that. That's what I think at least.
Zhnujm
7th September 2002, 22:01
@Psymaster:
you forget that the codec sees your already compressed file as a new source. it can not know how the original file looked like. its not easier to compress this new source as the original one.
manono
8th September 2002, 06:01
Hi-
Give it up Psymaster. DJ Bobo gave you the correct answer the first time, yet you keep pushing it. If you don't believe everyone, why don't you run your own tests? Encode a few minutes section of a movie about 50 times and then come back and tell us there was no degradation of quality.
Psymaster
8th September 2002, 13:59
WTF???
Give it up Psymaster.
I have nothing to give up because I never said that not losing quality is possible. I just wondered how this is happening. Next time take a minute to read what someone has posted before you start flaming them.
If you don't believe everyone, why don't you run your own tests?
There's no need to do this, since I already know that the quality will be worse.
If you can't help with the question, simply do not answer and everything will be better.
mikeson
12th September 2002, 02:24
But then how is it possible that the recompressed file can be the same or even bigger size?
If you use higher bitrate than your "source" was encoded in or some of features that weren't used on your "source" (like B-Frames or PSY), file can be bigger than original (as DJ Bobo said).
Guest
12th September 2002, 04:30
The losses from cascading multiple times through an identical encoder with identical settings are greatly exaggerated by most people. Try it for yourself everybody!
DJ Bobo
12th September 2002, 11:29
@ neuron2
I never said there is always terrible losts, but the lost is there. It's variable, sometimes small lost, sometimes not detectable and sometimes really hearable and/or viewable losts.
For example, when I take a quality based 100% DivX encoded movie and reencode it to quality based 100%, I'll hardly see any lost, but the lost is there (just take a look at subtitles or something like that, there is a little bit more mosquito noise around them)
Also in audio, I took a 128kbps MP3 file and reencoded it to 192kbps. It doesn't sound as "brilliant" as the 128k file.
bb
12th September 2002, 14:02
It depends on the encoder, and on the source quality. I made some test with cascading MJPEG q19 on an anime source. Although mosquito noise is very visible in anime there wasn't much of a difference even in the 20th generation.
When I re-encoded parts of a DivX5 direct TV capture (to get rid of the commercials frame-accurately), there was a very visible loss in quality - although it was a single generation only.
bb
cordraconis
15th September 2002, 14:27
Sorry to butt in on this, but before I had a fast PC with a DVD-drive, I used to recompress a lot of 2 Cd-rips to 1 CD, so I daresay I have some experience with recompressing and applying filters on already compressed sources.
My explanation for the "possible bigger filesize", even with recompressing @ same settings, would be ... artefacts.
Since MPEG-4 is block-based, there will be artefacts (or "squares") in the pic, and even if you don't see them, the Codec (which does indeed *not* know if the source has already been compressed) still can "see" them, and will use higher bitrate for encoding the squares.
I used to do smoothing, denoising, and changing the contrast [Get less colorvariation], and after that, even Sharpen the image (which makes more details, so one would expect to have worse quality @ 1 CD-rip).
A very good example is the opening scéne of "Cast away".
(Which I'm now totally sick of, since I saw it *too much* :rolleyes: )
On the 2 CD-rip I borrowed, there was a lot of noise in the Sky. When I re-encoded the whole movie, using no filters @ all, there were a lot of macroblocks in the sky. After smoothing, denoising, changing contrast, and sharpening ... the whole sky was "smeared out", and it encoded *way* better than the original one. Since the whole movie has a lot of these quiet low-motion scenes, the whole movie looked "quite satisfactory." :D
I'm not a "theoretical filter expert", but I think that Donald Graft or some other Filter-programmers can concurr that with recompressing MPG-bitstreams, it is advisable to "smooth-out" even *unseen* artefacts, since these can be responcible for the bigger filesize.
Hope to have helped the person who started this thread ...
Cordraconis.
aliens3
18th June 2003, 13:35
@cordraconis
Could you give some filter combinations you used when you recompress a movie, because I have this problem with files slightly bigger than a CD ??
cordraconis
21st June 2003, 09:07
I don't remember them so well, since my last reencode was more than a year ago.
I guess temporalsmoother in virtualdub is a first one.
dynamic noise remover is also one I remember.
But if I now use a filter (on DVD source), then I make an avisynth script with Convolution 3D.
check the appropriate forum for that please.
And as always: check different settings, look and pay attention to details. I can't give you a suggestion that will work on everything, since every movie is different.
good luck!
edit: try to cut of the begin/end credits, and if the file is still to large, try demuxing the audio and recompressing it.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.