Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
|
Thread Tools | Search this Thread | Display Modes |
25th November 2004, 00:38 | #41 | Link | |
Registered User
Join Date: Nov 2004
Location: Vienna
Posts: 11
|
I tried your plugin Wilbert but it doesn't really help.
The video looks like pixel-doubled after inserting 'ConvertToYUY2(interlaced=true)' (what is needed because DirectShowSource gives me YV12). The source is PAL DV interlaced BUT edited with Adobe Premiere by a friend (who isn't very experienced with video codecs...). This is my avisynth script: Quote:
I search the whole doom9 forum and tried out different things for hours but I just don't get the quality of your screenshots
__________________
Cya, abraxxa |
|
25th November 2004, 21:50 | #42 | Link |
Moderator
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
|
You shouldn't load it via ffdshow. The problem is that DV-YV12 and MPEG2-YV12 is sampled differently. This implies that the conversions DV-YV12 -> YUY2 and MPEG2-YV12 -> YUY2 (the latter is what avs does) should be done differently.
I will add 'DV-YV12 -> YUY2' one day to my filter, but don't have time now. Bottom line, load your dv with avisource |
25th November 2004, 23:47 | #43 | Link |
Registered User
Join Date: Nov 2004
Location: Vienna
Posts: 11
|
THANKS!
I knew that there is a difference but not which and i thought that 'eliminate chroma jaggyness of PAL-DV' is related to PAL-DV cam footage. I used DirectShowSource() cause i have no vfw codec for AviSource() and DirectShowSource().info() shows me that its YV12 so I thought its ok. I installed Sony DV codec 2.23 which outputs RGB24. Quality is still bad Now I found out that I have Canopus DV codec installed. (i don't know the version, it's the one shipped with Procoder 2.0). But quality is still bad Mainly the edges have a 'rainbow' effect loadplugin("E:\Install\Video\AviSynth\ReInterpolate420\Release\ReInterpolate420.dll") loadplugin("E:\Install\Video\AviSynth\KernelDeint_1.5.2\kerneldeint.dll") AviSource("E:\DVDRIP\TSC_DVD_#1\gtech3-raw-big.avi", true, "YUY2", fourCC="CDVC").info() #ConvertToYUY2(interlaced=true) ReInterpolate420(interlaced=true) #KernelDeint(order=0,threshold=6,sharp=true,map=false) It also seems that ReInterpolate420 doesn't do/change anything... What are I'm missing?
__________________
Cya, abraxxa Last edited by abraxxa; 26th November 2004 at 00:51. |
26th November 2004, 15:35 | #45 | Link |
Registered User
Join Date: Nov 2004
Location: Vienna
Posts: 11
|
No problem!
25 frames snip You can see the effect on the edge of the roof of the halls in the background. Is this a deinterlacing problem OR a choma problem? Try it with this avisynth script: loadplugin("c:\Install\Video\AviSynth\KernelDeint_1.5.2\kerneldeint.dll") AviSource("c:\temp\gtech3_snip.avi", false, "YUY2", fourCC="CDVC") KernelDeint(order=0,threshold=5,sharp=true,map=false) I tried also with order=1 but that doesn't help either...
__________________
Cya, abraxxa |
11th December 2004, 14:12 | #49 | Link |
Registered User
Join Date: Mar 2004
Posts: 889
|
I have a Sony DSR-PD150P (PAL edition) and the Canopus playback-only codec installed. I want to rip the DV on the tape using WinDV, mark the avi as cdvc and then convert it to XviD.
I suppose I should do the following, right? avisource("input.avi",pixel_type="YUY2",audio=true) FixBrokenChromaUpsampling() ReInterpolate420(interlaced=true) ConvertToYV12(interlaced=true) kerneldeint(order=0,sharp=true) removegrain(mode=2) Or should I remove "ReInterpolate420()" for the reason that I will convert it to YV12 later? |
11th December 2004, 14:22 | #50 | Link |
brainless
Join Date: Mar 2003
Location: Germany
Posts: 3,653
|
@abraxxa: I found nothing special with your clip.
The stairstepping is a very normal thing with interlacing. Either use tdeint(mode=1, tryweave=false) instead of kernelbob() or start experimenting with mvbob()... @henryho_hk: what do you intend to gain by the usage of: ReInterpolate420(interlaced=true) ConvertToYV12(interlaced=true) your YV12 chroma will only be blurred unnesesary. if you need YV12 out of an DV-AVI, open it via directshowsource() and enable ffdshow as DV-Decoder. it will give you much better chroma...
__________________
Don't forget the 'c'! Don't PM me for technical support, please. |
11th December 2004, 15:40 | #51 | Link | |
Registered User
Join Date: Mar 2004
Posts: 889
|
Quote:
If I uninstall all other DV codecs, can I use the following instead of DirectshowSource? AVISource("input.avi",audio=true,pixel_type="YV12",fourcc="DSVD") |
|
11th December 2004, 16:14 | #54 | Link |
brainless
Join Date: Mar 2003
Location: Germany
Posts: 3,653
|
maybe this function:
Code:
function reducetoyv12(clip x) { u=x.utoy().separatefields().separatefields().selecteven().converttoyv12().weave() v=x.vtoy().separatefields().separatefields().selecteven().converttoyv12().weave() x=x.converttoyv12() ytouv(u,v) x.mergechroma(last) } avisource("dv.avi") reducetoyv12() kerneldeint(order=0,sharp=true) removegrain(mode=2) the funmction reducetoyv12 reduces the YUY2 chroma to YV12 chroma using pointsampling insted of weighted blending, like converttoyv12(interlaced=true) would do.
__________________
Don't forget the 'c'! Don't PM me for technical support, please. |
11th December 2004, 16:53 | #55 | Link | |
Moderator
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
|
Quote:
|
|
11th December 2004, 18:25 | #56 | Link |
brainless
Join Date: Mar 2003
Location: Germany
Posts: 3,653
|
I found out, that U and V of DV-YV12 seems to be stored as normal YV12 ?!?
at least, the processing as normal YV12 won't suffer from chroma misalignement in my tests..
__________________
Don't forget the 'c'! Don't PM me for technical support, please. |
11th December 2004, 22:50 | #57 | Link | |
Moderator
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
|
Quote:
YUY2 layout: frame: YC Y YC Y line 1 YC Y YC Y line 2 YC Y YC Y line 3 YC Y YC Y line 4 MPEG-2 YUY2 -> YV12 (interlaced subsampling) frame: Y_Y_Y_Y line 1t C___C__ chroma of YUY2_lines (0.75)*1t + (0.25)*3t Y_Y_Y_Y line 2b Y_Y_Y_Y line 3t C___C__ chroma of YUY2_lines (0.25)*2b + (0.75)*4b Y_Y_Y_Y line 4b DV-PAL YUY2 -> YV12 (interlaced subsampling) It think it's just point-sampled (ie chroma removed): frame: YV1_Y_YV1_Y line 1t; V of YUY2_line 1t YV2_Y_YV2_Y line 2b; V of YUY2_line 2b YU3_Y_YU3_Y line 3t; U of YUY2_line 3t YU4_Y_YU4_Y line 4b; U of YUY2_line 4b YV5_Y_YV5_Y line 5t; V of YUY2_line 5t YV6_Y_YV6_Y line 6b; V of YUY2_line 6b I'm not sure, if have to look that up. Suppose you upsample that using ConvertToYUY2(interlaced=true) (thus MPEG-2) sampling. What happens? Consider line 5t. The chroma will be recreated as Code:
chroma of YV12_lines (0.25)*1t + (0.75)*5t[*] While it should be Thus V5 = V5 and U5 = (0.5)*U3 + (0.5)*U7. I think ... [*] see http://www.avisynth.org/Sampling Last edited by Wilbert; 12th December 2004 at 20:48. |
|
11th December 2004, 23:31 | #58 | Link |
brainless
Join Date: Mar 2003
Location: Germany
Posts: 3,653
|
Hey Wilbert. It is not, that I don't know about this sampling stuff
(After I learned a lot while being in this forums ) but it seems, that reality and theory differ (like the 1.066 and 1.094 PAR for the PAL-Stuff) after examining some videos (two different cams), I think that the chroma is sampled like conventional YV12. Knows the devil why. If you own an DV-Cam (I do not. I am only the person, who processes the videos...) You may print out an image containing pure blue background with pure red diagonal objects on it (lines, blocks or circles). then you make a short still standing video of this (well lightened) picture. This would be IMO the only possibility to check, whether the Cameras follow the standard or not. Natural video is not that suited for checking for half pel chroma displacements, I think. So I came to that (probably wrong) conclusion that DV Cams are building conventional YV12. I also want to mention, that the canopus DV-Codec samples a RGB-Input with standard YV12. Also its point-upsampling is in the grid of standard YV12. Which (the point upsampling) is NOT a bad thing, after doing some tests! Most MPEG-2 Encoders need RGB (TMPGenc) or YUY2 (CCE etc..) input, which gets downsampled to YV12 again by averaging nearby pixels (not 100% correct, I know...). With IDENTICAL nearby pixels like it is the case with point-upsamples DV, the chroma won't bleed. but if the DV-decoder would to a proper visual (with averaging) upsampling to YUY2 and the encoder the downsampling to YUY2 the chroma is bleeded like hell.... reinterpolate420() is only needed, if heaviy image manipulation (destroying pixel structure) is wished (deshaking, resizing...) for linear editing it is completely obsolete, IMO. when I need to deinterlace the stuff, I am currently not 100% sure, whether I shall use reducetoyv12().YV12deinterlacer() (gives lowest chroma manipulation as possible!) or reinterpolate420().YUY2deinterlacer() (chroma-artifacts of the deinterlacer are not that visible, chrom is slightly bleeded) Wilbert, what do you think?
__________________
Don't forget the 'c'! Don't PM me for technical support, please. Last edited by scharfis_brain; 11th December 2004 at 23:38. |
12th December 2004, 07:04 | #60 | Link | |
Registered User
Join Date: Mar 2004
Posts: 889
|
Quote:
Thank you. As I will be using the Canopus codec, should I put "FixBrokenChromaUpsampling()" back? Or is it unnecessary because of the YV12 point-sampling? In addition, does "FixBrokenChromaUpsampling()" work for both NTSC and PAL DV? |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|