PDA

View Full Version : Recompressing dvd's


crazydave
8th February 2006, 21:11
when a program does dvd-9 to dvd-5 conversion does it actually re-encode the video or does it simply remove information from the existing mpeg streme?

im using nero recode as part of the nero 6 reloaded package

r0lZ
9th February 2006, 12:41
Nero Recode (the commercial version of DVD Shrink) does not recode the video! It removes simply some information in the video pictures, and if you wants so, it strips audio or subpic streams. That's all.
Of course, it is best to use the Deep Analysis and the Quality Enhancement options.
Theoretically, this method is not as good as reencoding the video with a real mpeg encoder, but IMO you can safely use it as long as your comperssion level is above 70 or 80%. Most of the time, the degradation is not perceptible. Maybe the image is a very little bit more blurred.

crazydave
9th February 2006, 18:14
a real mpeg encoder?

r0lZ
9th February 2006, 18:51
a real mpeg encoder?... like CCE or TmpgEnc.
But to use this method, you have to demux the original video, reencode (and that step takes a very long time), then reencode, and replace the new VOBs in the original DVD. It's not easy, expansive, and time consumming.

Search the forum and the main D9 site. This method is described and discussed frequently.

frank
9th February 2006, 19:04
Originally posted by r0lZ
Theoretically, this method is not as good as reencoding the video with a real mpeg encoder...I have made professional measurements of compressed picture quality. You can use an Avisynth script and calculate the psnr quality value (as encoders internally do).

Result in short:
Nero Recode / DVDshrink with the options described by r0lZ have the best picture quality!
(= the lowest differences at all from the original)

Note that the resulting bitrate of the video is responsible for the quality. No bits no quality, period!!! If the resulting video bitrate sucks below 3.5 Mbit/s then you can forget good results on DVD.

You can improve the picture quality (about 10 %) if you convert a 16:9 anamorphic stream into 16:9 letterboxed. You'll get black borders (= no information) + lower vertical resolution, and that saves bits! But this needs a MPEG2 encoder - and much time.
For example: letterbox is used by the first Titanic release (183 min).

MPEG transcoded frames are a sum of rectangular waves (coefficients in matrices).
Every picture compression removes fine resolution pixels (waves), resulting in more smother and blurry frames, depending of the compression level. That's a physical law.
You can compare it with an audio low pass filter: lower frequencies - lower information.
Or MP3: High compression = lower bitrate -> lower frequency response, shitty sound.

r0lZ
10th February 2006, 13:13
Result in short:
Nero Recode / DVDshrink with the options described by r0lZ have the best picture quality!
(= the lowest differences at all from the original)Hey, that's nice to know! Good work, frank!

BTW, have you made some tests with different options (for example with the Quality Enhancement setup not being the default, Sharp)?

Also, which encoder have you used to test?

frank
10th February 2006, 17:52
I've tested the best encoders available: Cinema Craft Encoder 2.67.00.27 and Canopus Procoder 2.0.
Procoder makes somewhat better encodings on interlaced material (television).
Real interlaced material (live video, season DVDs) is very hard to shrink. Bitrates lower than 5 Mbit/s produce more and more blockiness. Interlaced season DVDs like Maried With Children (Al Bundy) are not good to shrink (~ 5.1 Mbit/s), you have to use Double Layer. Reencoding did not solve the problems.

Nero Recode is my favorite because of the high speed. Results are equal to DVDShrink.
Best results in DVDShrink you achieve with quality= Maximum sharpness, but sharp is standard.

To select maximum sharpness in Nero Recode you have to change the registry entry:
HKCU\software\ahead\Nero Recode\Preferences\CompressMode = 3

r0lZ
10th February 2006, 18:31
Thanks again, Frank! Very useful info!

jsoto
13th February 2006, 10:06
I'm not going to discuss about "professional measurements" but what is generally accepted (and it makes sense) is that an encoder is always better than a transcoder, but at lower compression rates nobody is able to detect the differences.... See
http://forum.doom9.org/showthread.php?p=544441#post544441

Some additional comments about encoding:
Interlaced: I'm not an expert, but there are specific methods to encode interlaced material in the right way, and, in worst case, you can also convert it to progressive with an encoder...

Bitrate: The required bitrate needed to get a good quality output (measuring the Q in CCE, i,.e.) depends a lot on the compressibility of the input. A graned video or some scenes made with many camera movements (on shoulder) are really difficult to compress. Graned can be filtered, but camera movements are really a nightmare..

Filtering: Encoding allows you to do any kind of filtering. The simplest one is KISS. Note the jdobbs' comment on Undot() and Deen() on the thread above. There is also a lot of info in DVD2SVCD forum about using Undot().Deen() to get a better output (using high compress factors, that means low bit rates). In fact, it is conditionally added by D2SRoBa plugin if Q is too high

Format changes: I know there are some transcoders able to change output resolution, but AFAIK, noone is able to do format changes, like NTSC to PAL, anamorphic to leterboxed, zooming, etc. You can do all of these using an encoder.

jsoto

frank
13th February 2006, 19:38
Originally posted by jsoto:
...that an encoder is always better than a transcoder
One of the biggest misunderstanding thing because people don't know how DCT (and the whole complicated encoding procedure) works. I know this discussions.

I mean shrinking without any tricks. Basic encoding and shrinking to the same resulting bitrate should be compared.

Ok, you can do filtering, format changes, and progressive conversions for picture enhancement with encoders/Avisynth. Results may have another bit distribution, and more smoothness. But that are processes that change the look of the original. Such results are basically not comparable with transcoders.

Transcoders work on DCT (discrete cosine transformation) level. Mathematically you can do the same filtering on both the real picture and the DCT level. Results are equal but transcoders work much faster because they don't need to decode streams and recalculate moving vectors. Filtering is realized by cutting/modifying matrices. (Analogous to transformations like Fourier-, Pascal-, Z-transformation.)
In our case, shrinking, the transcoder works as a low pass filter, removing higher frequency rectangular waves by cutting such coefficients from the matrix (increased quantization).
More zeros - better compression. You get a lost of fine structures.
The encoder works in the same way! Lower bitrate -> lower resolution, and higher quantization.

I define the best picture quality as the minimum difference from the original. PSNR shows the difference in dB very reliable. Most people don't know that the PSNR operation is internally implemented in (hardware) MPEG encoders to control Q an bitrate!

Here some numbers:
If you look very close, a PSNR step of <= 0.5 dB is not visible.
(PSNR = Peak signal to noise ratio)

PSNR > 45 dB: good shrink
min. PSNR = 40 dB, otherwise blockiness starts in high-moving scenes.

PSNR < 43 dB: shrink falls down
Encoding (DVD-RB/Avisynth) with all tricks enhances the quality (anamorph -> letterbox, progressive, h = 704 (instead of 720), overscan blackborders..)
PSNR enhancement = 2-3 dB.
Nowadays I prefer using Double Layer on this behaviour. (streams > 135 min)

PSNR < 40 dB: Crap

You'll get the best picture improvement by editing the DVD with PgcEdit/VobBlanker, and cutting out unused streams and material!

jsoto
13th February 2006, 20:47
Well, it's not so simple as you say...

Frankly, I do not know exactly the maths of a transcoder, although I know what is a DCT and what is a low pass filter (I've worked in DSP algorithms, but not in video), but you have to agree that using an encoder you have much more degrees of freedom to generate the output, and this is the reason to produce a better quality. In example:

- Use open GOPs instead of closed or self contained ones (usually in originals).
- Change the selection of the I frames.
- Recalculate motion vectors, using other criteria.. Did you try the different options in motion search using TMPGEnc? They show really different quality (using the same input, same bitrate, same resolution, same all).
- Reallocate the bitrate with a better criteria. This takes more sense if you are doing some filtering.

But, anyway, the quality is in your eyes, and if you are happy with shrink, OK, it's your decission.

However, I agree with you that for very long movies and taking into account the cost of the media, the option should be DL or to split in two DVDr.
But I take the decission to split (I do not use DL) based on the Q factor of CCE calculated by D2SRoBa, which gives me an indication of which quality I'm able to get. Not on the length/bitrate. In example, StarWars (very long movies) are also very easy to compress, seems the originals have very low noise and not too much camera movements.

jsoto

frank
13th February 2006, 23:19
Yes I know all that tricks. Some years ago I favorized SVCDs, and I have driven the CCE and Avisynth to the best quality. TMPGEnc was not better than CCE (for MPEG-2). Even I converted the sound from AC3 5.1 to MPEG-2 multi-channel 5.1 (Yes it works! :D But who needs it.) Later I worked on the DPL II matrix and DSPguru has implemented it in BeSweet.
But then came the DVD burners, and now the time is over...

I agree that you have much more freedom to screw encoder parameters. For example the bias in CCE determines the bit and quantization distribution...
I cannot write the hole story of tests. But quality is the most important thing.
There are more facts that people forget:
- 2.35:1 movies are good to compress - because of black borders.
- 4:3 interlaced format is the hardest material.

I have about 200 movies. If the length is about 2 hours then no encoder could beat Nero Recode (cases where PSNR > 44...45 dB). Animated menus it can convert to stills or DiaShow. Before shrinking I removed all unnecessary crap. Only title and chapter menus remain.
Critical were only the long time runners: Titanic, LOTR,...
And live concert dvds (interlaced). In the case of Woodstock (3 hours) the anamorphic to LB conversion was the best way.

Yes, the DVD encoding quality is better than in the first days. Gladiator, LOTR, StarWars are good examples.

But then came the DVD DL burners, and now the time is over... for shrinking and re-encoding. :D

jsoto
13th February 2006, 23:43
Some years ago I favorized SVCDs, and I have driven the CCE with Avisynth filters to the best quality. Same here

TMPGEnc was not better than CCE (for MPEG-2). Agree...

Even I converted the sound from AC3 5.1 to MPEG-2 multi-channel 5.1 (Yes it works! :D ) Me too!. I 've around ten SVCD in perfect 5.1! I remember I had to convince many people that bbmpeg+VCDXBuild works and you did not need I-Author.. (unfortunately, only a few players are able to reproduce this audio in SVCD)

But then came the DVD burners, and now the time is over...
.......
But then came the DVD DL burners, and now the time is over... for shrinking and re-encoding. :D

And now Blu-Ray + HD-DVD is coming, so we'll need to start again... Decrypting, blanking, shrinking, reencoding......:D

jsoto

r0lZ
13th February 2006, 23:55
I'm not sure Blu-Ray or HD-DVD will win the commercial battle. Ppl are happy with standard DVDs, and the industry has, IMO, very little chance to impose a new standard. And, of course, the fact that the new video supports will be better protected doesn't encourage to switch to those new media.
See the defeats of the recent audio supports, including the DVD-Audio. 99% of the human beings are happy vith CDs.

jsoto
14th February 2006, 01:00
I think Hollywood studios will move quickly... Much money is involved. In a few years (may be only one or two) a settop will cost 50 euros as today with DVDs, so they can give you a settop for free if you buy.. let's say, a trilogy in HDTV resolution....

Note this is not the same case as DVD and VHS. VHS copies are analog, so always degraded... DVD is digital, so you can do a perfect copy.

jsoto

frank
14th February 2006, 10:36
I remember the 60/70tees. We had great 70 mm cinemas with 6-channel magnetic sound: Spartacus, My Fair Lady, Star Wars... 4 x greater picture area.
What an experience! But they disappeared.
r0lZ maybe right.. :scared: