VideoHelp Forum
+ Reply to Thread
Results 1 to 24 of 24
Thread
  1. Member brassplyer's Avatar
    Join Date
    Apr 2008
    Location
    United States
    Search Comp PM
    I've been deinterlacing DV files with Avisynth using the Tempgauss filter to improve results with the Thalen Deshaker under Vdub. The deinterlaced files look clean, however upon reinterlacing the results don't look as smooth as the original DV avi file. I'm judging these playing back on a computer not a tv but it seems it should be possible to retain the clarity.

    I uploaded several short 5 sec segments to show the progression of the results I'm getting. On all but the mpg file, I deinterlaced to DV because Huffyuv files are too large to upload.

    Original DV file

    http://www.fileden.com/files/2010/3/22/2800754//Original_DV.avi

    Same file deinterlaced with Avisynth and deshaken with Thalen deshaker. Looks clean.

    http://www.fileden.com/files/2010/3/22/2800754/Original_tempgauss%20beta2%20fast%20set...ings_DV_DS.avi

    Now reinterlaced using Avisynth. In particular look near the bottom left side of the large column during the R > L panning motion. That's where I see artifacts not in evidence in the original.


    http://www.fileden.com/files/2010/3/22/2800754//Avisynth_reinterlace_DV.avi

    Reinterlaced using the Vdub interlacer. Same thing
    .

    http://www.fileden.com/files/2010/3/22/2800754//reint_Vdub_internal_DV.avi


    Interlaced mpeg-2 file made from a deinterlaced and deshaken Huffyuv file. Here I see overall "jitteriness" in the image.

    http://www.fileden.com/files/2010/3/22/2800754//Original_tempgauss_beta2_fast_Huff.mpg

    The goal of course is to deinterlace, deshake, reinterlace and retain the same clarity as the original DV avi.

    Any suggestions?

    Thanks
    Last edited by brassplyer; 13th May 2010 at 18:47.
    Quote Quote  
  2. I just looked at the last one, and you did something wrong. It's progressive 29.97 (so 1/2 the temporal information), hence the "jitteryness".

    The avisynth re-interlaced file is fine in terms of interlacing and fields, but I can confirm it has the artifacts

    Your URL link to the 2nd file is wrong, so I can't check where the problem in your workflow is

    I'd also be concerned about the levels if this is for DVD, you're blowing out everywhere
    Quote Quote  
  3. The last one, Original_tempgauss_beta2_fast_Huff.mpg was never reinterlaced. Since you didn't post your script, I'm not positive what you did, but my guess is that you just saved every other frame of the double-rate TempGauss (using SelectEven, maybe). And if I were you, I'd try and do something about the badly blown out whites. The blacks are probably crushed also, but that's a pretty bright scene and it's hard to tell.
    Quote Quote  
  4. Member brassplyer's Avatar
    Join Date
    Apr 2008
    Location
    United States
    Search Comp PM
    Originally Posted by poisondeathray View Post
    I just looked at the last one, and you did something wrong. It's progressive 29.97 (so 1/2 the temporal information), hence the "jitteryness".
    You're talking about the .mpg file correct? It was made from a deinterlaced Huffyuv file using TMPGenc. I selected "interlace" under encode mode. Mediainfo shows it as interlaced...?

    The avisynth re-interlaced file is fine in terms of interlacing and fields, but I can confirm it has the artifacts

    Your URL link to the 2nd file is wrong, so I can't check where the problem in your workflow is
    Should be fixed now.

    I'd also be concerned about the levels if this is for DVD, you're blowing out everywhere
    It's just overexposed. It looks like the original. I unfortunately discovered that the viewscreen on my Digital8 camcorder doesn't represent exposure as laid onto tape reliably.

    I picked that particular segment because the foreground provided a good look at the artifacts for purposes of this issue.
    Quote Quote  
  5. It doesn't matter what mediainfo says, it just reads the header and is flagged as interlaced. But the actual content isn't. The last one (the .mpg) isn't done correctly, hence you're seeing only 1/2 the content and that's why it seems "jittery"

    IIRC, your DV decoder or encoder was the culprit in your other thread, which was started because of similar blocky artifacts. No one else was able reproduce them. I suggest using what was suggested in that thread , cedocida, and ditching the mainconcept one you were using.

    There is a new version of cedocida out ,that has an AR setting now 4:3 / 16:9 , not a problem for most people because they just set it in the encoder as they encode to MPEG2 or use it in their editor
    http://forum.doom9.org/showthread.php?p=1399511#post1399511

    I just looked at your original footage, did some quick tests and not seeing any block artifacts, so I highly suspect it was your encoder/decoder combo. Also, don't use DV for a 60p intermediate, it's not a supported format. When I looked at your #2 video, and tried to re-interlace it , it showed artifacts too. When I did the process from scratch properly (bob deinterlaced your original, deshaker, to lossless lagarith (i.e NOT DV), reinterlaced it worked fine without the block artifacts near the tower
    Last edited by poisondeathray; 13th May 2010 at 19:43.
    Quote Quote  
  6. Member brassplyer's Avatar
    Join Date
    Apr 2008
    Location
    United States
    Search Comp PM
    Originally Posted by poisondeathray View Post
    It doesn't matter what mediainfo says, it just reads the header and is flagged as interlaced. But the actual content isn't. The last one (the .mpg) isn't done correctly, hence you're seeing only 1/2 the content and that's why it seems "jittery"
    Will have to explore that further. Entirely possible I'm not steering TMPGenc properly. My ultimate goal is to create Mpeg-2 files for DVD so that's definitely something I need to get on top of.

    IIRC, your DV decoder or encoder was the culprit in your other thread, which was started because of similar blocky artifacts.
    What I got from that thread is the problems were being caused by the Deshaker not handling the interlacing on the DV files and was advised to convert to deinterlaced Huffyuv to get better results when deshaking. The problem now is getting back to an interlaced form. I'm not sure you can blame it on the Mainconcept codec because I get the same thing using Huffyuv - I'd upload those but I'm limited to 50 megs on fileden. Using the DV files to represent the problem.

    I got the Mainconcept codec to begin with since I was advised it was supposed to be well regarded.

    When I did the process from scratch properly (bob deinterlaced your original, deshaker, to lossless lagarith (i.e NOT DV), reinterlaced it worked fine without the block artifacts near the tower
    Can you advise specifically how you bob deinterlaced it and reinterlaced it? There are various options on the Vdub bob deinterlacer.

    Thanks.
    Quote Quote  
  7. you can use any bob deinterlacer, I did it with tempgaussmc_beta1, because that's what you were using

    whenever you do your colorspace conversions, make sure you specify interlaced=true (e.g. when you export from deshaker it will be rgb, to convert to a yv12 format for mpeg you need to specify converttoyv12(interlaced=true) )

    if you're saying your video#2 when done with huffyuv instead of dv still had issues, then it had to be something else previous to that, because when I did that step using lagarith, it worked out ok without those block artifacts

    here is it encoded with mpeg2 (i did a quick levels conversion to tone down the highlights too)

    to summarize:
    1) bob deinterlace to 60p using tgmc, converttoyv12(interlace=true) because my dv decoder outputs YUY2, encoded with lagarith for lossless intermediate
    2) deshaken in vdub => outputs RGB because using filters in vdub will do an RGB conversion, encoded with Lagarith in RGB mode
    3) ConverttoYV12() and AssumeBFF().SeparateFields().SelectEvery(4, 0, 3).Weave() to reinterlace => this is an .avs I feed directly to the MPEG2 encoder
    4) Encoded as interlaced, BFF in HCenc MPEG2 for DVD


    Don't you agree that those block artifacts are very reminescent of the issues you had in that other thread?
    Image Attached Files
    Last edited by poisondeathray; 14th May 2010 at 08:01.
    Quote Quote  
  8. Member brassplyer's Avatar
    Join Date
    Apr 2008
    Location
    United States
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Don't you agree that those block artifacts are very reminescent of the issues you had in that other thread?
    Except the issue there was the Deshaker screwing up the interlacing - I had been doing the deshaking on an interlaced 29.97 file. Here the file that was deshaken was a deinterlaced file - both DV and Huffyuv.

    Hmm...Looked at the reinterlaced.m2v file. When I play it with WMP, it looks more blurred the the Original.avi, however played with KMP, they both look about the same - both sort of fuzzy when there's lateral motion.
    Last edited by brassplyer; 13th May 2010 at 21:01.
    Quote Quote  
  9. It's blurrier because I used default TGMC settings, which denoise quite a bit if you recall (i think I also tuned down the sharpening because your original footage has oversharpened halos).

    If you disable the processing, it will be sharper,but you will get more jaggies. Another option to tweaking the settings to use another deinterlacer

    The fuzziness (if your're referring to the buzzing lines and aliasing) is partly because your playback is using a low quality deinterlacer in kmplayer

    Eitherway, I cannot reproduce the block artifacts when I did it from scratch using the steps above. You can tweak the filters to be sharper, or cleaner, or more noisey etc... to your tastes

    You can avoid all these issues if you shot progressive
    Quote Quote  
  10. Member brassplyer's Avatar
    Join Date
    Apr 2008
    Location
    United States
    Search Comp PM
    I appreciate your assistance.

    Originally Posted by poisondeathray View Post
    You can avoid all these issues if you shot progressive
    I don't believe it's an option with my cam and can't do anything about the video I already have.
    Quote Quote  
  11. yes, I was half joking - it's actually not an option for dvd either (to get 60 in terms of temporal resolution for progressive) , I was referring to something like 720p60 for blu-ray

    it will look slightly better if you higher bitrate for the mpeg2 for dvd (I only used 6), and you watch it on a dvd setup instead of using a software realtime deinterlacer.

    also, when you play it back in software you have to be in bob mode for it to be smooth like it would be on a dvd setup (eg. vlc deinterlace in bob mode, kmplayer by default will only single rate deinterlace)
    Last edited by poisondeathray; 13th May 2010 at 21:56.
    Quote Quote  
  12. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by poisondeathray View Post
    3) ConverttoYV12(interlaced=true) and AssumeBFF().SeparateFields().SelectEvery(4, 0, 3).Weave() to reinterlace
    Why do you use interlaced=true here when the input is progressive?
    Or are you saying you do the ConvertToYV12 after the AssumeBFF....Weave?
    Quote Quote  
  13. Member 2Bdecided's Avatar
    Join Date
    Nov 2007
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Also, don't use DV for a 60p intermediate, it's not a supported format.
    No, not officially, and the result isn't standard DV. But certainly within a PC environment, using Cedocida, VLC, etc, it works fine. It has the advantage of being fast, free, watchable in real-time, and not too lossy. Is has the disadvantage of being lossy, and slightly confusing if you forget what it is and subsequently try to print it to tape!

    Cheers,
    David.
    Quote Quote  
  14. Originally Posted by Gavino View Post
    Originally Posted by poisondeathray View Post
    3) ConverttoYV12(interlaced=true) and AssumeBFF().SeparateFields().SelectEvery(4, 0, 3).Weave() to reinterlace
    Why do you use interlaced=true here when the input is progressive?
    Or are you saying you do the ConvertToYV12 after the AssumeBFF....Weave?

    My mistake, nice catch (again)

    I'll edit the post above
    Quote Quote  
  15. Originally Posted by 2Bdecided View Post
    Originally Posted by poisondeathray View Post
    Also, don't use DV for a 60p intermediate, it's not a supported format.
    No, not officially, and the result isn't standard DV. But certainly within a PC environment, using Cedocida, VLC, etc, it works fine. It has the advantage of being fast, free, watchable in real-time, and not too lossy. Is has the disadvantage of being lossy, and slightly confusing if you forget what it is and subsequently try to print it to tape!
    good to know , I wasn't sure and wanted to rule out potential problems

    But I can reprodcue the block artifacts when trying to re-interlace his video the #2 (the 60p DV version) , and explanations as to why that's happening?
    Quote Quote  
  16. Member 2Bdecided's Avatar
    Join Date
    Nov 2007
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by poisondeathray View Post
    But I can reprodcue the block artifacts when trying to re-interlace his video the #2 (the 60p DV version) , and explanations as to why that's happening?
    The third video has block artefacts. The second video is fine, and when I re-interlace it, it's still fine.

    You've already given brassplyer the most likely answer: his DV codec is at fault, and he should use Cedocida.

    Also, you've already explained that the levels are wrong. It's not just that this clip is blown out because the exposure was set WAY too high in the camera, it's that the highlights hit 255, while the virtualdub processing clips at 235 (due to YV12 > RGB > YV12) conversion - so the process is wiping out another 20 levels at the top of the range.

    i.e. there's more detail in the original DV file (e.g. the pattern on the walls of the building) than is visible in (or recoverable from) the output.

    You need...
    levels(0,1.0,255,2,235,coring=false)
    ...before you feed anything to virtual dub. A perfectionist would probably use smoothlevels instead.

    I'd also use matrix="PC.601" in the conversions (both to RGB and to YV12) in AVIsynth to avoid introducing (more) banding. This would also stop the highlight clipping, even without the levels command - but without the levels command it'll still be "superwhite" on DVD, which isn't desirable - so make both changes.

    Hope this helps.

    Cheers,
    David.
    Quote Quote  
  17. Originally Posted by 2Bdecided View Post
    The third video has block artefacts. The second video is fine, and when I re-interlace it, it's still fine.
    I checked and double checked his 2nd video, both with cedocida and ffdshow, the block artifacts are there when you re-interlace. It's not as bad as his video #3, but if you look closely it's still there in a few frames. They look like little blips or abberations in an otherwise straight line on the edge of tower

    You've already given brassplyer the most likely answer: his DV codec is at fault, and he should use Cedocida.
    Yes , from everything in the other thread, I still think this is the most likely factor

    Also, you've already explained that the levels are wrong. It's not just that this clip is blown out because the exposure was set WAY too high in the camera, it's that the highlights hit 255, while the virtualdub processing clips at 235 (due to YV12 > RGB > YV12) conversion - so the process is wiping out another 20 levels at the top of the range.

    i.e. there's more detail in the original DV file (e.g. the pattern on the walls of the building) than is visible in (or recoverable from) the output.


    You need...
    levels(0,1.0,255,2,235,coring=false)
    ...before you feed anything to virtual dub. A perfectionist would probably use smoothlevels instead.

    I'd also use matrix="PC.601" in the conversions (both to RGB and to YV12) in AVIsynth to avoid introducing (more) banding. This would also stop the highlight clipping, even without the levels command - but without the levels command it'll still be "superwhite" on DVD, which isn't desirable - so make both changes.
    Excellent points, I had forgot about vdub clipping.
    Quote Quote  
  18. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by 2Bdecided View Post
    You need...
    levels(0,1.0,255,2,235,coring=false)
    ...before you feed anything to virtual dub.
    Hi, David.
    Why not levels(0,1.0,255,16,235,coring=false) ?
    Quote Quote  
  19. Member 2Bdecided's Avatar
    Join Date
    Nov 2007
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by Gavino View Post
    Originally Posted by 2Bdecided View Post
    You need...
    levels(0,1.0,255,2,235,coring=false)
    ...before you feed anything to virtual dub.
    Hi, David.
    Why not levels(0,1.0,255,16,235,coring=false) ?
    Well, you can't tell much from this source, but it's common for DV to contain superwhites (like here), but quite uncommon for it to contains blacker-than-blacks. So no need to bring the range below 16 up, because there's nothing there.

    I used 2 instead of 0, because otherwise you map 16 onto 14ish, which is a tiny bit of black clipping. Maybe 1 is a better value. 0 is close enough too TBH!

    Cheers,
    David.
    Quote Quote  
  20. ColorYUV(gain_y=-20)
    Quote Quote  
  21. Member 2Bdecided's Avatar
    Join Date
    Nov 2007
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Originally Posted by 2Bdecided View Post
    The third video has block artefacts. The second video is fine, and when I re-interlace it, it's still fine.
    I checked and double checked his 2nd video, both with cedocida and ffdshow, the block artifacts are there when you re-interlace. It's not as bad as his video #3, but if you look closely it's still there in a few frames. They look like little blips or abberations in an otherwise straight line on the edge of tower
    I can't see them, but then it took me a while to notice the problems in his video 3, so that doesn't prove anything. If you can point to a specific (bobbed) frame number, I might be able to see it (if it's there).

    It could be the two stages of interlacing clashing. If any of the interlacing remains, it only needs a slight vertical shift, to means that when it's re-interlaced it ends up on the wrong field. Hence you get local field-swapping. Having said that, I can't see that there is any deshaking here, so can't see why you'd get anything other than the original fields back again (except TGMC isn't lossless).

    As I can't see it myself, I can't really guess properly!

    Cheers,
    David.
    Quote Quote  
  22. just to be clear, it's video #2 "Original_tempgauss_beta2_fast_settings_DV_DS. avi" the bizarre 60p DV format

    when you re-interlace it , (and just for viewing demonstration purposes, deinterlaced with nnedi2)

    AVISource("Original_tempgauss_beta2_fast_settings_ DV_DS.avi")
    AssumeBFF().SeparateFields().SelectEvery(4, 0, 3).Weave()
    nnedi2(field=2)

    You will see little "blips" , it's subtle and not as bad as video #3 - but they are there . Here is an example from frame#52, and the blips change location #53. They are NOT there when you do it from scratch on the original clip as above using cedocida as the decoder. On closer examination, the blips are there in his #2 to begin with, it's not a direct result of the re-interlacing. So i still suspect his decoder/encoder is faulty, and each stage he uses it, more errors accrue. Everything in his initial thread pointed to that as well.
    Image Attached Thumbnails Click image for larger version

Name:	52.png
Views:	112
Size:	433.2 KB
ID:	1833  

    Last edited by poisondeathray; 14th May 2010 at 13:34.
    Quote Quote  
  23. Member 2Bdecided's Avatar
    Join Date
    Nov 2007
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Here is an example from frame#52, and the blips change location #53.
    Thanks for the frame grab - I confirm I'm seeing the same thing here.

    They are NOT there when you do it from scratch on the original clip as above using cedocida as the decoder.
    Ditto.

    On closer examination, the blips are there in his #2 to begin with, it's not a direct result of the re-interlacing. So i still suspect his decoder/encoder is faulty, and each stage he uses it, more errors accrue. Everything in his initial thread pointed to that as well.
    Well he should follow the copious good advice he's received in this forum then!

    I've seen at least one thread over at doom9 (years ago) when someone faced exactly the same problem. They couldn't believe that a "professional" encoder could give a faulty output, while a "free" one would be perfect, but that's what happens.

    Cheers,
    David.
    Quote Quote  



Similar Threads

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