VideoHelp Forum
+ Reply to Thread
Results 1 to 10 of 10
Thread
  1. Hi guys, I saw this code on Digital Faq, but I can't make it work

    Code:
    Mpeg2Source("F:\Svaghi\Video Editing\Report e Guide\Avisynth Guide\[Provati]\[Filtraggio Selettivo]\Registrazione - 0001.d2v", CPU2="ooooxx", Info=3).converttoYV12()
    AssumeTFF()
    SeparateFields()
    
    # Got this from Jagabo at Videohelp
    # Show Luma and map Chroma to luma in separate clips so we can see each plane.
    Y=ColorYUV(off_u=-256, off_v=-256).ColorYUV(off_u=128, off_v=128)
    U=UtoY()
    V=VtoY()
    
    StackHorizontal(Y, U, V)
    AvsPMod says StackHorizontal: image heights don't match. How can I solve it? Your help is highly appreciated.
    Quote Quote  
  2. Your source is probably YV12 so the U and V channels are half the size (each dimension) of the Y channel. So you need to resize them or stack differently:

    Code:
    Mpeg2Source("F:\Svaghi\Video Editing\Report e Guide\Avisynth Guide\[Provati]\[Filtraggio Selettivo]\Registrazione - 0001.d2v", CPU2="ooooxx", Info=3).converttoYV12()
    AssumeTFF()
    SeparateFields()
    
    # Got this from Jagabo at Videohelp
    # Show Luma and map Chroma to luma in separate clips so we can see each plane.
    Y=ColorYUV(off_u=-256, off_v=-256).ColorYUV(off_u=128, off_v=128)
    U=UtoY().BilineaResize(Y.width, Y.height)
    V=VtoY().BilineaResize(Y.width, Y.height)
    
    StackHorizontal(Y, U, V)
    Or:


    Code:
    Mpeg2Source("F:\Svaghi\Video Editing\Report e Guide\Avisynth Guide\[Provati]\[Filtraggio Selettivo]\Registrazione - 0001.d2v", CPU2="ooooxx", Info=3).converttoYV12()
    AssumeTFF()
    SeparateFields()
    
    # Got this from Jagabo at Videohelp
    # Show Luma and map Chroma to luma in separate clips so we can see each plane.
    Y=ColorYUV(off_u=-256, off_v=-256).ColorYUV(off_u=128, off_v=128)
    U=UtoY()
    V=VtoY()
    
    StackHorizontal(Y, StackVertical(U, V))
    Since U and V are half the height of Y, stacking them vertically makes the stack the same height as Y.
    Quote Quote  
  3. U = UtoY()
    V = VtoY()
    StackHorizontal(U,V)
    Histogram(mode="luma") #
    It's best like this if you don't use the luma mode of histogram you can't see much things just a blurry grayscale presentation of U&V
    *** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE
    Quote Quote  
  4. Thanks to the both of you
    Quote Quote  
  5. To see more chroma detail I usually prefer to increase the saturation of the colors before splitting out the chroma or increase the contrast after:

    Code:
    Mpeg2Source("F:\Svaghi\Video Editing\Report e Guide\Avisynth Guide\[Provati]\[Filtraggio Selettivo]\Registrazione - 0001.d2v", CPU2="ooooxx", Info=3).converttoYV12()
    AssumeTFF()
    SeparateFields()
    
    # Got this from Jagabo at Videohelp
    # Show Luma and map Chroma to luma in separate clips so we can see each plane.
    Y=ColorYUV(off_u=-256, off_v=-256).ColorYUV(off_u=128, off_v=128)
    U=UtoY().ColorYUV(cont_y=500)
    V=VtoY().ColorYUV(cont_y=500)
    
    StackHorizontal(Y, StackVertical(U, V))
    Quote Quote  
  6. Actually, this is was what I was looking for: I wanted to know which field has more noise, especially the chroma one. Thanks again.
    Quote Quote  
  7. But why U and V fields are in greyscale? Is it possible to see the colors?
    Image Attached Thumbnails Click image for larger version

Name:	Grigio.JPG
Views:	130
Size:	129.2 KB
ID:	46727  

    Quote Quote  
  8. U and V represent colors that are added or subtracted from the greyscale (Y) value. So you can't view them correctly on their own. You can get a sense of the colors by using a flat, medium, greyscale value but you won't see real colors:

    Code:
    Mpeg2Source("F:\Svaghi\Video Editing\Report e Guide\Avisynth Guide\[Provati]\[Filtraggio Selettivo]\Registrazione - 0001.d2v", CPU2="ooooxx", Info=3).converttoYV12(interlaced=true)
    AssumeTFF()
    SeparateFields()
    
    Y = ColorYUV(cont_u=-256, cont_v=-256) # flatten U and V, leaving only Y
    U = ColorYUV(cont_y=-256, cont_v=-256) # flatten Y and V, leaving only U
    V = ColorYUV(cont_y=-256, cont_u=-256) # flatten Y and U, leaving only V
    
    StackHorizontal(Y, U, V)
    I didn't notice this before but Mpeg2source() should be giving you YV12 to start with so calling ConvertToYV12 shouldn't be needed here. If it isn't giving YV12 for some reason and your source is interlaced the ConvertToYV12() needs to specify interlaced=true or the chroma of the two fields will bet blended together.
    Quote Quote  
  9. Thanks!
    Quote Quote  
  10. hmm yeah i prefer histogram=luma at least i can better see if there is blocking, to each his own i guess
    *** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!