Log in

View Full Version : HDTV to High Quality Xvid


drtj
10th December 2006, 01:50
I was hoping for some help and some critiques in trying to get the highest quality xvid avi from high definition digital cable captures. I have seen the type of quality you can get from this type of conversion and was hoping to reach that level and beyond. My goals are to have full 1080p avi with 5.1 sound. So far I have been getting pretty good results with the average size file of 1,400 for a 45 min show.

My method is 1st I run my .ts through mpeg2repair
2nd demux with DGIndex
Then I run this avisynth script through VDM:

[code]
Tfm()
Tdecimate()
RemoveGrain(mode=1)
RemoveGrain(0,11)

Then I run a 2 pass encode with the video and audio demuxed from DGIndex. I set the target size according to a ratio, basically 1 min = roughly 38 mbs.

Some of the specific questions I have are:
How does my avisynth script look? Any advice one way or the other?

What are the precise settings in VDM to achieve the high quality encodes that I am trying to achieve. I have read through 3 guides about what each setting does, but not any advice on what the settings should be, and how it affects overall quality. Things like should I use BVOPs? I think that I understand how they are used. Basically they take information from the frame ahead and the frame behind and compresses them, right? So those 2 frames that this info comes from, do they get dropped?

I’ve read about the quantization and different quantization matrices; one for high bitrate, low bitrate, ultra low, and so on. Is there one that any uses to encode high quality hdtv captures to xvid?

How about quantizer restrictions? I’ve read for min that 2 is better than 1, because 1 results in big file size with not much more quality than 2. So isn’t max 31 too high for what I am trying to do?

Is it a good idea to use VHQ mode 4? I am not worried about encoding times at all, I’ve got time, as long as we’re not talking about days and days.

I am not even sure if tweaking these settings will make that much of a difference. Will it?

I’ve had some issues where my encodes get a bit jumpy / blocky (hard to describe) in high motion and pan and scan scenes. Like something is flashing in between frames horizontally. There are no artifacts on the frames when I look at them one by one, but when played in succession, I guess it isn’t as smooth and nice as when there isn’t any motion or little motion. Any ideas to remedy this?

Here are 2 links to 10 secs of my encodes thus far if anyone is interested.


http://www.filecrunch.com/file/~7ed61y

Right before the first guy swings you’ll see what I am talking about in terms of high motion scene problems that I am experiencing, and then other guy retaliates.


http://www.filecrunch.com/file/~tlgoo6

And again as the last building is in a panning shot you’ll see it again.

I know that quality is a subjective term, so I guess I can put it this way. If I am willing to set aside up to 1,400 mbs per file, what settings should I use to get really great visually appealing results?


Any advice or information would be so appreciated. I also wanted to take a second and say thanks to people like neuron2 and pookie who have really helped me out a lot with getting me off the ground floor in regards to my encodes. I wouldn’t know what I know now if it weren’t for them. I am just looking for more info.

This forum rocks. Thanks.

I do apologize for the length of this post. Sorry.

Happy holidays.

chadamir
13th December 2006, 02:45
If you are going to encode at 1080p and have the horsepower to encode, you should use x264. As for the AVS script, it's going to depend on a video to video basis.

rumpleforeskin
13th December 2006, 15:51
If you are going to encode at 1080p and have the horsepower to encode, you should use x264. As for the AVS script, it's going to depend on a video to video basis.

many people prefur to use Xvid/DivX for compatibility with stand alone DVD players

drtj
13th December 2006, 19:56
many people prefer to use Xvid/DivX for compatibility with stand alone DVD players

As far as I know there is no standalone player that supports either the resolution or bitrates that these types of files kick out, is there? I have a Philips DVP3040 that will handle the lower quality .avi, the ones that are either 300 mb for 45 mins or 175 for 22 mins, but it won’t play the higher res or bitrate files that are usually 700 mb for 45 mins or 300 mb for 21 mins, or the ones that I am making, which is 1400 mb for 45 mins or 700 for 22 mins. It always says bitrate too high. I just use a computer with a DVI output to a HD TV that works really well, but it would be nice if there was a standalone that would do the same.

Turtleggjp
13th December 2006, 23:48
I would have to agree that finding a stand alone player that can handle 1920x1080 @ 24fps XviD clips would be pretty hard. Also, it takes a pretty powerful CPU to decode AVC at that size these days, although CoreAVC may do a pretty good job, if you can put up with all of its hassles...

I'd have to agree with drtj with going the XviD route. What kind of CPU do you have that you will be using to playback these files? I have an Athlon64 X2 4600+ (2.4 GHz) and it is able to playback 1080p XviD files very well, even using only one core.

As far as XviD configuration, I'll do my best to relay my settings that I use (I've tried to achieve similar high quality results myself).

B frames: Yes! Use them! I have it set to only use a maximum of 2 consecutive B frames, only because it very rarely uses more than that anyway.

Quantizer Matrix: Not sure, I just use H.263. Maybe someone else can comment on this.

Quarter Pixel: At this resolution, no. In my tests, it just uses more bitrate.

GMC: No, I doubt it helps much and will probably just slow down encoding and decoding as well.

VHQ Mode: I use Mode 4, Wide Search. If you can afford the extra time, go for it!

Quantizer Limits: I have all set to 1-31 (enable all). It never uses 1 anyway. I also do have Trellis enabled.

VHQ for B frames: No.
Chroma Motion: Yes.
Turbo ;-): No.

Maximum I Frame Interval: I've heard that some people like to use 10x the frame rate for this, but I like to use a fixed value of 100. I like to be able to seek my files fairly quickly, and XviD seems to do a pretty good job of inserting I frames at scene changes.

Frame Drop Ratio: 0 (not sure why you would want this setting any higher...).

Finally, when it comes to bitrate and quality, you should get pretty decent quality by using Single Pass and Quantizer 5. If not, 4 should do it. Any higher (lower?) than that and you file will get very big. Personally, I take it a step further and do a 2 pass encode. The first pass runs at Quantizer 2 (not sure if you can change this, but it works fine). I have it discard the first pass, but I take note of the bitrate during the first pass and then I multiply it by a certain "quality ratio." I have found that for video this size, 40% is enough for me. Therefore, if the bitrate from the first pass was 7658 kbps, I would set my second pass bitrate to 3063 kbps (7658 x 0.4 = 3063.2 -> Round off -> 3063). Here's where you can easily experiment with quality, since you can do just one 1st Pass, and then do several 2nd Passes with various bitrates to find your own perfect balance of quality and size. As long as you base your 2nd pass bitrate on the 1st pass bitrate (which will vary depending on content) the quality should remain very consistent.

That's my method. As others will tell you, everyone is different. Once you settle into your own method though, you should be able to crank this stuff out pretty quickly, like me. Good Luck!

Matt

P.S. How is it you are able to capture digital cable? I can only capture the unencrypted local channels with my Fusion HDTV card. Can you capture from your cable box?