Log in

View Full Version : HDTV to XVID help needed


mav_top
14th January 2005, 16:21
Ok i would like to encode my HDTV files (TS transport stream) in XVID to backup them in a DVD (4,7GB), now the question is that doesn't exist an updated guide about it, i found 2 guides about HDTV 2 xvid, but they are very old don't talk of matrix and all the rest, anyway i have used them up to know, but yesterday i discovered the quat. matrix. and navigating in the xvid setting i found lot of stuffs.

These are the guides i have found around the net

http://www.samek.neostrada.pl/hdtv/hdtv2xvid.htm

http://www.chade.org/HDTV/decoding/index.htm

The second one i never used because it use GKnot and i wanted to do it manually so in case of errors i could continue from the last step.

So i tried to understand all the settings in XVID panel but i had lot of problem to understand the real difference of all the settings.

Anyway my target is to put in 4,7 GB an AC3 audio stream with an XVID at the max bitrate possible and that can be runned easily also on less powerful cpu, so i got using the first guide with all the XVID default rips from 4100-4500 kb it depends on the duration of the TS files, but usually 1h 30m at max 2h 10m of video.

I was happy up to i discovered all the options and i wanted to ask which one are really useful and if they can be used, if they require more CPU to be used.

i see from guide that use SimpleResize() function, there is a why ? it is faster ? or there is a real why ?

these are the scripts i use

if source is 720p

Loadplugin("D:\AVIsynth 2.5\plugins\mpeg2dec3.dll")
Loadplugin("D:\AVIsynth 2.5\plugins\decomb521.dll")
Loadplugin("D:\AVIsynth 2.5\plugins\undot.dll")
mpeg2source("D:\your_project.d2v")
SelectEven()
Decimate()
UnDot()

if source is 1080i

Loadplugin("D:\AVIsynth 2.5\plugins\mpeg2dec3.dll")
Loadplugin("D:\AVIsynth 2.5\plugins\decomb521.dll")
Loadplugin("D:\AVIsynth 2.5\plugins\simpleresize.dll")
Loadplugin("D:\AVIsynth 2.5\plugins\undot.dll")
mpeg2source("D:\your_project.d2v")
Telecide(order=1,guide=1,post=2,vthresh=30)
Decimate()
crop(x,x,x,x)
UnDot()
simpleresize(1280,720) if 1,77:1 or 1280,544 if 2,35:1

for xvid i use 2 passes in the second pass i calculate the bitrate needed with that calc on the guide and all is done.

i use xvid 1.03 koepi

Now if u can explain if i have to use all these options or which one, i'm interested to have less cpu power to decode and max quality but in 4,7 gb space

PROFILE LEVEL (unrestricted mode)
Quant. Type MPEG (used) but want to use MPEG-CUSTOM for the matrices and which one to use ?
Adapt. Quant. Yes/No why ? it needs more cpu/time to decode/encode ?
Inter. Encod. Yes/No why ? it needs more cpu/time to decode/encode ?
Quart. Pixel. Yes/No why ? it needs more cpu/time to decode/encode ?
Glo.Mot.Comp. Yes/No why ? it needs more cpu/time to decode/encode ?
Reduc. Resol. Yes/No why ? it needs more cpu/time to decode/encode ?
BVOPS Yes/No why ? values ? Packed bitstream ? Closed GOV ?
Pixel Aspect Ratio Square

ADVANCED OPTIONS
Mot.Sea.Prec. 0-6 i use 6 why ? it needs more cpu/time to decode/encode ?
VHQ Mode 0-4 i used 1 now use 4 why ? it needs more cpu/time to decode/encode ?
Croma Motion Yes/No why ? it needs more cpu/time to decode/encode ?
Turbo Yes/No why ? it needs more cpu/time to decode/encode ?
Frame drop ratio ? i use 0
Maximum i frame ? i use 240
Quantization submenu
Min i-frame 1
Max i-frame 31
Min p-frame 1
Max p-frame 31
Min b-frame 1
Max b-frame 31
Trellis Quant. Yes/No why ? it needs more cpu/time to decode/encode ?

I dont want all the explanation of each single thing, but i see post with matrix at quant=4 , what means ? which quant at 4 ? i-frame, b-frame p-frame, others at 20-24 and so on and i dont understand.

i would like only to understand if matrix can help me or not and which one to use, same for VHQ Mode and Motion Search Precision, it is so important to use VHQ-4 and MSP-6 in 2 pass or i can use VHQ-1 and MSP-4 for example and get almost the same in less time ? simpleresize or lanczos4resize ? to remove some grain or dust from HDTV source which filters i can use ? they keep more time to encode ?

to encode HDTV stuffs in 2 pass it keeps 16 hours and i would like to do it only 1 time

thanks in advance
mav_top

AsTimeGoesBy
14th January 2005, 19:52
Originally posted by mav_top
Ok i would like to encode my HDTV files (TS transport stream) in XVID to backup them in a DVD (4,7GB),...

How big are these HDTV files?
After my experiences with transcoding TV captures i would say, save all that transcoding work if any possible (specially if the source is interlaced) and burn them directly to DVD.
If your player has problem playing/decoding Mpeg2 Transport Streams there is a tool called 'Project X (http://www.doom9.org/index.html?/DigiTV/projectx-fullguide.htm)' that makes the video stream compliant as those on DVD.


Making good Xvid will need maybe more (cpu) time than you are willing to spend, sorry. :(
However, check the Xvid FAQ (http://forum.doom9.org/showthread.php?&threadid=16935) section for sure (specially Crusty's FAQ) - it will give you a good impression about Xvid and its features.

Sergei_Esenin
14th January 2005, 23:21
Originally posted by AsTimeGoesBy
How big are these HDTV files?
After my experiences with transcoding TV captures i would say, save all that transcoding work if any possible (specially if the source is interlaced) and burn them directly to DVD.

Umm, not practical. A single programme on HDTV transport stream can be 9 to 18GB, or a lot more or less depending on length. Yes you can split it across many DVDs, but if you can recompress to XviD or WM9 it's much more manageable.

mav_top
17th January 2005, 11:24
it depends from lot of factors, but anyway they are from 8 GB up to 20 GB in size and i would like to put all in a DVD only but with almost same quality and this is why i want to use XVID with all the feauters possible, i will see them with my PC so no problem of player compatibility.

So i would like to know how much the quant. matrix help to increase quality or overall quality of the encoding, the average bitrate is around 4200-5000 kb for a 1280x720 resolution.

do i have to use an High Bit rate matrix or a medium-low ?

i tried an high rate matrix but i got around 6 GB xvid file, so i tried with a medium and got the right size 4 GB, but which one to try ?

for the rest of xvid settings ? which one are really needed for improve quality ? or removing blocking ? or anything else ?

thanks in advance
mav_top

Bruce Willis
4th June 2005, 01:16
I made a few 1 DVD sized xvid's of >10 GB ts files.. The result is very satisfying.

To keep a decent bbp (0.25 - 0.35) and to avoid a high CPU at playback, I choose a rez of about 1024 x 576 (if 16:9 of course).

From the xvid options, I only choose B frames 1/1/1, and chroma motion (6 - 1). Custom matrix: HVS-best.

LanczosResize, now trying Lanczos4Resize :)

Using ColorMatrix() to correct the colorspace.

No other filters, except sometimes undot (after cropping).

Of course always taking a 2-pass..

Inventive Software
7th June 2005, 10:53
If quality is of paramount importance, and it usually would be if transcoding, enable all of these:

Adaptive Quantization
Quarter Pixel
Global Motion Compensation
B-Frames (or B-VOPS)
Turbo Mode (without it, it can take a lot longer to encode, and the quality without this on is not exactly noticably better than with it on, if you know what I mean. ;))

Set Motion Search Precision to 6, VHQ mode to 1 or more. The higher the number (for VHQ mode), the longer it takes to encode, but your end result will be better looking. I generally use VHQ 1.

B-VOPS you can keep the default settings. Generally 2 or 3 consecutive is good enough to maintain good quality. Closed GOP is generally a good idea to tick as it can speed up decoding, especially with seeking.

Only check Interlaced Encoding if your source is interlaced. You should know this anyway.

Now for the detail.

Without Quarter Pixel enabled, XviD searches with Half-Pixel precision. This is fairly accurate, but Quarter Pixel (or QPEL as it's widely known) can increase your quality without much speed loss.

I can't remember what Global Motion Compensation (or GMC as it's known) does exactly, but just bear this in mind: enable it, expect slightly better quality, but a longer encode time.

Your motion search precision will have one of the biggest effects on output quality. The lower you set this, the faster your encode will be, but the worse it looks. This is one of those options where you really want to set it high.

VHQ mode adds an additional search process to the motion search precision. If you want your encode output to be higher quality, enable this, but remember, the higher the number, the longer it takes to encode.

Also, I noted you are using XviD 1.0.3. XviD 1.1.0 is a lot faster than 1.0.3, and will yield better quality in some areas. You also get another option: Use VHQ for B-frames.

I hope this helps. :)