VideoHelp Forum
+ Reply to Thread
Results 1 to 9 of 9
Thread
  1. Member
    Join Date
    Sep 2012
    Location
    Australia
    Search Comp PM
    I'm thinking of transcoding Merlin next but am having problems with the credits. The episodes themselves are almost completely progressive with the credits the only interlaced component. The thing is it's just vertical scrolling text on a black background. What I want to do is just separate the fields, crop all the even fields by one or two on the bottom, then add that one or two back on the top and weave them together again and that should give me complete, deinterlaced text that would look better than any deinterlacer could acclomplish. But I can't figure out how to get it to work. Any tips would be appreciated.

    This is what I have so far:
    Code:
    mpeg2source("Video 1.d2v")
    Crop(2,2,-2,-2)
    V1 = trim(0,65183)
    V2 = trim(65184,0)
     
    V1
    fft3dfilter(sigma=1.5)
    Lanczosplusv4(1920, 1080)
    part1 = last
     
    V2
     
    V3 = SelectEven()
    Crop(0,0,0,-1)
    AddBorders(0,1,0,0)
    part3 = last
     
    V4 = SelectOdd()
    Part4 = last
    
    ?????????????
     
    Lanczosplusv4(1920, 1080)
    part2 = last
     
    part1 ++ part2
    Last edited by ndjamena; 22nd Apr 2014 at 00:23.
    Quote Quote  
  2. Progressive YV12 video can't be cropped by an odd number of scan lines. It must be cropped by an even number of scan lines. Interlaced YV12 must be cropped by an integer multiple of 4 scan lines.

    Code:
    ConvertToRGB()
    SeparateFields()
    evn=SelectEven().Crop(0,0,-0,-1).AddBorders(0,1,0,0)
    odd=SelectOdd()
    Interleave(evn,odd)
    Weave()
    ConvertToYV12()
    Remember, when you don't specify input and output streams "last" is used. So the above code is equivalent to:

    Code:
    last=ConvertToRGB(last)
    last=SeparateFields(last)
    evn=SelectEven(last).Crop(0,0,-0,-1).AddBorders(0,1,0,0)
    odd=SelectOdd(last)
    last=Interleave(evn,odd)
    last=Weave(last)
    last=ConvertToYV12(last)
    Last edited by jagabo; 8th May 2013 at 07:33.
    Quote Quote  
  3. Member
    Join Date
    Sep 2012
    Location
    Australia
    Search Comp PM
    Thank you. I had to swap the evens and odd but now they're perfectly aligned. It's still not as clear as I'd like as all the horizontal lines are grey. Is there any way to convert all those grey pixels to white?
    Quote Quote  
  4. Originally Posted by ndjamena View Post
    all the horizontal lines are grey. Is there any way to convert all those grey pixels to white?
    I'm not sure what you mean. You mean all the horizontal strokes of the text are grey whereas the vertical strokes are white? Maybe a vertical sharpen? Sharpen(0.0, 1.0). I'd have to see a sample.
    Quote Quote  
  5. Member
    Join Date
    Sep 2012
    Location
    Australia
    Search Comp PM
    http://www.flickr.com/photos/92900013@N03/8719509289/in/photostream/

    You can see the top and bottom of all the lines are grey, yet not the sides. Either it has something to do with the fact that they're moving or the lines are better aligned with the pixels from side to side. Either way I'd like to see what it looks like in monochrome.

    Sharpening just made it worse.
    Quote Quote  
  6. Maybe the text went through a deflicker filter? Are you sure the frames are really interlaced? Not just out of phase? Try TFM() instead of the field shift.

    Otherwise, I'd need to see a bit of the source.
    Quote Quote  
  7. Member
    Join Date
    Sep 2012
    Location
    Australia
    Search Comp PM
    http://www.mediafire.com/?hpbd0qx4fga0ww0

    I don't know what out of phase means but I tried TFM() and it worked beautifully... Except some random frames didn't seem to benefit from it at all.
    The goal is to get these credits looking as nice and clear as possible. From looking at the product of my simple deinterlacer I'm pretty sure the grey pixels are being caused by the vertical movement since the greyness differs from frame to frame. Media Player actually gets it looking kind of nice until I pause it but I'm pretty sure that's using double rate deinterlacing. Everything I've tried so far makes it blurry and unreadable.
    Quote Quote  
  8. Member
    Join Date
    Sep 2012
    Location
    Australia
    Search Comp PM
    OK, now I'm confused. I just remembered I'd turned the system Deinterlacing off and I just played an episode of doctor who with Media Player to confirm it. Is MPEG2Source doing this???

    Nope, DirectShowSource does the same thing.


    ---Edit---
    I'm cleaning up some old posts of mine, I hope no one minds.

    This is what I ended up with:

    https://forum.videohelp.com/threads/359408-Script-for-using-different-filters-for-indiv...parts-of-video

    (the two threads kind of merged)

    It's not THAT different from the script Jagabo gave me below.
    Last edited by ndjamena; 22nd Apr 2014 at 00:33.
    Quote Quote  
  9. That's a tough video. About the best I could come up with was something like:

    Code:
    AssumeTFF()
    QTGMC()
    SelectEven()
    ColorYUV(gamma_y=600, off_y=-40) # brighten dark pixels
    Sharpen(0.5,1.0)
    Blur(1.0,0.5)
    ColorYUV(gain_y=-30)
    Click image for larger version

Name:	text2.png
Views:	293
Size:	126.9 KB
ID:	17724

    You can try playing around with the values to get it more to your liking. Instead of QTGMC().SelectEven() your shifted field technique might work better or worse.
    Quote Quote  



Similar Threads

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