VideoHelp Forum


Try DVD Fab Video Downloader and rip Netflix video! Or Try DVD Fab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 32
Thread
  1. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Trying to convert PAL dvd video back to Ntsc (was an American TV show). Seems like they used pulldown to convert 23.976 to 25 fps. I say this because bobbing (or deinterlacing with double-framerate) and deblending with srestore automatically outputs 23.976 fps, and runtime is essentially unchanged. However, there are occasional playback anomalies where a few frames jump back, or play slowly or oddly. Was originally using QTGMC (preset'"Fast"). Changing preset to "Faster" (the relevant settings that changed were TR0 and Rep0) corrected the step-back I noticed in one spot, but there is still the other issue elsewhere.
    Also tried Bob/Srestore, and Yadif(1)/Srestore, TFM/Bob/Srestore, but still see issues with playback.
    Help!
    Image Attached Files
    Quote Quote  
  2. Try
    Decimate()
    Yadif()
    AssumeFPS(23.976)
    Image Attached Files
    Quote Quote  
  3. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Decimation first will reduce video to 20 fps so this isn't correct.
    Quote Quote  
  4. Have you seen my sample?
    Quote Quote  
  5. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Yes.
    Quote Quote  
  6. It's Ntsc 23.976 fps...
    Quote Quote  
  7. Try:

    Code:
    Mpeg2Source("pal dvd.d2v") 
    TFM() 
    AssumeFPS(24000,1001)
    Spline36Resize(720,480)
    Image Attached Files
    Quote Quote  
  8. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Thanks jagabo, but do you see what's happening when the first guy's ducking his head? Looks like it's in slo-mo for an instant. This is the issue I'm seeing with my deinterlaced/deblend rips.
    Quote Quote  
  9. Oops, I left out AssumeTFF() after Mpeg2Source(). I also noticed that the video was improperly sharpened while interlace, resulting in some dark/bright halos when there's motion. A little blur reduces that:

    Code:
    Mpeg2Source("pal dvd.d2v") 
    Trim(2,0)
    AssumeTFF()
    Blur(0.0, 0.25)
    TFM()
    AssumeFPS(24000,1001)
    Spline36Resize(720,480)
    That first shot still isn't perfectly smooth but I think that's a problem with the video, not the script. Are there other shots where the script doesn't work?
    Quote Quote  
  10. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    I was already using AssumeTff() so that wasn't the problem. I'm encoding to dvd video (23.976 with pulldown) so maybe it's more noticeable than on a MKV. It happens in this particular video every 3-4 minutes. In other episodes from the same source, it can happen as much, or less. Except for the interlaced look or whatever, I don't see this problem on the PAL dvds, so it seems like the conversion should play smoothly. I tried deblending to 24 fps but that didn't solve it.
    Quote Quote  
  11. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Could this be a field order switch in the source? Perhaps you should provide another clip, longer, with the error somewhere in the middle
    Quote Quote  
  12. haven't try to test it, but wssn't restore24 written exactly for this scenario?
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  13. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Wouldn't Dgmpgdec have reported a field order change?
    I dunno about restore24. Posts I read are that it's buggy.
    Quote Quote  
  14. Originally Posted by spiritgumm View Post
    Wouldn't Dgmpgdec have reported a field order change?
    The video is encoded progressive so DgMpegDec has no idea what the field order is. In any case, a simple bob() tells you that's not the problem.
    Quote Quote  
  15. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Originally Posted by jagabo View Post
    Originally Posted by spiritgumm View Post
    Wouldn't Dgmpgdec have reported a field order change?
    The video is encoded progressive so DgMpegDec has no idea what the field order is. In any case, a simple bob() tells you that's not the problem.
    I was thinking the field transition error reporting, where it generated a fixed .d2v and bad .d2v was about field order switching.

    I tried your script on a longer sample and the output is full of the slow-mo type video, so not good. However, adding "blur" to my original Qtgmc/Srestore script fixed the back/forth problem in this clip. Another problem I was getting is flashing at scene changes. "Blur" seems to have eliminated this, and come to think of it, seems like the problems generally occur at scene changes. Added "blur' where my script was producing slow-mo spots elsewhere and it worked.
    I'm sure there are parameters in Qtgmc or Srestore that could do what blur seems to be doing regarding field matching (or whatever).
    Quote Quote  
  16. Originally Posted by spiritgumm View Post
    I was thinking the field transition error reporting, where it generated a fixed .d2v and bad .d2v was about field order switching.
    The video is encoded progressive. DgIndex doesn't even know the frames contain interlaced video. So it's not going to report anything about field order transitions.

    Originally Posted by spiritgumm View Post
    I'm sure there are parameters in Qtgmc or Srestore that could do what blur seems to be doing regarding field matching (or whatever).
    I'm pretty sure there is no such setting in QTGMC. It wouldn't make any sense in SRestore().
    Quote Quote  
  17. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Back to this project, why do you suppose blur helps the rest of the script?
    Quote Quote  
  18. The vertical blur fixes the damage caused by the non-interlaced-aware sharpen someone applied to the interlaced frames. That sharpen has created light/dark halos wherever there were combing. Fixing those halos lets SRestore() better determine which frames have blending.

    Here you can see a dark halo at the top of the guys head (it's moving down in this shot) on the left, fixed with the blur on the right:
    Image
    [Attachment 57222 - Click to enlarge]


    In the next field there's a bright halo just above his head, fixed on the right:
    Image
    [Attachment 57223 - Click to enlarge]


    You can see there's still a little bit of the bright blur there. A higher blur value may be needed. About 0.4 or more.
    Last edited by jagabo; 6th Feb 2021 at 07:08.
    Quote Quote  
  19. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Thank you, jagabo, although I don't see a dark halo or outline in the first image.
    I encoded the episode with .25 blur, and while it fixed the couple spots I've focused on, I noticed a worsening of another slow-mo spot. Using blur 0.4 helped with that spot. I was hoping to apply it to the whole episode, but I had a bad result in another episode. Maybe the strength needs to be set per episode, as opposed to a universal setting. Or maybe this isn't a generalizable solution.
    Last edited by spiritgumm; 6th Feb 2021 at 11:33.
    Quote Quote  
  20. Originally Posted by spiritgumm View Post
    Thank you, jagabo, although I don't see a dark halo or outline in the first image.
    Look at the top (top as viewed in the image, not as in the top of his head is his hair and the bottom of his head is his chin) of the guy's hair. It's darker than the rest of his hair.


    Originally Posted by spiritgumm View Post
    I encoded the episode with .25 blur, and while it fixed the couple spots I've focused on, I noticed a worsening of another slow-mo spot. Using blur 0.4 helped with that spot. I was hoping to apply it to the whole episode, but I had a bad result in another episode. Maybe the strength needs to be set per episode, as opposed to a universal setting. Or maybe this isn't a generalizable solution.
    The amount of blur needed depends on the amount of sharpening that was applied. And keep in mind the video is also compromised by the over compression and progressive encoding. So you're never going to get a perfect result.
    Quote Quote  
  21. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Someone shared the script they wrote for themself. I noticed some similar anomalies, but no scene-change flashing, and generally no slow-mo.

    MPEG2SOURCE("E:\video.d2v")
    Assumetff()
    d=TDeint(mode=1, type=2, full=false, tryWeave=true) #detection clip for srestore
    Sharpen(-.4) #some idiot sharpened video while interlaced causing motion trails
    QTGMC(preset="slower", sourcematch=3, lossless=1, tr0=0, tr1=1, tr2=0, edimode="eedi3", sharpness=.15)
    Srestore(frate=23.976, speed=-1, thresh=1, dclip=d, mode=4)

    This is what I was using, not including your "Blur" filter:
    MPEG2Source("D:\VTS_01_1.d2v", cpu=0)
    AssumeTFF()
    QTGMC(Preset="fast",TR0=1,Rep0=0)
    Srestore()
    Spline36resize(720,480)
    Quote Quote  
  22. Note that sharpening interlaced video produces a negative ghost of the other field. Ie, each field of the frame has a negative ghost of the other field. That's the opposite of blurring an interlaced frame where you get a positive ghost of the other field.
    Quote Quote  
  23. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Since the video was encoded progressive, I'm not sure which video you're talking about. Do you mean the original dvd video, or the script filter "Sharpen" even when it has a negative value?
    Either way, I'm not sure what the implications are of +/- ghosts.
    Quote Quote  
  24. Originally Posted by spiritgumm View Post
    Since the video was encoded progressive, I'm not sure which video you're talking about. Do you mean the original dvd video, or the script filter "Sharpen" even when it has a negative value?
    The original m2v video in your first post -- "pal dvd.m2v". The progressive encoding has caused the chroma of the two fields to be blurred together. It's hard to see in the clip because it's blurry, there's not much motion, and not very intense colors.

    Originally Posted by spiritgumm View Post
    Either way, I'm not sure what the implications are of +/- ghosts.
    Code:
    # build an interlaced video with the letter "A" on the left in one field, "B" on the right in the other field:
    v1 = BlankClip(width=320, height=120, color=$808080).Subtitle("A", size=100, x=50, halo_color=$404040)
    v2 = BlankClip(width=320, height=120, color=$808080).Subtitle("B", size=100, x=180, halo_color=$404040)
    Interleave(v1,v2)
    AssumeTFF()
    SeparateFields()
    SelectEvery(4,0,3)
    Weave()
    ConvertToYV12(interlaced=true)
    
    # show what happens when you blur/sharpen interlaced video without an interlace aware filter
    StackVertical(Bob(), Blur(0.5).Bob(), Sharpen(0.5).Bob(), Sharpen(0.5).Blur(0.40).Bob())
    
    # stack the two fields side by side for easy analysis
    StackHorizontal(SelectEven(), SelectOdd())
    Image
    [Attachment 57228 - Click to enlarge]


    The top pair is the interlaced frame deinterlaced with a simple Bob() with one field on the left, the other in the right. You can see that one field contains the letter A, the other the letter B.

    The second pair shows what happens when the video is blurred while interlaced. Notice the positive ghost of the other field's letter.

    The third pair shows what happen when the video is sharpened while interlaced. Notice the negative ghosts of the other field's letter.

    The last pair shows the result of blurring after sharpening created the negative ghosts. The ghosts are almost completely gone.
    Last edited by jagabo; 6th Feb 2021 at 18:55.
    Quote Quote  
  25. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Thank you for the education, jagabo. I'm gonna have to go to a mountaintop to contemplate this.
    So knowing the effects of sharpen/blur fields in interlacing, you could see this is what happened when you stepped thru the video? And the goal of blur to eliminate the ghosts?

    Qtgmc does some default sharpening (I think) so should the sharp setting be turned off so Srestore can work better? Or does it not matter since "Blur" is being added beforehand to reduce the ghosts?
    Quote Quote  
  26. Note that SRestore() sees positive ghosts as frame to be discarded. Negative ghosts are seen as unique detail, frames that need to be retained. So it gets very confused by them.
    Quote Quote  
  27. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    But the goal in this situation is to eliminate all ghosts, correct? I'm surprised there aren't setting recommendations to deal with both in this situation.
    Quote Quote  
  28. Positive ghosting from field blended PAL/NTSC conversions is very common. That's what SRestore() was designed to correct. Negative ghosting from incorrectly sharpening interlaced video is rare. It can't be corrected by SRestore() it has to be fixed before deinterlacing by QTGMC(), Yadif(), Bob(), Interleave(TFM(field=0), TFM(field=1)), whatever.
    Quote Quote  
  29. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    How would sharpening be done incorrectly to produce negative ghosts? Like in a avisynth script example.
    Quote Quote  
  30. I already gave you an AviSynth example.
    Quote Quote  



Similar Threads