Back Forum Reply New

MPEG2 quality

I am trying to get my Xvid encoding to look as good as a MPEG2 encoding.  I have tried changing around many settings in different combinations (Motion Search, VHQ, Qpel, Chrom motion, (MPEG, H.263)) and even when I make it so the filesize ends up the same as my MPEG2 encoded clip, the MPEG2 one still looks better.
The mpeg2 one is smooth, almost no blocks can be seen, yet it does not look washed out.
The Xvid one looks good too, but many block can still be seen.

Shouldn't a MPEG4 video look better than a mpeg2 video of equal size?

Am I at the limit of what I can do with the settings I mentioned above?  Do I need to try some custom quantization matricies or try changeing the Alt Curve settings?

I've read several guides that explain what each setting does, but I guess I lack the experience to get really good results.

the only way to have the same quality for the same filesize, is of course to don't transcode the source  

however, for very very high bitrate, try to reduce the max i-frames interval and use a high quality matrix (andrea's one maybe)

Originally posted by Sigmatador
the only way to have the same quality for the same filesize, is of course to don't transcode the source  

however, for very very high bitrate, try to reduce the max i-frames interval and use a high quality matrix (andrea's one maybe)

what do you mean by quot;transcode the sourcequot;?

I have one source video file.
I create one compressed using MPEG2 and one using XviD
Both the same filesize.
Shouldn't the MPEG4 one look better than the MPEG2 one?
Ofcourse I my goal is not to make the XviD file so large, I just want to beable to make it look at least as good.

I'll start trying different quality matricies

I have one source video file.

And would you mind telling us what kind of source file? Is it that thing in your sig? Huffyuv, MJPEG... Or do you capture directly to XviD? Interlaced, progressive? Low or high quality?

Etc., etc.

Shouldn't a MPEG4 video look better than a mpeg2 video of equal size?

Not necessarily. If you use settings that are optimized for speed (=deactivate many features that give MPEG4 an advantage over MPEG2), you won't get the best possible quality of course. And if you use 'CBR' you won't get anything watchable, anyway. It really isn't that easy. So you can't possibly expect to get any meaningful ideas from other users if you describe what you're aiming to do so vaguely.

ok i didn't have understood that you make the mpeg2 and the mpeg4 from the same source.yop, can you telling us what kind of source is it. in the case of a capture, you can use a lossless codec (vble ^^) and reencode it with 2pass (for both mpeg2 and mpeg4 format)

imho, mpeg2 could be more efficient on very high bitrate.

Huffyuv, MJPEG... Or do you capture directly to XviD? Interlaced, progressive? Low
I've tried Huffyuv, MJPEG, Divx5 (1pass, 150000, fast, interlaced) and XviD (everything off, quant=3, interlaced), MPEG1, MPEG2
My results do not seem to be as good when using Huffyuv and MJPEG.

I then recompress using Xvid 2pass
I've tried a many different combinations of Motion Search=6, VHQ, B-frames or noB, chroma motion, MPEG or H.263, ...
But in each case, when comparing to MPEG2 (or recompressing to MPEG2), it looks worse.

My goal is to simply make it look better than with MPEG2 with a smaller filesize, I've never been able to get it to look better than with MPEG2.  It is much more blocky.

Many of you have made many videos.  Do you think your results look better than MPEG2?
I wanted to know if it is necessary to use the custom quant. matrix?

Try this guide amp; could you tell us what the file size difference between the mpeg2 amp; the XviD encodes are?

Originally posted by BiaTch 5.0
Try this guide amp; could you tell us what the file size difference between the mpeg2 amp; the XviD encodes are?

Yes I have read that guide already
The file size difference is zero.
I set the 2pass to encode the Xvid so it would end up being the same size  as the MPEG2.

Well, what about this source? What codec was used, what resolution, what is your target resolution, how much noise is there in the source, have you tried using any noise reduction filters etc. ?

About the blocks you experience in the xvid, do they appear everywhere or only in high/low motion scenes, light/dark scenes?

I tried serveral different codecs capturing TV from a capture card.

Originally posted by Enrico Ng
Huffyuv, MJPEG... Or do you capture directly to XviD? Interlaced, progressive? Low
I've tried Huffyuv, MJPEG, Divx5 (1pass, 150000, fast, interlaced) and XviD (everything off, quant=3, interlaced), MPEG1, MPEG2
My results do not seem to be as good when using Huffyuv and MJPEG.The resolution is 640x480 and I am leaving it at that res.
I can't say that its crystal clear like a DVD, but its pretty clear.
I'm not sure how to describe it.  The source is interlaced.
I use the quot;smartquot; deinterlacing filter.

The blocks are pretty evenly distributed through out the scenes.
They are present in all scenes, but are far more visible in high motion scenes.

I'll run some more tests tonight (as I do everynight it seems)

Originally posted by Enrico Ng
I tried serveral different codecs capturing TV from a capture card.The resolution is 640x480 and I am leaving it at that res.
I can't say that its crystal clear like a DVD, but its pretty clear.
I'm not sure how to describe it.  The source is interlaced.
I use the quot;smartquot; deinterlacing filter.

The blocks are pretty evenly distributed through out the scenes.
They are present in all scenes, but are far more visible in high motion scenes.

I'll run some more tests tonight (as I do everynight it seems)

Well, using Huffy or MJPEG at max quality should give you the best results. Prehaps you could upload some pics of the source and the xvid for us to compare? (select a frame in Vdub, Video\Copy source frame to clipboard and then paste it into photoshop or paint or whatever you use and save it using a somewhat lossless codec) Also, could you post your xvid settings? (atleast from Global and Quantization tabs)

I'd try the hvs best or max-best matrix or even the 'professional quality' one which has been posted somewhere in this forum.

The problem with the standard matrices is that, since you cannot go below quant 2 in two-pass encode, they constrain bitrate where it might be needed. A matrix with lower values gives the codec the freedom to spend bitrate when it 'thinks' it is necessary. [edit] Furthermore it will be abel to adjust in a more fine graned manner to the needed bitrate, consequentially not killing more detail than necessary ( which it would have to reconstruct later on btw, because once gone it can no longer be used for prediction) this is why, for me, I multiplied all values in the mpeg matrix with 2/3. Only the values in the bottom right corner (4*4) are higher in order to compress stronger the very-high-detail levels. The hvs matrices use a similar approach afaik.

About b-frames, it might be useful to use very conservative settings like 2,125,100,50 or to disable them altogether.

VHQ: I'd use the 03052003-1 koepi build with vhq set at 1. But this is just me not trusting the younger algo.

Which bitrate are you using?
How much noise is there?
Are there many fades, much smoke, fog or similar things?
Is there much motion?
Is it good (predictable) motion or handy-cam-like jerks

The bottomline is that, if the clip is of a nature that does not allow to use advanced features of mpeg4, they will do no good.BTW I'd be curious how rv9 would do in your case.

please please please be more specific and exhaustive while being synthetic: it took about 8 posts just to know resolution, and still we don't know the bitrate!!! this argument is very interesting to me, but by now it's impossible to give any opinion. to post Xvid settings in an effective way maybe you can use xvidset,do a search to find it.
furthermore,doin' XviD 2pass, did you retained 1st pass? does it shows same defects or not? and what is 2nd pass/1st pass percentage?

Im interested by this too, as to me, MPEG-2 is far more simple than MPEG-4, so in theory MPEG-4 should beat it always.

So I asked syskin about it...he stated:
quot;I think it has to do with quantization range - at high bitrate, mpeg4 has to work in range between 1 and 3, so it doesn't have a big choicequot;
(i.e. at high bitrates the difference between quant 2 and 3 is large and that causes loss of details)

Try with info from these threads:
Professional Quant Matrix
showthread.php?s=amp;threadid=53924
Studio Quality
showthread.php?s=amp;threadid=53632

Let me know how everyone gets on

-Nic

Originally posted by Nic
[B]Im interested by this too, as to me, MPEG-2 is far more simple than MPEG-4, so in theory MPEG-4 should beat it always.

.. at high bitrate, mpeg4 has to work in range between 1 and 3, so it doesn't have a big choicequot;
(i.e. at high bitrates the difference between quant 2 and 3 is large and that causes loss of details)

Hi Nic,

Lowering the values in the qmatrices, if i understand it corectly, should result in an overall higher quantizer, in a 2-pass scenario of course. This, in turn would mean that the codec can adjust the quantization more finely(?) because e.g. the difference between qmatrix value*quant4 and qmatrix value*quant5 is less than between qmatrix value*quant2 and qmatrix value*quant3.

Do I make myself clear?

Originally posted by Nic
Try with info from these threads:
Professional Quant Matrix
showthread.php?s=amp;threadid=53924
Studio Quality
showthread.php?s=amp;threadid=53632

Let me know how everyone gets on

-Nic
Not that I’m knocking Bishep but he changed his opinion about Quartelpel 3 times. I myself was wondering if I should use Qpel.

Ok, today the two things I asked syskin about was MPEG-2 vs MPEG-4 and QPel (what a coincidence hey?  )

Anyway, I couldnt understand why QPel wouldnt improve the image always. (apparently the more accurate ME helps but the sub-pixel filter changes...and that doesn't help).

I.e. QPel will generally lower the PSNR  But on the plus side sharpens the picture

You'll have to make your own choice on whether to use it or not. And if you like its effect.

-Nic

@kilg0r3: Yup thats correct. Apparently with H264, the range is 1-64 so the quants would change at around 6-7 at high bitrate which is a lot less difference than 2-3. Sounds like H264 should perform well no matter the bitrate then

MPEG2 Quality is laughable. Remember that I encoded that matrix reloaded trailer at insane resolution (for people who don't know what I'm talking about: I encoded the Matrix Reloaded trailer at 1600x864 res with a target size of 100MB) ? I still have the original VBLE file (1.4GB), and I encoded it into maximum DVD resolution and bitrate (that is 720x576 anamorphic 16:9 at 8Mbit/s) with CCE. The file is 30MB bigger, and the quality (not to mention sharpness because of resolution loss) is much lower. Viva MPEG-2 .

PS: The quality was higher than that of ANY retail DVD you could get your hands on though . It also had no noise (only DCT noise from encoding).

I find this thread very interesting.
I have been using Xvid to capture digital satelite (mpeg2).
The best setting I have found is 1 Pass, fixed Quant 2 in both MPEG and  H.263. I force a key frame every second (25frames)
I have tried many combinations of settings and custom matrix.
I capture at 720x576 PAL and have never been happy with the macroblocks and general compressed look.
Even at bitrates higher than DVD it is still blocky.
I want DVD quality or better at DVD bitrates . I just can’t get there.
I would use an Mpeg2 codec if I could find one that could be used for capture.
I have been looking for a solution for 3 years now.
My idea of quality must be higher than most.
I just dont think Xvid can do it.

Regards,

Owen

my opinion on this, because I tested CCE and XviD for a 2 CD rip of a DVD (movie length: 2h18min) last days. result: XviD won. the picture was clearer and less noisy than the one of CCE. But there was no big difference. Movie encoded: Black Hawk Down

this discussion is quite funny, because I think you cannot compare MPEG-2 and MPEG-4! it depends on that what you want at least.

in my case I backup very important movies to me to 1 DVD+R using CCE, because then I have a perfect rip - no visible difference between DVD and my rip, which is playable on most DVD players. So I use CCE with bitrates that are higher than 3.800 kBit/s.

If a movie is not important to me, but I still want a good rip, I use MPEG-4 encoder. Then I use XviD.  Movies that lasts longer than 2h I rip to 2 CDs and movies that last below 2h I rip to 1 CD and I get pretty good results. So at least I am pending at a bitrate from 700 kBit/s to 1.300 kBit/s.

Because of 2 different technologies, MPEG-4 compresses stuff very good, you cannot compare MPEG-2 and MPEG-4 at low bitrates. Ok, I did it, but I always want to see it.... to prove, I am right...
¥
Back Forum Reply New