high quality high definition content encoding

dreamlx wrote on 5/6/2005, 10:48 AM
I spent some time to test out how to obtain the highest quality 720p hd content encoding for a bitrate of about 25mbit/second. I tested XviD, Tmpgenc and the Vegas integrated Mainconcept encoder. I didn't include Nero digital and WMV in this test, as the goal was to encode content so that it isn't limited to proprietary solutions for decoding. The bitrate for all 3 encodings was the same. The result was viewed once on computer screen and once on a Sony VPL-EX1 projector (well only 1024x768 resolution, but the resolution was enough to see the differences).

My conclusions:

XviD: xvid is wonderfull for low bitrate encodings, but for high bitrates, even with tweaked parameters, a tweaked matrix, and constant q 2 encoding, it produced a less sharp image then any of the 2 mpeg2 encoders (for the same filesize).

Tmpgenc: when encoding in tmpgenc (using debugmode frameserver), I noticed a color shift and the image was also less sharp than the Vegas integrated Mainconcept encoder. Tmpgenc was the slowest encoder in my test.

Vegas intergrated Mainconcept encoder: this one really produced the sharpest result, and also colors where reproduced exactly. It was the fastest encoder also. I choosed this one for my future hd encodes.

If someone is interested, I can post a sample 720p 25mbit/s mpeg2 file encoded wirh my tweaked parameters. I can also post a template of my parameters (if someone can explain me how to share an encoding template).

I hope this information could be of use for some of you.

Comments

mdopp wrote on 5/6/2005, 11:07 AM
When you frameserved the HD material to Tmpgenc did you take care of the different colorspaces of SD (ITU.BT601) versus HD (ITU.BT709) ? This may be the reason for the color problems as Tmpgenc will only process 601.
Try searching the forum for "ITU 709". I've posted a Channel Blend filter setting that will do the job. Alternatively you could also search SONYHDVINFO.COM. There's much more on the issue in a thread under the NLE section.
dreamlx wrote on 5/6/2005, 11:47 AM
Well, I must admit because of less sharpness,more artifacts and longer encoding times in Tmpgenc, I didn't try extra testing to take care of the different color spaces.
B_JM wrote on 5/6/2005, 11:54 AM
if there is a color shift with tmpenc , you didnt use the right settings .. or failed to take into account that tmpgenc is a rgb input encoder ..

XViD @ 25meg/sec bitrate will be the best quality (in your choices) - you must of used some odd settings... . The quality is outstanding at that bit rate .. mpeg2 would have to be at about 32-44meg/sec (depending on encoder) to achive the same quality , mpeg2 at 40-48 and above would be better. But you can not adjust (in vegas) the matrix or b frame repitition anyway for HD mpeg2 , so you have to use a higher bit rate than in some other encoders (still can get very very high quality).
Editing the mpeg2 vs. xvid @ 25meg/s , i would go w/ the mpeg2 in that case (but would have used 50meg/s so it's a moot point (w/ no b frames and new I frames on scene change and a IPPPP seq otherwise - basicly almost mjpeg)

not sure where you are going with this - but these results have been tested over and over 1000's of times by many people - 100's and 100's of times myself included (with 100's of codecs) ..

the choice though between mpeg2 and mpeg4 should be made on what you want to do with the end results -- i.e , what type of delivery or what you plan on doing w/ these files....



B_JM wrote on 5/6/2005, 11:56 AM
also - i should point out that tmpgenc can do some excellent HD mpeg encoding .. very very high quality -- but then so can main concept and other encoders - with the right settings ..

dreamlx wrote on 5/6/2005, 12:20 PM
Well I personally would prefer going the xvid route. In fact for my application the format must be something playable in linux. So choices are limited to xvid and mpeg2. If you tell me you got better quality in xvid, could you please post your settings, so I could try using these ones.
B_JM wrote on 5/6/2005, 1:23 PM
Profile unrestricted
single pass - enter 25400 (note may default back to 10000)

profile -> more:
profile tab:
quantization = mpeg custom (edit matrix (i would use almost all 8's (16 bottom corner) or just use Bulletproof's High Quality Matrix (20's)) .

QPel = on (caution - may make incompatable with some players - check first)


use default for everthing else on that tab unless you really know what your doing .

aspect tab:

square


---

zone options - none (ussually)


--

adv. options

motion search = 6
VHQ = 1 or 2 or 3 (depends how much time you have , 4 doesnt add much more quality and adds a lot of time .. I use 1 or 3

USE VHQ for B frames

USE chroma motion

turbo - off (i have it on sometimes)

other - default

motion tab:

quantizer restrictions - default for now , you can tweak these though , but read up on what they are as you can really screw it up ..

trellis = on



note - i get better results frame serving from vegas to v-dub or avisynth and ALWAYS do resizing in v-dub or avisynth using the better resize filters ...






B_JM wrote on 5/6/2005, 1:25 PM
2 pass should get you even better quality - but tricker to use - try single pass for now ..

you might have to enter a higher number for bitrate to achive desired bitrate ..
dreamlx wrote on 5/6/2005, 2:23 PM
you are right, did a test using the settings you recommended. Xvid effectively looks better for 25mbit/s than mpeg2.