Log in

View Full Version : Suggestions for TV on DVD backups


Roscoe62
21st December 2004, 21:13
Hi,

There seems to be a good number of people on this site with VAST experience in setting up best-methods to get best results for good quality encodes, so I'm hoping to leverage off some of that.

I now own a large number of TV series on DVD that I'd like to rip and place on my server for playback through my HTPC. Up until now I've just used DVD Decrypter to rip the whole disc and then use DVD Shrink to break them up into individual episodes. However, I've got close to 200 episodes of various series which takes up a LOT of HD space in it's native VOB format so, since it's only TV stuff which isn't the highest video quality I figured it didn't need all that space and could be converted to XviD without losing any quality.

So far all the episodes I have are 4:3 ratio, don't have 5.1 soundtracks and are a mixture of NTSC and PAL. I'm looking for a final filesize of around 300Mb +/- 10% per episode including sound.

What I'm looking for here is some guidance as to the best settings to use to ensure the best video quality but still staying within the target filesize. Hey, if I can get the same video quality for a smaller filesize...even better! I did try some of Sharktooth's high quality matrices just as an experiment, and they came out OK, but the filesizes were larger than I'd like. Again, it's only TV episodes so ultra quality is probably wasted effort.

ANY guidance is appreciated.

Thanks!!

pelle412
22nd December 2004, 14:23
If your target of these encodes is to watch them on a TV, you can be a bit more aggressive in squeezing some more bits out of them. Here are a couple of things I do when I encode TV episodes for TV viewing:

1. Use noise filtering via AviSynth. My favorite is PixieDust although that it somewhat slow. You may want to try PeachSmoother for good results also. The PixieDust speed disadvantage can be reduced by encoding to huffyuv first and then feed that into XviD.

2. For TV viewing you probably don't need a large resolution. Try to encode one episode or a short clip in a 512x384 (assuming 4:3 aspect ratio) resolution and compare it to a 640x480 encode to see if you can spot the difference (from a few feet away).

3. My favorite set of XviD options (for TV encodes are):
Adaptive Quantization (saves some bits w/o visual degradation), Default B-Frame settings (don't mess with them, they're well tuned), H263 quantization (very good for most situations), VHQ 4 (this is slow but squeezes a bit more out of the encode, you could use VHQ 1 for faster encodes but slightly lower quality at the same filesize), Turbo OFF, Trellis Quantization, Chroma Motion, VHQ for B-Frames.

I would also set up one zone which covers the main content of the TV episode and enable Chroma Optimizer there, and another zone for the end credits where you can use fixed quantizer 10 (some people claim to use fixed quantizer 31 but the space savings over quantizer 10 is small and you can't see squat at quantizer 31).

Roscoe62
22nd December 2004, 19:53
Thanks for the advice Pelle412, I will give your settings a shot. On the one hand, all of these episodes will be watched on a 106" diagonal screen, so I don't think I can afford to compress TOO much, but on the other hand the source material isn't in "Pristine" condition (ex TV episodes)so perhaps that evens it out.

BTW....I thought H263 quantization tended to make the image softer. A lot of the source material is pretty soft as it is. Would using H263 soften it further? Also, does your method use a two-pass approach?

Thanks again!

pelle412
22nd December 2004, 20:32
I've found that H263 is just fine for all my encodes. The softening effect is IMO not noticeable unless you're examining zoomed up stillshots on a computer monitor. If you spend enough time doing research and testing, maybe you'll find some other matrix you like better and that produces file sizes that are acceptable to you. I've tried almost all the matrices I've found on this forum and I do see their benefits but overall I always seem to fall back to H263 as the best compromise between visual quality and compression.


A 106" diagonal screen? Yikes....


Yes do a 2-pass encode. I usually choose a compressibility factor of around 70 - 75%. Choose higher or lower depending on your taste.

Oh, and if you are watching it on such a large screen, do a test encode with QPEL turned on and see if the effect is positive for you.

Teegedeck
22nd December 2004, 21:34
Such a massive amount of TV-eps would be too much for me to calculate filesizes for. Lazy as I am I would probably encode them at SixOfNine custom quant=4 or 5 and only tackle with the filesizes of the last few episoded to fill the DVD.

For noisefiltering, I like removedirt - seems to preserve the original 'look' a bit better than other denoisers (to my eyes).

Roscoe62
23rd December 2004, 02:26
Thanks for the responses guys.

Teegedeck, I didn't quite follow what you were saying. Were you saying to use the SixofNine matrix for all the episodes EXCEPT where I'm finishing off the DVD, or use SixofNine ONLY when I'm squeezing the last few episodes on the DVD? Also, when using the SixofNine matrix, is it to be assumed that I'd use a single pass?

In any case, all of these episodes will be on a server - I won't be burning them to DVD.

Looks like I've got some more experimenting to do, but I really appreciate your advice!

Roscoe62
24th January 2005, 23:07
:( Sorry, but I need a little more help!

I would like to try to use AviSynth to apply the PixieDust noise filter as I have heard from many sources that it's very good.

However, with my current method I have NO IDEA how to use AviSynth. This is currently what I do

- Rip entire DVD to HDD using DVD Decrypter
- Break into individual TV episodes (PGCs?) with DVDShrink
- Use Robot4Rip to open DVD2AVI to demux audio & create d2v file
- " " " " ChapterXtractor to grab chapters
- " " " " BeSweet to transcode ac3 file to mp3
- Open GordianKnot to basically choose resolution & create avs file
- Open VDubMod, open avs file, yada, yada etc....

As far as I can see GK creates an AviSynth script as it's output, but I can't see how to enable or disable any AviSynth filters anywhere, and there doesn't seem to be an AviSynth "application" anywhere so I'm a bit confused. I've done some reading on the AviSynth website but I'm honestly none the wiser.

I'm guessing if I want to use an AviSynth noise filter I will have to change my method, and I'm aware there may be other tools out there that may do a much better job than those I'm currently using but I need some help! I'm not asking for a full step-by-step, but an outline and a point in the right direction would sure be appreciated.

Thank you in advance
Ross

Teegedeck
24th January 2005, 23:48
I believe AutoGK has a special mode for encoding episodes? I guess it would be easier for you to leave AviSynth-filtering to an application. If you still want to do it the manual way, you can start out by copying the lines that people in the AviSynth-usage forum post from their scripts. Of course you have to download the filters needed for these scripts and put them in your AviSynth plugins directory for convenience - or load them from any place by specifying the correct path in the script.

Roscoe62
25th January 2005, 01:06
Thanks Teegedeck,

I'd prefer to use an application to apply AVS filters (not being a programmer), but I don't know of any applications that do that, and I'm also not sure about where in my process sequence doing something like that would sit.

I did see a little AVS GUI called AVSGenie which might give me what I need, but I'd be interested to see HOW other more experienced users are incorporating AVS filters into their procedures.

Axed
25th January 2005, 08:13
Roscoe62, you can use Gordian Knot and still do what you want. Copy removedirt.dll into C:\Program Files\GordianKnot\AviSynthPlugins or wherever your GK is installed. Just put it in the \AviSynthPlugins subdirectory.

Under options of GK click "Use Advanced SaveAVS window". Its basicly the same and just looks more complex, but make sure the noise reduction is set to none. Click the '+' button on the 'filters' tab and find your filter you want to use, say removedirt, in the little dropdown menu. Instead of selecting options, just type for example in the typeable window part down the bottom "removedirt()".

Now you'll see it add 'removedirt()' to just under where it says 'RESIZE' next to where you pressed the '+' button.

It will automatically add removedirt() to each file you goto encode and use it now.

I'd like to give you pictures but i dont have any room to rip a dvd onto my computer to show you pictures.. ill see if i can clear up room and add them later if you need pictures to make it more clear.

pelle412
25th January 2005, 14:33
Here's a simple script that uses PixieDust. You will need LoadPluginEx.dll (search forum, you'll find it). When you try it the first time, AviSynth may complain about some other missing dlls such as msvcp61.dll or so, just google them and copy them to your windows/system32 directory and try again. Eventually you'll get them all there.

Also be aware that PixieDust is a very slow filter so if you plan on doing a 2-pass encoding, pre-processing to huffyuv may save you some time.


# AviSynth 2.5 plugins
SetWorkingDir("C:\AviSynth\")
LoadPlugin("DGDecode.dll")
LoadPlugin("UnDot.dll")

# AviSynth 2.0 plugins loaded here
LoadPlugin("LoadPluginEx.dll")
LoadPlugin("Old\DustV5.dll")

mpeg2source("C:\movie\x.d2v",cpu=4)
LumaFilter()
Undot()
ConvertToYUY2().PixieDust(limit=2)
# if pre-processing to huffyuv stop here
# else continue crop/resize
# ConvertToYV12()
# crop(0,64,720,352)
# LanczosResize(704,288)
# Undot()

Roscoe62
25th January 2005, 20:42
Thank you Axed!

I will give your method a shot this evening!

Pelle412,

I'm very keen to understand your script, and how it works. Assuming I correctly set up the directories to point to where I have the AviSynth plugins, and also where the source .d2v file will be located, would I use this script INSTEAD of the one produced by GK?

If I need to resize, (which I would normally do within GK) would I also include a set of lines for resizing?...I guess if that's true I'd also need the appropriate resizing filters for AviSynth?

BTW....I'm not worried about the PixieDust filter taking a long time to process. I usually just kick off an encode before going to bed, and another before heading off to work in the morning - no problem! As long as it improves the occasional noise problem I have with some of my TV episode encodes. :)

pelle412
25th January 2005, 22:24
I think when it comes to AviSynth, there really is no short-cut to success. Either you live with tools such as GK or AutoGK which makes encoding very easy but you do give up some control, or you learn to write your own script and encode with VirtualDubMod or avs2avi.

My simple script leaves out some things which are important to understand when writing scripts. There are telecine patterns to deal with, interlacing, field blends, different kinds of noise removal, and many more things.

If you are serious with encoding and understanding filters, you really have to take the time to learn and experiment. :-)

Roscoe62
26th January 2005, 06:40
Pelle412,

Thanks for your response. I do agree with what you're saying, but you've actually helped me quite a lot. I thought a good starting point would be to compare your script with the AVS script that GK produced for my last few encodes and I think I'm beginning to understand the required syntax now.

I only have one further question. For the extra dll's I'll require, do I need to "register" them with windows, or put them into a specific directory for them to work? Or do I just have to point to them correctly within the script?

Again, thank you so much for your help in pointing me in the right direction! :)

Cheers
Ross

manono
26th January 2005, 14:47
Hi-

do I need to "register" them with windows, or put them into a specific directory for them to work? Or do I just have to point to them correctly within the script?

No need to register them. There are 2 ways to get them to work. One way is to put them into your AviSynth Plugins folder, in which case they are loaded automatically whenever you open VDubMod.

The other is to load them yourself in the script from whereever you happen to have them stored. I keep mine in my GKnot folder, and then load them like so:

LoadPlugin("F:\DivX Stuff\GKnot\RemoveGrain.dll")

Roscoe62
26th January 2005, 20:21
Thanks manono,

So, if I have them in my Avisynth subdirectory, I shouldn't add the "LoadPlugin" line in my script? Any idea what would happen if I did?

ble
27th January 2005, 10:30
I don't know what is the advantage of doing a 2 pass encoding, when you are going to store the episodes on a hard drive. Whatever the method you use, try quantizer 3 or 4 with a pair of episodes and then choose the quantizer you want. But do just 1 pass.

Roscoe62
27th January 2005, 20:09
There are a couple of reasons I currently use 2-pass encoding - both related to my inexperience with using these tools

1) On the second pass of a 2 pass encoding routine the XviD codec allows me to accurately choose my filesize - this is important to me because, even though I'm backing up to HDD, I've got a TON of episodes to do and I must efficiently use the available space. I know others are using bitrate calculator apps to do that, but I haven't learned to do that yet.

2) ALL of the guides say the end result is better using 2-pass encoding unless you're an advanced user and know exactly what you're doing.......I don't really qualify!

I know I've got a lot to learn, but thanks to people on this forum willing to share, I'll get there.

Pelle412,

Whoa!!! I see what you mean about PixieDust being slow. I finally got my script working properly last night, and I was amazed to see on the 2nd pass my CPU utilisation occasionally going up to 99% and averaging around 75-80%( on a 3Ghz P4). Spending about 3.5 hours doing an encode of a 29 minute TV episode seems like overkill, but I checked the result this morning and I'm really happy with it!