Log in

View Full Version : DV to Xvid 1.1.0 help!


tanned55
21st July 2006, 14:13
I encode several short miniDV clips to Xvid 1.1.0. for playback on a Philips DVP-642/37.

Problems experienced are choosing the correct profile settings; AS@L5 and HT NTSC are preferred. AS@L5 frequently results with jittery playback while audio skips with HT NTSC; HT NTSC producing a larger filesize with the same settings. I use a Quantizer of 2.5 mostly.

I need some advice choosing the correct "motion search precision|vhq mode settings, [whether or not to enable or disable Use VHQ for bframes?].

For both profiles B-VOPs is enabled with Max consecutive = 2, Quantizer ratio = 1.50, Quzntizer offset = 1.00, Pixel Aspect Ratio = Square(default).

Because DV is an interlaced source, I enabled Interlaced Encoding. I'm not sure if "Top field first" should be ticked.

In advance, thank you for your time, effort and support.

sysKin
21st July 2006, 15:53
Problems experienced are choosing the correct profile settings; AS@L5 and HT NTSC are preferred. AS@L5 frequently results with jittery playback while audio skips with HT NTSC; HT NTSC producing a larger filesize with the same settings. I use a Quantizer of 2.5 mostly.
A fixed quantizer will not respect VBV settings, and as such, videos will not be compatible with profile at all. Most likely your quantizer 2.5 creates huge bitrate spikes (and probably huge bitrate in general) which your standalone can't handle.

Only 2-pass encoding uses VBV. I'm afraid you need to use it.

I need some advice choosing the correct "motion search precision|vhq mode settings, [whether or not to enable or disable Use VHQ for bframes?].
That's easy: more VHQ is much slower and (a bit) better quality. It simply depends on how much time you want to spend and how fast your computer is.
Because DV is an interlaced source, I enabled Interlaced Encoding. I'm not sure if "Top field first" should be ticked.
You probably want Top Field First set correctly. Does anyone know if DV is TFF, BFF or random like mpeg2?

unskinnyboy
21st July 2006, 16:53
You probably want Top Field First set correctly. Does anyone know if DV is TFF, BFF or random like mpeg2? DV is BFF and should be encoded BFF. Else, the field dominance will have to be reversed. If the video was encoded as TFF, that would explain the jittery playback.

tanned55
22nd July 2006, 15:51
DV is BFF and should be encoded BFF. Else, the field dominance will have to be reversed. If the video was encoded as TFF, that would explain the jittery playback.

Thank you for the input. More often than not, TFF was enabled for my encodes. Jitteriness seems to stem from the Motion Precision Search and VHQ Mode settings. The recommended values 6|1 result with jerky playback even with TFF disabled. Is there a rule of thumb for the values (#s applied) in these settings? I'm using Virtualdub for encoding; dvd player is Philips DVP 642-37.

In advance, thanks

unskinnyboy
22nd July 2006, 19:27
I find it inconceivable that MSP and VHQ settings could be the cause of any jitter. They are just settings which affect the quality. How could you conclude that the values 6|1, or even the fact that MSP|VHQ, could be the culprit? Did you try any other values? Does the encodes play fine on your PC? Did you try other quantizers? Could it be your avs script itself? Can you post it here?

tanned55
23rd July 2006, 04:49
I find it inconceivable that MSP and VHQ settings could be the cause of any jitter. They are just settings which affect the quality. How could you conclude that the values 6|1, or even the fact that MSP|VHQ, could be the culprit? Did you try any other values? Does the encodes play fine on your PC? Did you try other quantizers? Could it be your avs script itself? Can you post it here?
Yes, the encodes play flawless on the PC; regardless of MSP-VHQ mode settings.

I encode with Virtualdub|mod 1.6.14. Using segments of the file for experimental purposes (to save time) I discovered that MPS|VHQ mode values of 4|3 are good with an exception of minute jerky blocks in a 50 min clip. Other values within MPS|VHQ mode resulted in blocks-jerkiness from the beginning of the clip throughout.

Script is as follows
The original file is encoded with MainConcept ProDV 3.0.13. In Virtualdub the profile is Advanced Simple@L5... single pass.. Target Quantizer 2.50
- Interlaced Encoding is enabled (Top field first - unchecked)
- B-VOPs enabled.. Max consec = 2, Quant Ratio = 1.50, Quant offset = 1.00
- Aspect Ratio = Square (default)
- Quality Preset
* Motion search precision = 4 high
* VHQ mode = 3 - Medium Search
* Use chromo motion - enabled
* frame drop ratio - 0 | max I-frame interval - 300 (NTSC)
- Quantization: 2|31 for Min/Max quantizers... Trellis unchecked

I've experimented with HT NTSC; its playback on the standalone are good (maybe better vs AS@L5 as far as blocky artifacts) but a certain configuration with HT-NTSC will cause the audio to intermittently skip every 30 seconds or so throughout the clip; any leads on this one? I'm not confident as whether or not use AS@L5 or HT-NTSC.

Maybe I'm off base? Again, thanks for your "time and support!"

celtic_druid
23rd July 2006, 07:47
HT-NTSC would disable bframes if interlacing is enabled. Also without interlacing you would only get 1 consecutive.

Try setting MSP to 6, but with 2 passes, because as already said 2 pass is the only way to get VBV constraints. Might prevent some of the issues.

tanned55
23rd July 2006, 14:59
HT-NTSC would disable bframes if interlacing is enabled. Also without interlacing you would only get 1 consecutive.

Try setting MSP to 6, but with 2 passes, because as already said 2 pass is the only way to get VBV constraints. Might prevent some of the issues.
I will experiment with your suggestion on clip segments :thanks: What does Use VHQ for bframes too do? I'm sorry to make this probably more complex than it actually is but I hope to produce the best quality xvid clips from the DV cam I can; if possible. Thanks for listening

celtic_druid
23rd July 2006, 15:16
Does nothing if you have interlaced and a Home Theatre profile selected. No bframes, no VHQ for bframes. I'm sure if you search you can find info on what VHQ is, how it works, etc.

Since XviD is presumably following the DXN specs on disabling bframes for interlaced encodes, you probably want to be carefull bypassing that restriction if your intended target is a SAP. So for bframes, your best bet would be to de-interlace before encoding.

unskinnyboy
23rd July 2006, 15:19
What does Use VHQ for bframes too do?
Like the name says, it uses the VHQ mechanism on b-frames too (if b-frames are used), thus yielding better quality, but slowing down the encoding process.

If you want a more technical explanation, GomGom gives a good one in the XviD-devel mailing list here: http://list.xvid.org/pipermail/xvid-devel/2004-September/004577.html

tanned55
23rd July 2006, 16:30
Does nothing if you have interlaced and a Home Theatre profile selected. No bframes, no VHQ for bframes. I'm sure if you search you can find info on what VHQ is, how it works, etc.

Since XviD is presumably following the DXN specs on disabling bframes for interlaced encodes, you probably want to be carefull bypassing that restriction if your intended target is a SAP. So for bframes, your best bet would be to de-interlace before encoding.
I'm more prone to use AS@L5 profile vs DXN(HT) NTSC as its quality is good and smaller filesize.

In Virtualdub, how do I deinterlace first (do i save it Uncompressed or pick a codec?) and is the original file from the DV camcorder interlaced; how's this determined? If I deinterlace with a filter then would I disable Interlaced Encoding|TFF in the Xvid settings before encoding?

Doing some research I read to use VDubs 'Field Bob' filter with sharpen.... for deinterlacing. Hmmmm, I thought I was making progress ?? .. lol

BigDid
23rd July 2006, 18:26
I'm more prone to use AS@L5 profile vs DXN(HT) NTSC as its quality is good and smaller filesize...
Hi,

It seems the DVP642-with-xvid limitations(ESS chipset) were not covered in this thread, lots of info in the SAP or Xvid sections.

Safe params:
Home theatre profile (max bitrate 4854 instead of 8000 for AS@L5 )
No custom matrix (use MPEG or H263)
NO QP, AQ, Trellis, GMC
NO PACKED bitstream
---
Params that helps:
MAX consecutive B-VOPS set to 1.00
CBR audio
No openDML
Recommended max resolution 640*xxx

This from various exchanges in the AutoGK threads where the pair XVID-DVP642 were (are) very popular.

Did

henryho_hk
26th July 2006, 06:37
In Virtualdub, how do I deinterlace first

If you know Avisynth, deinterlace the clip using various plugins. Then load the AVS script in Virtualdub.

You can load the DV AVI in Virtualdub, change to "Full Processing Mode" and then pick up one of its deinterlace filters.

is the original file from the DV camcorder interlaced; how's this determined?

Watch the DV clip in a frame-by-frame manner. If you see comb patterns in motion scenes, the clip is definitely interlaced.

If I deinterlace with a filter then would I disable Interlaced Encoding|TFF in the Xvid settings before encoding?

Of course you "should".

use VDubs 'Field Bob' filter with sharpen.... for deinterlacing.

"Bob"? It may probably double your framerate. Please double-check.

Actually, DV to XviD can be very tricky (mostly on colorspace issues). Much more information in the DV forum.

Blue_MiSfit
29th July 2006, 02:58
I did some DV->XviD today..

I didn't want to bob and have 60fps video, so I just used the following script (NTSC land BTW):

directshowSource("F:\premiere output.avi")
#the above is YUY2
convertToYV12()
AssumeBff().SeparateFields().SelectEven()
lanczosresize(720,480)
removegrain(mode=5)

This actually gave better results than premiere's "Deinterlace" function.

Encoded non interlaced XviD, and it turned out very well :)

This is what I do most of the time.

Good luck

~MiSfit

foxyshadis
29th July 2006, 05:23
That IS premier's deinterlace, except premier uses bilinear like Bob(). Unless you choose blend deinterlace.

Boulder
29th July 2006, 15:55
convertToYV12()

You should use ConverttoYV12(interlaced=true) as your source is interlaced.