Log in

View Full Version : TV-capture settings


sbp
19th December 2003, 19:56
Hi trying to use the newest XVID (beta2) to make realtime capture from my TV-card

First let me say that XVID seems to do OK, on my system I dont have a lot of dropped frames but still - I have a few questions:

I would like to do one-pass capture.

1. Would it be possible to have a pre-designed profile for this, so we only had to choose it from the pull-down menu?

2. What exactly does these different profiles mean simple@l.1 , ARST@1.1 ect.

3. which settings should I use (now I use VHQ=1, no trellian, but I havn't changed the numbres for the b and p frames ect, what would be the best to use here?

Thanks for any help
Steen

Barton 2500, 256 DDRAM, medion Tv-card saa7134

birdy
19th December 2003, 22:46
Originally posted by sbp




(now I use VHQ=1, no trellian, but I havn't changed the numbres for the b and p frames ect, what would be the best to use here?


Barton 2500, 256 DDRAM, medion Tv-card saa7134

Using VHQ for direct capture dose not seem to be a good idea as it will make the codec much slower and it will result in frame drops!

What I do personaly for capturing with xvid is:

in single pass mode I set the bitrate I want (usualy 2000 to capture movies from digital satellite and watch with good quality and then delete)

In advanced tab I set the motion search perc to ultra high (but very hight is enough if ur pc is a little slow)

You can lower max quantizer values to achive better quality I set to 4
but you can go higher or even lower for better!

Bframes!!! in realtime capture thats again too slow and not recomended!

But all depends again what resolution you capture?
I do all my captures @768X576 with the settings mentioned here.

communist
22nd December 2003, 13:33
Use I-frames only / shorter I-frames interval.

sbp
22nd December 2003, 14:02
Thanks for your suggestions.

Could you help me by taking it slowly one at a time?

At the first scree in the config window (XVID 1.0 beta 2), I see
the following possibilities:
PROFILE@LEVEL: I have chosen DXN HT PAL (I realy dont know the meaning of this - but HT PAL looked right - capturing PAL from my TV)

ENCODING TYPE: Single pass

TARGET BITRATE (As you suggested I use 2000)

In ADVANCED OPTION:
MOTION SEARCH PRECISION: (As you suggested = Ultra high)
VHQ=1 Mode decission - I dont have dropped frames, and my file size seems smaller compared to OFF. IS THAT CORRECT?

No Chroma motion.

Frame drop ratio=0
Maximum I-frame interval 300, SHOULD IT BE SMALLER??

No to cartoon mode.

IN QUATIZATION WINDOW:
Min I-frame quant 2
Max I-frame quant 31
Min p-frame quant 2
MAx P-frame quant 31
Min B-frame quant 2
Max B-frame quant 31

No trelis quant.


These are my setting, any suggestions to improve??

Where can I find the H.263 or MPEG option in this beta 2 version, furthermore the QPel option is also gone???

Also if someone would help explaning the precise difference betweeen VHG off and VHQ=1-4, I would be very happy

Thanks

Steen

symonjfox
22nd December 2003, 15:03
I'd advise you to search a little bit on this forum. Most of your questions are somewhere explained.

Back to topic. It all depends on the resolution you acquire.
To gain some speed, if your TV card supports it, chose as source YV12 color space, or YUY2 (if YV12 is not supported). If you use RGB24 or 32 there will be a conversion to YV12 and this is a waste of CPU power (since you're capturing, you need all horsepower, right?).

Resolution: I read you're in PAL world (like me), check if the content you're encoding is INTERLACED or not. If yes, there are 2 ways:
1- Fastest (worse quality), chose 288 as vertical resolution.
2- Slowest (better quality), enable INTERLACING in XVID. You MUST keep 576 as vertical resolution (if you use someting like 544, 352 or other it's useless and image won't be better).
[NOTE]
Before acquiring, check in virtual dub mod the preview, if you see that there are no errors in horizzontal lines, then go and capture, else try swapping fields and check if the picture is better -for technical readings try to search about INTERLACING and SWAP FIELDS.

XVID settings:

Motion Precision 6 (always)
Chroma motion ON (OFF if your CPU is slow)
VHQ 1 (0 if your CPU is slow; 2,3,4 if you're capturing @low resolutions or your CPU is used less than 70% while capturing)
Trellis OFF (AFAIK it's no good in 1 pass encodes, it just decrease filesize and a little bit the quality, this gain is good in 2 pass VBR, because the bitrate gain, allows the codec to use a lower quantizer in the second pass -I know I am not so clear :rolleyes:)
B VOPS: depends on your target. You can try 1 or 2 if your CPU is fast enough. If you're capturing for reencoding, disable.

In Zone menu, chose the capture quantizer (for example 5 is good IMO). Using a fixed quantizer will speed up the encoding and also will give a constant quality (more or less) all over the capture. Instead using the classical CBR encode, you can predict the final size, but if there are 1)slow action - 2)high action - 3)slow action scenese, the result will be good for 1, quite bad for2, too good for 3. You can play with Reaction Delay Factor, but you will never know how good will be the encoding. Instead the fixed quantizer, you know how good will be the result (as you set yourself). You know that if you set Q2 the result will be big and good, if you set Q10 will be bad and small.

[NOTE] I don't know what is your target, but when I recorded with analog PC TV board, I used to record several hours of music videos (while I was working) and then cut and keep just the ones I liked without recompression. So I used settings that create a good quality video. If your target is different (example record,watch and delete) search again in the forum and in the guides and find your profile

I spent many many hours playing around settings for capture, but then I bought a DVB board, so I record MPEG2 material and I transcode it as I would do with a DVD.

Hope to be useful :sly:

sbp
22nd December 2003, 15:26
@symonjfox
Thank you very much for your great answers to my questions - it realy helped.
From your answer I think that you are using virtual dub for capturing.

My capture is done directly from the TV-program (TV-Plugin for myHTPC), and here I can select the resolution (I will check to see if I have chosen 576 as you suggested).

A: But where do I chose the INTERLASED option in XVID as you described?

quote: 2- Slowest (better quality), enable INTERLACING in XVID. You MUST keep 576 as vertical resolution (if you use someting like 544, 352 or other it's useless and image won't be better).


B: What do you think of the I-frame interval=300, another suggeted to reduce this?

C: You write something about VOPS, where can I find this in the XVID configuration?

D: Reaction delay factor, where can this be found?

I have a feeling that these settings are from the Virtual Dub, but can't they be adressed directly in the XVID configuration?

Thanks
Steen

symonjfox
22nd December 2003, 17:58
Originally posted by sbp
From your answer I think that you are using virtual dub for capturing.Yes, I use virtual dub mod, expecially for 4 reasons:
1- Has many features that most capture programs haven't.
2- I can chose YUY2 or YV12 as capture format
3- I can chose a random capture resolution (under Win9x, but not under Win2k/xp due to my board drivers).
4- Segmented AVI (to avoid 2 GB problems, since many AVI bigger than this make troubles with some softwares).
My capture is done directly from the TV-program (TV-Plugin for myHTPC), and here I can select the resolution (I will check to see if I have chosen 576 as you suggested).
I really don't know about it. Try. If you can, try VDubMod, it's very stable and you can do many many things (simple linear editing)A: But where do I chose the INTERLASED option in XVID as you described?In the configuration, near the profile type (the exact name is INTERLACING)
B: What do you think of the I-frame interval=300, another suggeted to reduce this?I think 300 is ok, because Xvid detects scene changes very well, so using 300 it will insert an I frame at least every 12 seconds (but it will surely insert it before, depends on material you're encoding).
C: You write something about VOPS, where can I find this in the XVID configuration?BVOPS ... it's in the same window as Interlacing, Profile, GMC, QPel, H263 and others.
D: Reaction delay factor, where can this be found?You must go on Zone menu. To access to this, click on the "edit" button in the main window.I have a feeling that these settings are from the Virtual Dub, but can't they be adressed directly in the XVID configuration?FALSE. All these settings are in the GUI (Graphical User Interface), just someone are more accessible than others ... try to push all buttons in the window ... you surely missed some one :D

avih
22nd December 2003, 20:33
in my experience (pal, BT878 card, BTWincap, virtualDub) ANY vertical resolution of MORE than 288 will capture interlaced (probably needs mod 2 though). i actually used this 'feature' when i wanted to use the pc as a VCR for sports programs, where i needed the 50fps, but i didn't have the CPU for full 576 lines capture. so i captured at about 400x480, and played deinterlaced (i.e. ffdshow+dscaler or avisynth bob). that worked well enough for me.

if i captured less than 576 (but more than 288) then it just dropped some of the lines, but it was distributed across the whole vertical range, so it wasn't noticable.

communist
22nd December 2003, 23:01
Originally posted by sbp
B: What do you think of the I-frame interval=300, another suggeted to reduce this?
As far as I know 300 is suggested for NTSC where 300 frames = 10 seconds.
For PAL change it 250 (=10 seconds too).

sbp
23rd December 2003, 16:34
Thanks for all your help.

@symonjfox: Thank you, I found all the options. I need to click on the .. just right of the profile@level drop-down box.

What is your opinion on the B VOPS settings?

The closed COB? is it any good for the real-time TV-capture.


@communist: I will try the I-frame=250. Do you think I should disable the B-frame, If yes, how do I do that. Is it in the IN QUATIZATION WINDOW: where I have these numbers?????
Min I-frame quant 2
Max I-frame quant 31
Min p-frame quant 2
MAx P-frame quant 31
Min B-frame quant 2
Max B-frame quant 31


Thanks
Steen

symonjfox
24th December 2003, 00:14
B VOPs are great, in most encodes they can give better overall quality.

You can chose 1 Bframe (for DivX compatibility, or high bitrate encodes), 2 Bframes (reccomanded for most encodes), 3 or 4 Bframes (for low bitrate encodes, not very raccomanded). Don't use more than 4 Bframes.

Always close the GOP because this will increase quality (since a B frames only uses next P frame, but not next I frame). There's a long explaination somewhere in the forum ... I don't remember.

Another thing is that doing so, you'll be able to cut the video because every B frame in the GOP will refer only to that GOP, so you can trim, cut, delete scenes, without problems.

sbp
24th December 2003, 10:33
Once again, thank you so much for taking your time in answering many of my questions.

In the B VOP saettings I have these oportunities:

Number of consequtive B VOPS: 4294967295
Quantiziser ratio (%): 1.5
Quantiziser offset: 1

A: Are these numbers good?

B: Where do I tell XVID which number of B-frames to use?

In the Zone window I can set the BVOP sensitivity, now it is set to 0,
C: Is that correct??

Inthe quantization window I can choose:
Min B-frame quantizer =2
Max B-frame quantizer=31
D: Is it here I chose B-frame interval?

Thanks
Steen

symonjfox
24th December 2003, 10:58
Originally posted by sbp
[B]Number of consequtive B VOPS: 4294967295
Quantiziser ratio (%): 1.5
Quantiziser offset: 1
A: Are these numbers good?
B: Where do I tell XVID which number of B-frames to use?
It's the Number of consequtive B VOPS: set it to 0, 1, 2, 3 or 4.
In the Zone window I can set the BVOP sensitivity, now it is set to 0,
C: Is that correct??0 is a good default. The I P B decision is very powerful and makes good streams. If you need to change it, try to make some tests. Higher the number, more B frames.Inthe quantization window I can choose:
Min B-frame quantizer =2
Max B-frame quantizer=31
D: Is it here I chose B-frame interval?No, leave quantizer as they are (2 - 31). It means that B frame quantizer can go from 31 to 2. There's no need to change these parametres.

2 suggestions:
1- Try to make some tests and chose your best settings. Yes, we can help you, but our personal opinion may be different from yours.
2- Use http://forum.doom9.org/search.php?s= and try to find your settings and read all threads you can. THEN, if you don't find anything useful or you need some more particulars, reply. Thanks!

Bye

symonjfox
26th December 2003, 18:42
Last update:

Try to use Turbo mode when capturing, available from Beta 3 (more info http://forum.doom9.org/showthread.php?s=&threadid=67495 )

AFAIK, it should speed up a lot while losing few details. It's good for Real Time Captures.

IMO it's NO good for normal encodes (for example DVD transcoding), because we have all time to perform a regular 2 pass encode using VHQ4 and other time consuming options.

sbp
28th December 2003, 10:35
@symonjfox: Thank you very much for your continued help.....


Maybe you also have a suggestion for me on this issue.
See http://forum.doom9.org/showthread.php?s=&threadid=67598

It is something that has come to me, because previously I could make captures with perfect syncronized sound.
BUT as usual I have been changing/updating a few things (as my wife says), and now I have these problems. Unfortunately I cant seem to get back to my good settings - so I dont know if it is a setting within the XVID encoder, or has something to do with any of the updates?

Thanks
Steen

symonjfox
28th December 2003, 12:04
Originally posted by sbp
Maybe you also have a suggestion for me on this issue.
See http://forum.doom9.org/showthread.php?s=&threadid=67598sorry, I've never haved such problem .. I can't help you. sorry

sbp
7th January 2004, 16:12
Hi Just to inform you that I get good real-time recordings with the following settings: (I even compress audio to mp3, without av sync problems)

One pass (of course)
In zone I use quant=5

Number of consequtive B VOPS: 2
Quantiziser ratio (%): 1.5
Quantiziser offset: 1


TARGET BITRATE: 3000

In ADVANCED OPTION:
MOTION SEARCH PRECISION: = Ultra high)
VHQ=1 Mode decission

No Chroma motion.

Frame drop ratio=0
Maximum I-frame interval 250

No Trelis
No QPEL
Turbo: on

@symonjfox:
The turbo mode. I have seen in Syskins legend that turbo mode only affects second pass? Do you have any idea wether enabling turbo mode in one pass recording (like this real-time capture) will speed up the recording??
Thanks
Steen

symonjfox
7th January 2004, 20:28
Syskin sayd in Selam topicAll "turbo" optins are related to b-frames and qpel. It won't make Simple Profile faster.
It won't make any differnce in first pass either.
I think that in 2 pass mode, a kind of Turbo is automatically enabled during the first pass, and not in the second. If you want it, you must enable it in second pass.

- turbo mode means faster motion estimation with b-frames and/or qpel, in second pass only (first pass has its own rules now)
In 1 pass encodes, it will speed up just if B frames, Qpel or both are enabled.

Unfortunately I have never tried it yet, beacuse I prefer quality (also marginal) over speed. My PC encodes while I'm @ work, so it doesn't matter for me!

begu
9th January 2004, 11:35
Note, when selecting fixed quantizer in zones, the bitrate option will not affect, if I'm correct.

I capture too, directly to xvid.
I don't use b-frames, because I recompress later and use virtual dub filters.

My settings are quite huge compared what's seen in this post before.
I use min I-frame interval of 12 (I know it's overkill, but for some scenes it must be so low)
Bitrate is 7000 kbps -> results quantizers between 2 and 5
Resolution is 720 x 576 PAL
Interlaced encodnig ON
Chroma motion ON
Chroma optimizer (in zones) ON
motion search 6
VHQ OFF (no CPU power)
No other settings (adaptive quantization, trellis etc.)

After capture I use virtual dub for editing and lower the bitrate somewhere between 4000 and 6000 depending on situation. Of course I needed DVD burner for my archive purposes, thanks to high bitrate ;)

I'm planning to buy DVB decoder to prevent the high noise level of analog tuner. This will cut the bitrate need quite much.

symonjfox
9th January 2004, 14:17
Originally posted by begu
[B]My settings are quite huge compared what's seen in this post before.
I use min I-frame interval of 12 (I know it's overkill, but for some scenes it must be so low)
Bitrate is 7000 kbps -> results quantizers between 2 and 5
Resolution is 720 x 576 PAL
Interlaced encodnig ON
Chroma motion ON
Chroma optimizer (in zones) ON
motion search 6
VHQ OFF (no CPU power)
No other settings (adaptive quantization, trellis etc.)
I think that capturing in XVID should be made only to keep the resultant encode. If you capture for reencode, it's better using a Lossless encoder or at least Xvid @ Q2.
Encoding twice using the same encoder creates artifacts and noise. Have you ever tried to encode twice a Wav file into mp3? After the second encode the quality is awful, also if you use mid - high bitrates. The same is for video (quality is still acceptable at your res and bitrate, but I'm a perfectionist).
I'm planning to buy DVB decoder to prevent the high noise level of analog tuner. This will cut the bitrate need quite much. ... and also you just have to do a simple MPEG2 -> XVID conversion (or if you want, keep the original MPEG2 video and audio since you have a DVD burner).

Inc
3rd February 2004, 13:09
Hi symonjfox,

I've read your capture recommendations very interested as I did my first capture tryings this week when I switched from YUY2 mjpeg to XVID.

My question refers to interlaced capturing using XVID codec.

Very very often the broadcast stations do provide progressive movies so there's no problem.

But sometimes they do provide Fieldshifted FILM based sources which I do inverse by Avisynths Telecide(guide=2, post=false), thats all and I obtain a perfect progressive output.

Now, when capturing YUY2 mjpeg and aftwerwards opening using Avisynth, when putting Info() Avisynth tells me that I deal with a fieldbased capture, ... thats ok.

IF I open that XVID AVI now using Avisynth, the info() command tells me that I deal with an Framebased output! Even if I checked the "interlacing" checkbox in XVID.

Does that mean the Fieldbased architecture is destroyed?
BECAUSE if for example I use on real interlaced provided material by the Broadcast.Station the command Smoothdeinterlace(doublerate=true, TFF=true, blend=true).selectodd() the outputted image comes out plain gray! So there seems to me is something strange going on when capturing fieldbased Signals with XVID as before on my mjpg YUY2 captures that Smoothdeinterlace command worked very well and output was not just plain gray but perfect

Another point, compared to my YUY2 mjpeg captures, the XVID ones do got distortions in the combing parts AT RED AREAS. Means, these parts do look like if they got bigger pixels.

Just for Info, I use a Pinnacle DC30 which gots an onboard mjpeg YUY2 4:2:2 compressor which cant be deactivated! So I rise the quality in the driver up to max =5 Mbyte/sec.
In VirtualVCR I choose as pre-filter the PicVideo mjpeg decoder and In the Video Settings I choose Compression = XVID mpeg4.

So by this the Codec gets 4:2:2 YUY2 Data provided by the pre-decoding of Picvideo.

Thank you very much for help in advance!

Inc.

symonjfox
3rd February 2004, 21:26
Hi, I readed your post, but unfortunately I don't know what to advise you.
First, where do you live? Pal or Ntsc land? I live in Pal land(Italy), so if you ask me something relatet Ntsc ... well ... (I thought that since you use Telecide, that AFAIK it should be a Ntsc thing).
I think that the Field base has been damaged during the conversion. I know that there's avisynth ConvertToYuy2(interlaced=true) for convert to YUY2i from another colorspace, but I don't know anything about your board, I'm sorry.

How do you procede normally? Do you use RGB as source? And final Xvid files are good?

About the red color issue, it should be an MPEG4 issue, maybe you should try the Xvid Chroma Optimizer.