View Full Version : Problem with DVD encode quality using CCE/AVISynth
Tio
17th November 2004, 08:22
The following question is due to the quality of my DVD encodes. Mainly the dark (blacks/shadows) areas on 30%-40% of them are not true. They seem to exhibit mottling, inconsistant color, or a greenish snow effect kind of like what you see with bad tv reception.
Not sure where the problem lies so I'll just give a rundown of my proccess using CBR as an example as it occures even on 1 hour encodes:
Source - digital cable (NTSC, mostly IVTC)
Capture Card - Hauppauge WinTV (composite connections, BTwin driver)
Capture Software - VirtualDub using Huffyuv (YUY2, 720x480, TFF)
The raw AVI is then added to the following AVIsynth (v2.5) script:
SegmentedAVISource("I:\movie.avi")
Trim(0,0).Reverse.FadeOut(20).Reverse.FadeOut(200)
The AVISynth script is imported to CCE SP 2.5.01 where the following settings are used:
CBR MPEG-2
Bitrate - 9,500
MPEG2 Video Settings - Checked - Add sequence end code & DVD compliant (all others remain un-checked)
Luminance Level - 16-235
Intra DC - 10
DAR - 4x3
Gop Settings - Seq M=3 N/M=4, Seq Header Every 1 GOP (remaining boxes un-checked)
Image Quality Priority - 5 (no noise filtering)
This are all I can think of as possibly being applicable to figuring the problem. If additional info is needed please ask and I'll greatfully oblige. I seem to feel that I should be doing more within the AVISynth script. I can also add that I often make DivX encoded AVI clips from the same raw captures. These clips exhibit none of the bad qualities in the dark regions when viewed on the PC.
Appreciative,
Tio
Boulder
17th November 2004, 09:15
Firstly, try a multipass VBR or better yet, use the OPV mode. Use a higher value for image quality priority, I'd go for 17-24.
You could try the following:
1) denoise the source clip. Analogue captures are never perfect and CCE doesn't like noisy clips much. There's plenty of denoisers out there, see the sticky comparison thread at the Avisynth usage forum.
or
2) add Blockbuster(method="noise",variance=0.3,seed=1) to your script.
Tio
18th November 2004, 04:42
Hi Boulder,
I may be making a misguided assumption but wouldn't a 9,500 CBR encode (single-pass) have the same quality as the best multi-pass VBR? What does make me second guess that assumption is the fact that I see the latest CCE v2.70 allows for multi-pass CBR although it may be intended for bitrates below maximum.
I will have to admit that I get a quite clean signal from my digital cable so I'm not sure that a denoiser would be of much use for this concern (but I very well could be wrong). I do use convolution3d in the HQ mode when encoding my DivX AVI clips from the same raw footage though it is mainly for the purpose of better compression.
Btw, as a pretty good gauge of source quality I can tell you that with the capture method described previously I usually register about a 3.0-1 compression ratio. This is vs. 2.1-1 when capturing from analoge sources.
Still, I'll give a denoiser a try and see what happens. Would love to have you or someone else outright agree that I am basically using the correct encoding settings (cce & avisynth) in the meanwhile. Also I should correctly state that my typical video source is "telecined" not "ivtc".
Thanks,
Tio
Boulder
18th November 2004, 07:43
Try that Blockbuster line then (you need the Blockbuster dll in your plugins folder). It should help with blocking in dark areas of the image. You can increase the variance value to 0.5-0.7 if you still have the problem and see if it goes away.
disturbed1
21st November 2004, 23:14
Originally posted by Tio
CBR MPEG-2
Bitrate - 9,500
MPEG2 Video Settings - Checked - Add sequence end code & DVD compliant (all others remain un-checked)
Luminance Level - 16-235
Intra DC - 10
DAR - 4x3
Gop Settings - Seq M=3 N/M=4, Seq Header Every 1 GOP (remaining boxes un-checked)
Image Quality Priority - 5 (no noise filtering)
Appreciative,
Tio
Video settings -
If encoding as interlaced, check linear quantizer,
For progressive - progressive and zigzag scan order. When linear is unchecked, cce does nonlinear quantization, when zigzag is unchecked, cce uses alternate scan patterns. DVD Compliant is not needed.
Luminance level only has an effect on RGB sources.
Your image quality Priority is beyond way too low. Set it for something like 25-30, and adjust as needed. A setting that low is barely usefull for footage that is all action, an extremely high setting would be better for talking heads. You'll have to find the sweet spot inbetween according to your source footage.
Spend some time in the CCE PDF, there are tips and tricks about what the settings do, and when/how they should be used.
Add blockbuster, it can do wonders ;)
Tio
23rd November 2004, 05:45
Thanks guys! I’ve taken both of your suggestions and put them to use.
@ Boulder
“Blockbuster” has been added to my script using your suggested settings ranges.
@ disturbed1
I have taken your suggestion and reread the CCE PDF again, for the third and fourth times. IT IS TRUE you can always glean more from successive readings. I thought your heads-up regarding the Image Quality Priority setting was going to be the golden egg but alas…
Now guys, I’ll have to admit I am getting frustrated and more confused the more I try and figure this out (probably have read EVERY post my incessant board searches have come up with over the last week). Surely have tried every combination and values adjustment possible but still have the inconsistent black and dark colors, they look mottled and green/grey.
Like I stated, I’m getting more confused as to what the proper setting should be for my source type. My source is a Huffyuv/AVI captured from NTSC digital cable via VirtualDub. When checking the clip it displays 3 clean & 2 interlaced, this I assume to be standard telecined NTSC. As noted in an earlier post I handle these clips as such and IVTC them when making short AVI clips for PC viewing/distribution. These play perfectly and exhibit no mottling in the black areas.
My lastest “learned guess” is to use the following CCE options:
Checked-
Add Sequence End Code
Progressive Frames
Zigzag Scanning Order
16-235
Auto Intra DC
GOP Settings
N=3
N/M=4
Image Quality Priority – 25-60 (tested range)
I also assume that 3-2 pulldown is not required for this source and encoding type. If someone could tell me what I may be doing wrong it would ease me mind greatly.
Thanks,
Tio
Boulder
23rd November 2004, 06:05
Please post your script, it will make it easier to help you.
Tio
23rd November 2004, 07:53
Boulder,
As mentioned in my first post the AVISynth script is quite sparse, seems like something is missing. I’ve seen references to adding SeparateFields and other filters but my understanding is they’re intended for interlaced sources.
LoadPlugin("D:\AviSynth_Scripts\blockbuster.dll")
SegmentedAVISource("I:\movie.avi")
Blockbuster(method="noise",variance=0.3,seed=1)
Trim(0,0).Reverse.FadeOut(20).Reverse.FadeOut(200)
You were refencing the AVISynth script, correct? If you need anything else please ask away.
Thanks!
Tio
Boulder
23rd November 2004, 08:00
Could you get a small sample of the original clip and the result? A couple of frames would do, just get them from the problem area.
Tio
23rd November 2004, 09:57
Boulder,
Ouch! I just deleted the raw capture (98 minutes) to make room for a more important capture this evening. I did save a few raw portions though for the purpose of making AVI's. After this current capture session is finished I will upload a segment to my site. Both raw capture data and the same area DVD-encoded as I still have a test segment on DVD-R.
Thanks for your tenacity!
Tio
Tio
23rd November 2004, 12:05
Boulder,
I’ve uploaded three clips:
1. raw_clip.avi (http://innovawerks.com/temp/raw_clip.avi) (5.4Mb)
2. test1-VTS_01_1.VOB (http://innovawerks.com/temp/test1-VTS_01_1.VOB) (6Mb) Encoded using only “Add Sequence…” & “DVD Compliant” checked.
3. test2-VTS_01_1.VOB (http://innovawerks.com/temp/test2-VTS_01_1.VOB) (6Mb) Encoded with the above options + “Progressive…” & “Zigzag…” checked.
Considering I assume my source capture is progressive telecined it seems strange that the third clip is the one that looks combed upon playback.
If any additional info would be helpful please ask.
Thanks,
Tio
Boulder
23rd November 2004, 12:23
1) Is the original colorspace YUY2?
2) What version of HuffYUV did you use to compress the video?
I couldn't get the clip to open in VDub (the video was just a mess), opening it with DirectShowSource in Avisynth helped but the colorspace was YV12 (ffdshow decoded the stream).
However, I'm unable to see anything really wrong with the VOBs:confused: I raised the brightness level in VDub but still couldn't say if there was anything wrong.
Do you watch the videos on your PC or a standalone player?
Tio
23rd November 2004, 13:22
Yes. I capture using Huffyuv_2.1.1 YUY2. The only time I ever convert is when making AVI clips and that is to facilitate being able to use certain filters requiring YV12. The Huff clip plays fine on all 3 of my computers.
I just played the VOBs using WinDVD6 and they look fine on the PC. When burned earlier to DVD and played on a standalone is when the mottling rears it's ugly head. This scenario is not unique to this encode. It happens on about 40% of all encodes I make from DVB captures.
Needless to say, the AVI clips I produce are played on the PC. The DVDs I encode are played mainly on standalones. I notice the mottling on two different players and two different CRT TVs.
If you would, can I be enlightened as to what you recommend as the proper settings (CCE & AVISynth) for encoding to DVD a movie based on the raw sample you downloaded from my site? You stated that both VOB clips you downloaded look fine. You probably were focused on the mottling and not the correctness of encoding options I chose considering one was based on progressive and the other on Interlaced encoding. Since that raw clip is representative of 90% of my captures it would really mean a lot to my sanity knowing I am using the correct options. :-)
Thanks again for all your help. It is ever so greatly appreciated!
Tio
Boulder
23rd November 2004, 13:33
If the source is telecined, you'll have to IVTC it. This can be done by Telecide() and Decimate(), both in the Decomb package by D.Graft. You'll get a 23.976fps progressive stream.
So the script would be:
AVISource("path\clip.avi")
Telecide(order=x,guide=1) # x=field order, 0 for BFF, 1 for TFF
Decimate()
and then the rest..
You'll have to determine the correct field order. The Decomb package includes a tutorial.
Select zigzag scanning and progressive frame flag, add sequence end code enabled, disable DVD compliant. You'll have to do a pulldown to the file before you can author it, there's a commandline tool (pulldown.exe) available.
Personally I would crop all the black borders and use a 2-block overscan to increase compression and get a 704x480 video. If you want to do this, FitCD will get you the correct resizing and AddBorders parameters.
To me the situation sounds like an issue with the standalone as the playback is correct on the PC. Try with the IVTC'd video, maybe it'll display correctly on your SAP.
Tio
23rd November 2004, 13:47
This gives me hope as I've never IVTC'd in my DVD encoding script. I do use your example daily though when encoding my short AVI clips. Since my latest capture all ready to encode I'll put it to the test. Will let you know how it turns out.
Your quick replies are tops!
Many Thanks!
Tio
Tio
29th November 2004, 05:10
Boulder,
Have given it a go on two occasions and all seems to work very well! My encodes seem to have been upgraded exponentially! I also traced a percentage of the problem as being the brightness/picture settings on the TVs...set very high (for the purpose of very brightly lit rooms).
You have given me a few new tool and filtering additions for which I am greatful...even though they have slowed my encode speed by almost 35%-40%. :-(
The above generated a couple more questions though:
FitCD - The following query regards your 2-block overscan suggestion here and on other posts by you in the forums.
1. Considering my source (IVTC'd, 720x480, 4x3, 23.97fps progressive), when imported into FitCD I only checked "ITU-R", all other boxes are unchecked in source and destination...correct?
2. I know both 740x480 & 704x480 are valid DVD final resolutions. Are there pros and cons to deciding one over the other?
Thanks again for all your and disturbed1's help!
Tio
Boulder
29th November 2004, 08:07
Originally posted by Tio
[B]...even though they have slowed my encode speed by almost 35%-40%. :-(
Try using FadeIn instead of Reverse.FadeOut. It might make a slight difference.
FitCD - The following query regards your 2-block overscan suggestion here and on other posts by you in the forums.
1. Considering my source (IVTC'd, 720x480, 4x3, 23.97fps progressive), when imported into FitCD I only checked "ITU-R", all other boxes are unchecked in source and destination...correct?
Correct.
2. I know both 740x480 & 704x480 are valid DVD final resolutions. Are there pros and cons to deciding one over the other?
No cons that I know of. You'll get better compression and if you use the 2-block overscan, it's even better.
As a matter of fact, if you use a 2-block overscan, you don't even have to crop the image.
AVISource("path\clip.avi")
Telecide(order=1,guide=1)
Decimate()
#Trim here, remember that the framerate goes from 29.97->23.976!
LanczosResize(672,448)
Blockbuster(method="noise",variance=0.3,seed=1)
AddBorders(16,16,16,16)
If you can, use a newer version of CCE. Try Bach's quantization matrix for even better results, the CCE standard matrix is very bad IMO.
Tio
29th November 2004, 17:47
Boulder,
Fabulous! You just pointed out a couple thing I'm sure will improve speed. One being filter order (of which I became complacent), another being the fact that I just cut and paste from FitCD the resize values. Doing that I substituted my usual LanczosResize filter with the internal BicubicResize (probably moreso quality than speed on this one , but still...).
I'll impliment that FadeIn suggestion. Also, I've used that 2-block overscanon the last two encodes since you mentioned it a week back and I love it. Great for serving two purposes - compression along with more viewable image on screen! I still crop as few pixels as possible just to clean the original image edges if need be and just add the difference to the border.
Thanks again ever so much for sharing your knowledge. I feel very much renewed and am now looking forward to the next encode!
Tio
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.