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
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 1 to 24 of 24
Thread
-
Last edited by brassplyer; 13th May 2010 at 18:47.
-
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 -
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.
-
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
I'd also be concerned about the levels if this is for DVD, you're blowing out everywhere
I picked that particular segment because the foreground provided a good look at the artifacts for purposes of this issue. -
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 towerLast edited by poisondeathray; 13th May 2010 at 19:43.
-
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.
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
Thanks. -
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?Last edited by poisondeathray; 14th May 2010 at 08:01.
-
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.
-
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 -
-
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.
-
-
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. -
-
-
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. -
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.
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. -
-
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. -
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. -
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.Last edited by poisondeathray; 14th May 2010 at 13:34.
-
brassplayer has had this problem before:
https://forum.videohelp.com/threads/315249-Problem-w-artifacts-using-Thalen-DeShaker-in-Virtualdub
I decided it was his DV decoder. -
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.
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.
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.
Similar Threads
-
Dazzle DVC100 Interlacing Problems
By Imatk in forum CapturingReplies: 1Last Post: 25th Jul 2011, 18:25 -
Bad video with interlacing problems... can be restored?
By elmuz in forum Newbie / General discussionsReplies: 7Last Post: 22nd Sep 2010, 11:25 -
De-interlacing & Encoding problems.
By rossfcp in forum MacReplies: 1Last Post: 29th Aug 2009, 21:32 -
Interlacing a progressive video
By loekverhees in forum Newbie / General discussionsReplies: 41Last Post: 19th Aug 2009, 07:51 -
Good Video Explaining Interlacing and De-Interlacing
By Soopafresh in forum Newbie / General discussionsReplies: 3Last Post: 14th Aug 2008, 19:50