VideoHelp Forum




+ Reply to Thread
Results 1 to 21 of 21
  1. Member
    Join Date
    Jun 2008
    Location
    United States
    Search Comp PM
    I have the hauppauge PVR 1212 and am capping HD material via component in 1080i. I have been converting the 1080i h.264 .ts caps from the 29.97fps to 23.976 and putting the video and audio in mkv containers. I am using TSmuxer to demux the video stream. DGAVCIndex to demux the audio and create my .dga file. I am using megui for the encoding. Essentially, everything is turning out great, but I am still getting some combing artifacts with both yadif and tdeint.

    First, I was using Tdeint for deinterlacing. However, I was noticing some strange combing artifacts, as if it was not properly "blending" the frames correctly. Below is a slightly zoomed in screen grab of what I am talking about. I have arrowed to only a few of the very visible spots. All the captures are TFF, and correct me if I am wrong with the term, but "hybrid", meaning the source is a mixture of progressive and interlaced frames.
    And here is the basic portion of the script:

    Tdeint()
    tfm().tdecimate()



    When I change the deinterlacer to yadif, I am not getting this as seen below:



    So at this point, things are looking like yadif is the way to go. However, I am still getting some strange interlacing artifacts with yadif, but they are much much more slight. They seem to be more visible on areas with small details.

    Here are some more examples.

    This is a grab using yadif. The area I pointed to on the bottle looks the same on every frame when playing it back.



    This is a grab using tdeint. I have pointed to a few areas of concern as well.



    Essentially, since I am archiving these movies, I want to get the best possible quality. I have tried a few different settings with tfm, but still, the same results.

    Perhaps I am asking too much from the deinterlacers, especially with yadif. However, one deinterlacer seems to have certain anomolies that the other does not.

    I would appreciate any suggestions.

    Thanks!
    Quote Quote  
  2. Tdeint()
    tfm().tdecimate()
    If it's telecined film, then you don't deinterlace before an IVTC. Try just:

    tfm().tdecimate()

    But that will only work if it's film - originally from a movie, shot on progressive 24fps film. If it really is interlaced - sourced from interlaced 30fps video cameras - then you don't IVTC. If it's telecined film and you still have problems after the TFM/TDecimate steps, then you might add Vinverse() at the end. It's supposed to clean up any interlacing that manages to slip through. But, of course, TFM has its own TDeint to do the same thing by default. And you can also tweak the TFM settings to make it more sensitive to interlacing.
    Quote Quote  
  3. Also try:

    Blur(0, 1)
    Sharpen(0, 0.8)

    You may want to fine tune the second argument to Sharpen().
    Quote Quote  
  4. Member
    Join Date
    Jun 2008
    Location
    United States
    Search Comp PM
    Originally Posted by manono
    Tdeint()
    tfm().tdecimate()
    If it's telecined film, then you don't deinterlace before an IVTC. Try just:

    tfm().tdecimate()

    But that will only work if it's film - originally from a movie, shot on progressive 24fps film. If it really is interlaced - sourced from interlaced 30fps video cameras - then you don't IVTC. If it's telecined film and you still have problems after the TFM/TDecimate steps, then you might add Vinverse() at the end. It's supposed to clean up any interlacing that manages to slip through. But, of course, TFM has its own TDeint to do the same thing by default. And you can also tweak the TFM settings to make it more sensitive to interlacing.
    Yes, everything I am capping is film. When reading the .txt file for TFM, they warn about how different "modes" might produce jerkiness. And since I am just using a 3 minute clip to run tests on, I am afraid that even if I do get rid of the combing, I might later see jerkiness in full encode. In addition, there are quite a few deinterlacing options. Is my logic correct in that because when I was using yadif (which uses interpolation), that using the default "motion-adaptive cubic interpolation deinterlacing" in TFM might be a close match?

    I know that asking "which deinterlacer or deinterlacing method is best" is like asking what is the best ice cream, but I would appreciate additional input.

    Thanks again!


    As I mentioned, I am a newbie!
    Quote Quote  
  5. Member
    Join Date
    Jun 2008
    Location
    United States
    Search Comp PM
    Originally Posted by jagabo
    Also try:

    Blur(0, 1)
    Sharpen(0, 0.8)

    You may want to fine tune the second argument to Sharpen().
    I have been experimenting with Msharpen a little bit as well, but I will certaintly give your suggestion a try.
    Quote Quote  
  6. The Blur/Sharpen I recommended only blurs on the vertical dimension (to blend out any remaining comb artifacts). Then Sharpen restores most of the sharpness without restoring comb artifacts.

    By the way, deinterlacing telecined film will definitely create a jerky result. You'll need to decimate to get rid of duplicate frames. So you might as well just IVTC.
    Quote Quote  
  7. Member
    Join Date
    Jun 2008
    Location
    United States
    Search Comp PM
    I just did a quick test run without deinterlacing and using the default tfm and tdecimate without any sharpening or without using the vinverse plugin. Though I can see some combing still, the picture appears a little sharper. I will have to mess with it more tomorrow, but I think I am getting closer.

    You guys are awesome. Thanks for helping out a newbie!
    Quote Quote  
  8. I am afraid that even if I do get rid of the combing, I might later see jerkiness in full encode. In addition, there are quite a few deinterlacing options. Is my logic correct in that because when I was using yadif (which uses interpolation), that using the default "motion-adaptive cubic interpolation deinterlacing" in TFM might be a close match?
    Making the filter more sensitive to interlacing won't make it play jerky. You might play around with the CThresh (part of TDeint being used to catch residual interlacing):
    cthresh:

    Area combing threshold used for combed frame detection. It is like dthresh or dthreshold in telecide() and fielddeinterlace(). This essentially controls how "strong" or "visible" combing must be to be detected. Good values are from 6 to 12. If you know your source has a lot of combed frames set this towards the low end (6-7). If you know your source has very few combed frames set this higher (10-12). Going much lower than 5 to 6 or much higher than 12 is not recommended.

    default - 6 (int)
    And I always use the default deinterlacer. It's good. There's no reason at all to use Yadif with hard telecined material as it's always on - it's deinterlacing everything, not good for film sources. Like I said earlier, Vinverse was developed as a "conditional" deinterlacer - if it doesn't find interlacing, it doesn't deinterlace. TDeint(Full=False) can be used for the same purpose, but it may not be quite as good for this purpose (as a post-processor) as is Vinverse.

    If you do use a post-processor like Vinverse, you might disable the post-processor within TFM with a simple TFM(PP=0)
    Quote Quote  
  9. If you want a (near) perfect IVTC you have to do it yourself with

    SeparateFields().SelectEvery(10,...).Weave()

    It's a lot of work if there are many pattern breaks.
    Quote Quote  
  10. Member
    Join Date
    Jun 2008
    Location
    United States
    Search Comp PM
    Okay, I have had more time to so some more test-runs. As suggested, I used the Vinverse filter/plugin. Let me tell you, this has made a world of difference. Using it with and without TFM deinterlacing really makes no difference to my eyes (yet), so for now, I am just using the following script.

    tfm(PP=0).tdecimate()
    Vinverse()

    I am using the default settings, but wondered if anyone had any suggestions for using VInverse for sharpening instead of using Msharpen. Do the "sstr" and "scl" options effect the sharpness of the total picture? for Here are the settings for Vinverse as listed in the .txt file:

    sstr: strength of contra sharpening (default = 2.7)
    amnt: change no pixel by more than this (default = 255, range: 0 < amnt <= 255)
    uv : chroma mode, as in MaskTools: 1=trash chroma, 2=pass chroma through, 3=process chroma (default = 3)
    scl : scale factor for VshrpD*VblurD < 0 (default = 0.25)
    opt : 0 = use c, 1 = use mmx, 2 = auto detect (default = 2, mmx and c routines give the same output)

    Thanks again!
    Quote Quote  
  11. Sorry, but I can't help you there. I've only used Vinverse with the default settings. I do all my sharpening using Limited Sharpen Faster (or SeeSaw):

    http://avisynth.org/mediawiki/LimitedSharpen

    But I think the sharpening is around where the interlacing was before. It's somewhat similar to jagabo's idea of blurring followed by sharpening, but just around the interlaced part and not the entire frame. I think. So Vinverse wouldn't be very useful as a general purpose sharpener.
    Quote Quote  
  12. Member
    Join Date
    Jun 2008
    Location
    United States
    Search Comp PM
    Okay...everything seems to be looking pretty good still. I however did notice something tonight for the first time. I have a video that is completely converted. This is the portion of my script that has a little concern:

    tfm(PP=0).tdecimate()
    Vinverse()

    I noticed that in a couple of areas, I had a little bit of stutter. Both areas are an overhead scene panning fairly quickly over some bare trees witha bunch of branches. When going through frame by frame, I did notice a couple of duplicate frames. In addition, I noticed a few areas where you can still see a "blur" (see image below) of two frames being blended (am I saying this correct???)



    I don't know if the high amount of moving detail "confuses" some portion of my script. It does not do it initially...say for the first 50 frames or so.

    Would you have a suggestion as to a tfm or tdecimate setting to help eliminate this?

    Thanks as usual!
    Quote Quote  
  13. That's something else, I think. You may have a blended source, or for some reason that particular section is blended, because nothing in that script will actually create blends. They have to be in the source. If you have a blended source, you should be handling it completely differently, with an unblender. To see if it's blended, put on a smart bobber, perhaps TDeint(Mode=1) or some other, without any other filtering (no IVTC or Vinverse). That will double the framerate to 59.94fps (check to make sure). Open it in VDub(Mod), scroll to a place with movement and start advancing a frame at a time. If you begin to see blends/ghosts/blurring/double images, then you're screwed. If it's only a very small section of the movie that has this blending, I wouldn't worry about it, or you could handle just that part of the movie differently.

    Or upload a small 5 second piece showing movement for us to have a look.
    Quote Quote  
  14. Doesn't Vinverse() blend interlace artifacts?
    Quote Quote  
  15. I didn't think so, but your question had me rethink it and run a test. And on an interlaced video with Vinverse added into the script I saw the blends. I should have known, I guess, that blurring a video would produce that. Thanks for the correction.

    So, I guess the blended stuff djdrock has could very well be Vinverse doing its thing. Better that than the interlacing slipping through, but it makes one wonder why the IVTC is failing there. Perhaps there's an unusual cadence at that point. He could try removing the PP=0 from TFM and letting the TIVTC deinterlacer do the deinterlacing, as it's an interpolating deinterlacer. There's a fair chance the stutters might go away. The blends should definitely go away if it picks up the interlacing.
    Quote Quote  
  16. All the automated IVTC methods I've tried screw up at times. They let some interlaced frames through, some duplicate frames, some dropped frames.

    djdrock, If you want near perfect results you have to do the IVTC "manually". You have to identify all the segments of constant pulldown pattern and treat them individually. Here's a script I used recently to IVTC an MPEG2 video:

    src = MPEG2Source("filename.d2v").ConvertToYUY2(interlac ed=true)

    v1=trim(src, 0, 17602).SeparateFields().SelectEvery(10, 0,1, 2,3, 5,6, 8,9).Weave()
    v2=trim(src, 17603, 34824).SeparateFields().SelectEvery(10, 1,2, 4,5, 6,7, 8,9).Weave()
    v3=trim(src, 34825, 69274).SeparateFields().SelectEvery(10, 1,2, 4,5, 6,7, 8,9).Weave()
    v4=trim(src, 69275, 70745).SeparateFields().SelectEvery(10, 0,1, 3,4, 6,7, 8,9).Weave()
    v5=trim(src, 70746, 87646).SeparateFields().SelectEvery(10, 0,1, 2,3, 4,5, 7,8).Weave()
    v6=trim(src, 87647, 103268).SeparateFields().SelectEvery(10, 0,1, 2,3, 4,5, 7,8).Weave()
    v7=trim(src, 103269, 120330).SeparateFields().SelectEvery(10, 0,1, 2,3, 4,5, 7,8).Weave()
    v8=trim(src, 120331, 0).SeparateFields().SelectEvery(10, 0,1, 2,3, 4,5, 7,8).Weave()

    return(v1+v2+v3+v4+v5+v6+v7+v8).ConvertToYV12().De block().LanczosResize(640, 480)

    I have a Hauppauge HD PVR on order -- should be here tomorrow!
    Quote Quote  
  17. Member
    Join Date
    Jun 2008
    Location
    United States
    Search Comp PM
    Aagin, I can't thank all of you enough here. You have been of tremendous help. I plan on doing a quick cap of just the area in question, and trying a few different things as per your suggestion.

    Originally Posted by jagabo
    I have a Hauppauge HD PVR on order -- should be here tomorrow!
    I am looking forward to hearing how you like it, and, if you are interested in doing IVTC with your caps.

    I will report back my findings later.
    Quote Quote  
  18. Member
    Join Date
    Jun 2008
    Location
    United States
    Search Comp PM
    For those interested, and quite possibly bored, here is a the link to a 14 second clip of the section in question. This is the raw .ts file.

    http://www.sendspace.com/file/vqswmj

    I just re-ran just this clip with the same avisynth script, just to double check if it was an isolated event. It is not.
    Quote Quote  
  19. I saw no blending artifacts and no telecine pattern breaks in your sample. I used the following AviSynth script to IVTC:

    DirectShowSource("DutchSample.ts")
    ConvertToYUY2(interlaced=true)
    AssumeTFF()
    SeparateFields()
    SelectEvery(10, 0,1, 2,3, 4,5, 7,8)
    Weave()

    Also did a quick BilinearResize(704, 400) and compressed with Xvid (no audio):

    output.avi
    Quote Quote  
  20. Member
    Join Date
    Jun 2008
    Location
    United States
    Search Comp PM
    Thanks for doing a testrun for me. I tried the following script and it got rid of the stutter and blurred frames.

    tfm().tdecimate()
    Vinverse()

    Looks like Vinverse is not enough, and that TFM needs to do its own deinterlacing in order to perfect things.
    Quote Quote  
  21. Well, I've had the HD PVR for a few days. It's a rev. C2 version and seems to work well. I haven't had any freezing problems like those who got the first version. Some observations:

    I haven't done a lot of experimenting with bitrates. Mostly I've just set it at the max "average" VBR settings. This is indicated as 13.5 Mb/s average and 20 Mb/s peak in the Arcsoft capture app. The bitrate delivered appears to be less -- about half that. I'll have to experiment some more. So far video quality has been very good with both 720p and 1080i sources.

    My cable box won't output to both HDMI and component at the same time. I have to unplug the HDMI cable whenever I want to capture something. It's a PITA but its Hollywood's fault, not Hauppauge's.

    I have a NVIDIA 8600 GT video card and the included Arcsoft software is using its hardware h.264 decoding. While previewing or capturing CPU usage is about 1 or 2 percent (Q6600 CPU).

    I've found a combination of Haali Media Splitter, CoreAVC Pro, and Media Player Classic gives very smooth, problem free playback. I use both outputs on my 8600 GT, one to a monitor, the other to a HDTV (DVI -> HDMI cable). Both outputs look good. CPU usage runs about 25 percent with this combination.

    KMPlayer has some problems with 1080i (incomplete PAFF/MBAFF support?) but handles 720p properly. If I disable its internal h.264 and AVC1 decoders (forcing it to use Core AVC Pro) playback is clean but the video runs at the wrong frame rate (too fast) while audio is at the normal speed.

    The other players I've tried have problems. VLC (a recent nightly build with PAFF/MBAFF support) plays the TS files but crashes after a few seeks. The last official build (no PAFF/MBAFF support) crashes right away with 1080i sources, after a few seeks with 720p. Mplayer2 and WMP play the videos but if you use the seek bar they turn into slideshows (maybe displaying only key frames?).

    Editing the HD PVR's TS files is the biggest problem. The available tools don't handle the format well. The best I've found so far is TS Packet Editor, a non reencoding h.264 TS editor. But it gets confused about timing. The edits get more and more inaccurate the further into the video you get. At the end of a 1 hour capture the edit points are a few minutes off. If this program worked a better it would be all I need to trim the ends and cut out commercials.

    VirtualDub and AviDemux won't open the TS files directly. Using AviSynth's DirectshowSource() allows VirtualDub to open the files. I can even transcode to Xvid or whatever -- as long as I don't use the seek bar. Once I start seeking around VirtualDub gets very slow and all confused. Cuts and pastes no longer appear in the right place, encoding slows to a crawl, etc. One long encode I tried ended up with A/V sync problems after a while. I'm trying another with fps=59.94 and convertfps=true to see if this fixes that problem.

    I worked out a way to remux the audio and video into an MP4 container. I use tsMuxeR to demux the audio and video streams, then Yamb to mux them into MP4. I have to manually specify the video frame rate in Yamb. Short videos seem to remux properly. One longer video I've tried had a problem -- about half way through (30 minutes) the video no longer played. Audio kept going. I will look into this some more... EDIT: Remuxing the elementary streams back into TS with tsMuxeR works fine. It appears YAMB/MP4Box isn't muxing properly into an MP4 container when the file size gets over 2 GB.
    Quote Quote  



Similar Threads

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