VideoHelp Forum




+ Reply to Thread
Results 1 to 19 of 19
  1. Member
    Join Date
    Jan 2009
    Location
    United States
    Search Comp PM
    Ok, I have been working on successfully transcoding Star Trek:TNG DVDs to h.264/mp4. The opening credits that are overlaid on the video (in blue font) have a lot of dotcrawl. Using tcomb(mode=0,fthreshL=8,othreshL=12) seems to pretty effectively eliminate the dot crawl. I would like to apply this only to the first X frames or something like that to avoid blurring the whole video. I am trying to tinker around with ApplyRange to do this, but I can't figure out how to do it correctly.

    I tried this:
    Code:
    MPEG2Source("D:\encode\Test\startrek\TNG.S1E01-clip.d2v",cpu=3)
    applyrange(0,2980,"tcomb",mode=0,fthreshL=8,othreshL=12)
    TFM()
    Tdecimate(mode=0,hybrid=1)
    Vinverse()
    AvsP tells me that applyrange does not have a named argument "mode". According to the wiki for animate, it seems like it should be passing this to tcomb. What have I screwed up?
    Quote Quote  
  2. Member edDV's Avatar
    Join Date
    Mar 2004
    Location
    Northern California, USA
    Search Comp PM
    Are you saying the dot crawl is on the original DVD?
    Recommends: Kiva.org - Loans that change lives.
    http://www.kiva.org/about
    Quote Quote  
  3. Another approach is to use Trim() to divide up sections to apply filters to specific sections

    a=MPEG2Source("D:\encode\Test\startrek\TNG.S1E01-clip.d2v",cpu=3)
    b=a.trim(0,2989).somefilter()
    c=a.trim(2990,0)

    b++c
    TFM()
    Tdecimate(mode=0,hybrid=1)
    Vinverse()



    There is an explation why applyrange() only works for some filters and args... I can't recall the details. It was explained on D9, but that site is down now... Maybe Gavino will pop by and explain why
    Quote Quote  
  4. Member
    Join Date
    Jan 2009
    Location
    United States
    Search Comp PM
    Originally Posted by edDV View Post
    Are you saying the dot crawl is on the original DVD?
    Yes.

    Originally Posted by poisondeathray View Post
    Another approach is to use Trim() to divide up sections to apply filters to specific sections

    a=MPEG2Source("D:\encode\Test\startrek\TNG.S1E01-clip.d2v",cpu=3)
    b=a.trim(0,2989).somefilter()
    c=a.trim(2990,0)

    b++c
    TFM()
    Tdecimate(mode=0,hybrid=1)
    Vinverse()



    There is an explation why applyrange() only works for some filters and args... I can't recall the details. It was explained on D9, but that site is down now... Maybe Gavino will pop by and explain why
    Thanks, pdr. I tried nearly the exact same script that you listed above (change to 2980 and 2981 to turn off during scene with dotcrawl) in AvsP. It seems to ignore all together (i.e. there is dotcrawl on all frames again). Do logicals not work in AvsP?

    edit: Nevermind, I figured it out. The frame numbers when applied to trim/tcomb are before IVTC.
    Quote Quote  
  5. Member
    Join Date
    Jan 2009
    Location
    United States
    Search Comp PM
    What if I want to use trim to filter both the opening and closing credits? Can trim be used like trim(-2000,0) to do the last 2000 frames? Or is there a way to do this without knowing the number of frames in each video?

    Edit: would something like b=a.trim(framecount(a)-2000,0) work for the last 2000 frames?
    Last edited by txporter; 31st Jan 2011 at 19:28. Reason: Updating
    Quote Quote  
  6. Member
    Join Date
    Jan 2009
    Location
    United States
    Search Comp PM
    Ok, it seems to work fine with this script:
    Code:
    a=MPEG2Source("D:\encode\Test\startrek\TNG.S1E01-clip.d2v",cpu=3)
    b=a.trim(0,6250).tcomb(mode=0,fthreshL=8,othreshL=12)
    c=a.trim(6251,framecount(a)-2001)
    d=a.trim(framecount(a)-2000,0).tcomb(mode=0,fthreshL=8,othreshL=12)
    b++c++d
    TFM()
    Tdecimate(mode=0,hybrid=1)
    Vinverse()
    I am trying to understand how this script is working. Do I consider it for each frame as it passes through the script? So frame 1 will be sourced as a, and then it basically goes through if/then logic to be assigned as b,c or d? And then anything that is b,c or d gets passed through TFM,Tdecimate and then Vinverse?

    It almost seems like everything above the b++c++d line should be completed first before going on through TIVTC. I understand that isn't happening, but it is sort of confusing.

    What would happen if I did the aligned splice at the end? Would it barf because I am not assigning an input to TIVTC and Vinverse?
    Quote Quote  
  7. Member
    Join Date
    Jan 2009
    Location
    United States
    Search Comp PM
    I have a follow-up question to these. Is it possible to apply a filter to only a portion/section/zone of a frame? Can I apply the dot crawl filter to only the top or bottom of a frame or some box entirely within the frame?
    Quote Quote  
  8. Is it possible to apply a filter to only a portion/section/zone of a frame? Can I apply the dot crawl filter to only the top or bottom of a frame or some box entirely within the frame?
    I think there are 2 approaches in avisynth

    you can have 2 versions of the frame or video, 1 filtered , 1 unfiltered

    a) overlay 1 cropped filtered version over the other using overlay() . You can feather the edges by using a blurred luma matte. If you use the luma matte method with alpha channel, you can use non-rectangular overlays (you're not limited to rectanglar "blocks")

    b) a combination of crop() and stackvertical() or stackhorizontal()



    Did you get answers for the other questions? Bascially you have to keep track if you're using IVTCed or non IVTCed frame numbers when using trim(). Most dotcrawl filters are applied before IVTCing . The frame count changes between them because you've decimated the dupes using TDecimate(), so you're trim() numbers or aligned splices ++ will be different
    Last edited by poisondeathray; 8th Mar 2011 at 15:21.
    Quote Quote  
  9. Member
    Join Date
    Jan 2009
    Location
    United States
    Search Comp PM
    Eek. Ok, I see where you are going. More work than I really want to do to convert these episodes.

    I am now looking into ConditionalFilter to possibly only use the tcomb filter when there is actually dot crawl present. I know that dot crawl is due to luma flickering. Is there an easy test for dot crawl that can be passed through the conditional filter? I see the example on the ConditionalFilter page uses AverageLuma() which is what made me think it might be possible to do something along those lines to detect it.

    Originally Posted by poisondeathray View Post
    Did you get answers for the other questions? Bascially you have to keep track if you're using IVTCed or non IVTCed frame numbers when using trim(). Most dotcrawl filters are applied before IVTCing
    No. I didn't dig too hard myself though. The script worked...so I sort of just dropped it.
    Quote Quote  
  10. Originally Posted by txporter View Post
    I am now looking into ConditionalFilter to possibly only use the tcomb filter when there is actually dot crawl present. I know that dot crawl is due to luma flickering. Is there an easy test for dot crawl that can be passed through the conditional filter? I see the example on the ConditionalFilter page uses AverageLuma() which is what made me think it might be possible to do something along those lines to detect it.

    hold on, are we talking about the same thing ?

    dot crawl usually refers to cross talk between analog channels

    luma flickering is something different
    Quote Quote  
  11. Member
    Join Date
    Jan 2009
    Location
    United States
    Search Comp PM
    I hope so. Here is a small clip of what I am seeing/trying to address. It happens in the credit for TNG.

    The script that I posted above works fine, but it really hurts some of the CGI scenes (especially some of the planets shown earlier in the intro). I am trying to find some way of detecting when the blue credits exist and run tcomb on those frames and not on others. The length of the intro scene is not always the same, so I have to run a fairly wide number of frames through tcomb unless I am willing to go in and detect the frames manually on each episode.
    Image Attached Files
    Quote Quote  
  12. yes, that's dot crawl on the blue text, but that doesn't necessarily have anything to do with luma flickering

    I don't think you could devise a filter that detects based on luma flickering and apply to the dot crawl in that clip

    luma flickering can occur spatially (parts of the frame are brighter or darker, common example is scrolling bars on vhs captures) or temporally (luminance variance occurs between frames, a common example is timelapse footage)

    I think the easiest "fast" way to treat that without degrading other parts is to apply the filter to a central "stripe"
    Quote Quote  
  13. Member
    Join Date
    Jan 2009
    Location
    United States
    Search Comp PM
    Ok, not stuck with the idea of using luma flickering. Was just reading through Scintilla's pages and thought that might be a possibility. Now reading the docs on tcomb, tritical says dot crawl is actually due to cross-chrominance artifacts. At any rate, is it possible with another/any detection method?
    Quote Quote  
  14. I can't think of any automated detection methods that would selectively narrow in on just the dot crawl (otherwise I would have expected one of the gurus to have released a more selective dotcrawl filter), you could ask at doom9 avisynth forum
    Quote Quote  
  15. Member
    Join Date
    Jan 2009
    Location
    United States
    Search Comp PM
    Ok, thanks pdr.
    Quote Quote  
  16. Aren't the intro/end credits basically the same (except for guest stars)? If you can "tough" it out for 1 episode , you can re-use that for the other episodes
    Quote Quote  
  17. Member
    Join Date
    Jan 2009
    Location
    United States
    Search Comp PM
    Not really. The problem is that they usually have a 2-4 minute segment of the episode before the credits and then the casting credits actually continue into the video footage after the main intro. So each episode does really need to be handled separately.

    But, I can probably tough it out anyhow. I usually convert everything through batch files anyhow. I can just index all of the videos and manually go in and find the frame start and end and update the avs script. It's a pain, but it really shouldn't kill me or shorten my life or anything.
    Quote Quote  
  18. Duh! I should have known that ... I used to be a fan and watched almost every episode on TV
    Quote Quote  
  19. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by txporter View Post
    I tried this:
    Code:
    MPEG2Source("D:\encode\Test\startrek\TNG.S1E01-clip.d2v",cpu=3)
    applyrange(0,2980,"tcomb",mode=0,fthreshL=8,othreshL=12)
    TFM()
    Tdecimate(mode=0,hybrid=1)
    Vinverse()
    AvsP tells me that applyrange does not have a named argument "mode". According to the wiki for animate, it seems like it should be passing this to tcomb. What have I screwed up?
    Originally Posted by poisondeathray View Post
    There is an explation why applyrange() only works for some filters and args... I can't recall the details. It was explained on D9, but that site is down now... Maybe Gavino will pop by and explain why
    I didn't see this thread the first time around, so didn't reply then.
    The main limitation of ApplyRange() (which it shares with Animate()) is that it does not support named arguments for the applied filter. Any arguments must be passed positionally in the correct order (defaulted values at the end of the list can be omitted).
    As far as the Avisynth command parser is concerned, ApplyRange is just another function, and since it really does not have a named argument "mode", the parser rejects the call above.
    Quote Quote  



Similar Threads

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