View Full Version : Re-de-interlace bad de-interlaced video (HD to SD in analog) ?
Music Fan
20th December 2010, 12:41
Hi,
I copy sometimes TV shows or movies on the hard disk of my HD decoder, but as we can't transfer its content to a pc or an external HDD, we have to copy it by analogue ouptut.
I use a peritel/S-video adaptator and I enter the S-video signal in my analogue acquisition card in my pc. I record in mpeg-2.
The problem is that when I do it with HD programs, my decoder has to convert HD to SD in real time and it doesn't look very well done.
Here is a capture of my avisynth's script made with Virtual Dub (this is anamorphic 16/9) exported in bmp and compressed in jpeg by Photoshop ;
http://img63.imageshack.us/img63/5899/deint0.jpg
We see well the problem on the channel's logo and a little bit on the chairs and the red couch.
This is a movie (progressive source), but of course, all channels send interlaced signals.
I haven't de-interlaced it, Virtual Dub made a simple 2:2 pulldown -progressive preview field mode- (I'm in 50 hz zone, so I don't need to do IVTC because of the Pal speed-up).
And even when i de-interlace this video, the result is the same.
That's why I believe that my decoder can't de-interlace properly.
I have the same problem with HD interlaced programs (it's probably even more difficult for the decoder to transform real 1080i sources in 576i than movies).
To resize the 1080i signal in 576i, I guess that the decoder has to deinterlace, then resize, and then re-interlace the video for the peritel output.
So my question is : what can I do to "re-de-interlace" properly the video with avisynth ?
In this case, it's a progressive source, but I also would like to do it with interlaced programs keeping the interlacing (I don't resize it).
Thanks for your help ;)
Ghitulescu
20th December 2010, 12:57
Most if not all HDD-recorders have their system reverse-engineered, so one takes the HDD out and copy its content on a PC. Are you sure yours is not?
Music Fan
20th December 2010, 13:01
Yes, it's forbidden by the firmware. The content is crypted. I already called my operator for that problem and they don't know if they will allow copy one day.:rolleyes:
Mounir
20th December 2010, 13:36
First you need to use DGAVCIndex.exe create a .dga of your .ts (i suppose it's .ts)
Then in avisynth you could use QTGMC (http://forum.doom9.org/showthread.php?t=156028) maybe , i like this deinterlacer.But if everything is crypted i don't know man
AVCSource("MyVideo.dga")
QTGMC( Preset="Slow" )
SelectEven() # To keep 25fps (otherwise 50fps)
Ghitulescu
20th December 2010, 13:45
Yes, it's forbidden by the firmware. The content is crypted. I already called my operator for that problem and they don't know if they will allow copy one day.:rolleyes:
It's like asking Fox or Sony to release blu-rays without any copy-protections. Of course they're "unsure" (:)) whether they'll ever release blu-rays with no copy-protections.
2Bdecided
20th December 2010, 14:45
It's like asking Fox or Sony to release blu-rays without any copy-protections. Of course they're "unsure" (:)) whether they'll ever release blu-rays with no copy-protections.Not quite - some networks are already changing the "Copy Never" flag to "Copy Once" for non-premium content, for the exact purpose of allowing people to create a BluRay or DVD-RAM back-up.
Of course, for encrypted content, they're not going to give you the decryption keys, or release it at full quality into a unprotected domain.
Cheers,
David.
2Bdecided
20th December 2010, 14:52
That's why I believe that my decoder can't de-interlace properly.
I have the same problem with HD interlaced programs (it's probably even more difficult for the decoder to transform real 1080i sources in 576i than movies).Actually, it's trivial.
To make it look wrong, it's either doing separate field resizing (badly), or allowing lots of aliasing through, or both.
You're going to have to provide a clip to know which.
If there's aliasing, this trick from Didée can help...
http://forum.doom9.org/showthread.php?p=1360219#post1360219
Cheers,
David.
Ghitulescu
20th December 2010, 14:55
What I mean is that the most proprietary boxes, from Humax, Topfield or Grundig to name a few, have their OS already reverse engineered, so using a complementary (hacker :)) software one can read the content of the HDD (after demounting it from the box). AFAIK, the only exception is the HD+ platform, that stores the content undecrypted on the HDD, but this is quite new.
Bottomline, if one can see the content (with the subscription card taken out from the STB) and such software exists, then it would be better to extract the content using this method. Copy once and Copy never and Macrovision and and and and, would hinder the copying exactly the same way the copy bit on a CD-DA hinders the copying using EAC or similar ;) :), or the CPRM bit the extraction of the VRO file from a DVD-RAM. And so on.
2Bdecided
20th December 2010, 16:43
Bottomline, if one can see the content (with the subscription card taken out from the STB) and such software exists, then it would be better to extract the content using this method.Well yes, of course. But if it still plays without the CA card then it was probably broadcast FTA or decrypted via a CAM. These both offer capture options which don't involve a STB at all.
HD+ uses "proper" encryption, like Pay-TV. Don't expect to be reading those programmes off the HDD any time soon.
FWIW there are services in the UK where STBs sold under the trademark (Freesat and Freeview) read flags in the stream which tell the recorder to encrypt the free-to-air content when writing it to the HDD. So a standard FTA DVB-T2 or DVB-S2 card can be used to capture this content in-the-clear, but if you record it onto the STB/PVR's HDD, you're stuffed.
Cheers,
David.
Ghitulescu
20th December 2010, 17:20
Sorry, but what the OP wants to do is a bit silly. Instead of doing a lot of work and recodings, passing also through the analogue domain, this not to mention the downscaling from HD to SD, I would (but that's only me) search for a method to save these recordings already decrypted on an accessible HDD. Like an open STB with a CAM that can accommodate the subscriber card. Should this be not possible, then I'll drop the whole thing, buying the BD of it costs me 10€, which BD additionally has a better audio and bears no logo (the issue of subtitles depends on many factors). Consider the DVD for SD content too. I had a subscription at then Premiere now Sky which included 13eme Rue as well (but in SD, no HD were available that time, not even the Euro1080) and I was not really convinced about the image quality vs DVD. Besides, most proprietary boxes in Germany and I heard that for other countries as well are generally low quality, cheap STBs, whose FW updates focus more on enforcing the copyright than providing a good A/V quality or enhancing it.
Music Fan
20th December 2010, 17:27
First you need to use DGAVCIndex.exe create a .dga of your .ts (i suppose it's .ts)
Then in avisynth you could use QTGMC (http://forum.doom9.org/showthread.php?t=156028) maybe , i like this deinterlacer.But if everything is crypted i don't know man
AVCSource("MyVideo.dga")
QTGMC( Preset="Slow" )
SelectEven() # To keep 25fps (otherwise 50fps)
Thanks.
It's not TS, it's a mpeg file (.mpg extension) recorded on my pc by my Hauppauge card (which converts the analog signal in digital).
So I use DGindex (mpeg2source) to open it.
To de-interlace, I generally use tdeint but I'm not a huge connoisseur.
Music Fan
20th December 2010, 17:35
Actually, it's trivial.
To make it look wrong, it's either doing separate field resizing (badly), or allowing lots of aliasing through, or both.
You're going to have to provide a clip to know which.
If there's aliasing, this trick from Didée can help...
http://forum.doom9.org/showthread.php?p=1360219#post1360219
Cheers,
David.
Thanks ! Actually it's look like aliasing.
I don't understand well this trick.
What is the part of this script useful to remove the aliasing ?
Do I have to install a filter ?
Does it work on interlaced videos ? Because I also record tv-shows (interlaced) and I like to keep it interlaced.
Anyway, I can de-interlace to 50 fps, remove the aliasing and re-interlace it in 50i. That's what I do when i resize an interlaced video (no choice if I wanna avoid blending when resizing interlaced video).
But as I don't generally need to resize my videos, I'd like to avoid a de-interlacing in 50p followed by a re-interlacing in 50i if it's just to remove aliasing and not resizing the video.
Music Fan
20th December 2010, 17:50
I would (but that's only me) search for a method to save these recordings already decrypted on an accessible HDD. Like an open STB with a CAM that can accommodate the subscriber card. Should this be not possible, then I'll drop the whole thing, buying the BD of it costs me 10€, which BD additionally has a better audio and bears no logo (the issue of subtitles depends on many factors). Consider the DVD for SD content too.
The content of the HDD is crypted and I read on a forum that it's formated in a proprietary format that my pc couldn't recognize.
About the dvd : I buy movies, I don't copy it from TV. But that's a short film which doesn't exist in dvd.
And I record especially tv-shows that will never be edited in dvd.
Actually, there's another solution, but it's expensive : to buy a Dreambox compatible with the activation card I received with my decoder. But I don't have money for that.
I'm not going to try to open my decoder because it's not mine, I rent it to my operator (we didn't have choice, they don't sell it and we can't rent only the card and choose our decoder).
If I have a technical problem with it, my operator will change it, except if he sees that I opened it, and he will see it because there's a kind of protective tape in the box that breaks when we open it.:o
Thus, for now, I'm gonna continue to record with this method. Boring but I have no choice.
Ghitulescu
20th December 2010, 18:00
What STB is that?
2Bdecided
20th December 2010, 18:09
Thanks ! Actually it's look like aliasing.
I don't understand well this trick.
What is the part of this script useful to remove the aliasing ?all of it.
Do I have to install a filter ?Yes, I think it needs EEDI2 or NNEDI2 (for the two different scripts in that link) and probably mask tools (not sure which version, but it's working with 2.0.36.0 here I think).
Does it work on interlaced videos ?Not as-is, no. I'm not sure how best to deal with that - If you post a sample, maybe someone will have some good ideas - because at the moment, no one has seen what it's doing to interlaced videos except for you ;)
Cheers,
David.
Music Fan
20th December 2010, 18:22
What STB is that?
What means STB ?
I guess you are talking about the operator. It's VOO and the decoder is called VOOcorder and is actually a Cisco 8485 DVB.
edit : set-top box, I didn't know this english name.:o
Music Fan
20th December 2010, 18:31
all of it.
Yes, I think it needs EEDI2 or NNEDI2 (for the two different scripts in that link) and probably mask tools (not sure which version, but it's working with 2.0.36.0 here I think).
Ok, I copy here the second ;
o = last
o.NNEDI2(field=-2)
dbl = Merge(SelectEven(),SelectOdd())
dblD = mt_MakeDiff(o,dbl,U=3,V=3)
shrpD = mt_MakeDiff(dbl,dbl.RemoveGrain(11),U=3,V=3)
DD = shrpD.Repair(dblD,13)
dbl.mt_AddDiff(DD,U=3,V=3)
It doesn't look simple. Every time I tried external filters (RemoveGrain among others), it didn't work.:o
I usually make simple scripts.
So I guess that I have to install RemoveGrain and NNEDI2 v1.6 ;
http://forum.doom9.org/showthread.php?t=147695
jmac698
21st December 2010, 01:01
I have a much better idea - try recording it in analog HD. Guess what, you can (probably) do this with your existing capture card. Here's how to test: set your box to output 576p, and record as usual. The color will be gone, and you will see two copies of each frame side-by-side. It's easily possible to unscramble this picture to read the two progressive frames. The point of this is that it avoids interlacing by the box entirely. The bad side is it takes a bit of work to go through the process. However it's not complicated. Anyhow, if some script can fix the quality to your liking that is still an option, however I would find it interesting if someone else finds a use for this technique I've invented.
There is a further refinement of my technique that lets you record component video with your existing capture card, but that is more tedious.
Music Fan
21st December 2010, 09:36
Interesting, but I believe that whatever the resolution chosen, the decoder always send 576i on its peritel output.
Ghitulescu
21st December 2010, 11:08
I think I've read about some STBs that could have a sort of a switch that forced the SCART to send YPbPr also in HD, to drive eg the HD projectors. My Humax iCord HD has one. Of course, one needs SCART->YPP cables but these are common I think. I never used this option, other people do (there are interconnectivity issues between Samsung/Philips TVs and iCord, problems solved by passing through HD analog).
On the opposite side, one should have an HD capturing card.
Music Fan
21st December 2010, 11:26
I believe there's no switch. And if I buy anything to record it in HD, it would be a Dreambox (or something like that).
Anyway, I have hundreds of Go of videos already recorded on my pc with this method and erased of my VOOcorder, so I though need advice to encode properly these videos. I encode with MeGui in x264.
Music Fan
21st December 2010, 11:38
Yes, I think it needs EEDI2 or NNEDI2 (for the two different scripts in that link) and probably mask tools (not sure which version, but it's working with 2.0.36.0 here I think).
I tried it, and as usual when I try filters, it didn't work.:rolleyes:
o = last
o.NNEDI2(field=-2)
dbl = Merge(SelectEven(),SelectOdd())
dblD = mt_MakeDiff(o,dbl,U=3,V=3)
shrpD = mt_MakeDiff(dbl,dbl.RemoveGrain(11),U=3,V=3)
DD = shrpD.Repair(dblD,13)
dbl.mt_AddDiff(DD,U=3,V=3)
The 0 (zero) in the dblD line is not recognized.
In the plugin folder, I added these dll : RemoveGrain, masktools and nnedi2. And of course I loaded these plugins in my script.
What did I forgot ?
Do you know exactly what dll one has to install and load, and what versions ?
jmac698
21st December 2010, 11:46
Interesting, I'm in NTSC land and here, the common outputs on most devices are composite (1 RCA jack coloured yellow) and component (3 round RCA jacks coloured red, green, and blue). The component will output analog HD via a setting in the menu. More expensive units (DVD player, settop box) also have HDMI if they are HD or upconverting. Svideo has been disappearing.
Anyhow, your STB don't have *any* analog HD output? That's very unusual here.
Finally we have firewire output which is unencrypted, it's a law from FCC which is a US agency for consumer items. As a result of boxes being manufactured universally, Canada also receives this "feature".
Ghitulescu
21st December 2010, 11:53
... I though need advice to encode properly these videos. I encode with MeGui in x264.
I can't now give you any advice, I tried to help you find a way of digitally transferring them to your PC. Apparently there's none (at the moment).
Interesting, I'm in NTSC land and here, the common outputs on most devices are composite (1 RCA jack coloured yellow) and component (3 round RCA jacks coloured red, green, and blue). The component will output analog HD via a setting in the menu. More expensive units (DVD player, settop box) also have HDMI if they are HD or upconverting. Svideo has been disappearing.
Anyhow, your STB don't have *any* analog HD output? That's very unusual here.
Finally we have firewire output which is unencrypted, it's a law from FCC which is a US agency for consumer items. As a result of boxes being manufactured universally, Canada also receives this "feature".
This would be very usual after 2012, when, according to the Mayan calender, an era would come to an end, the analogue era. After 2012, all the equipment is required not to have any analogue outputs at all.
And FW is not encrypted as well, but it still bears a sort of SCMS (so one cannot copy the recordings using eg a DV/HDV camcorder).
Music Fan
21st December 2010, 11:53
your STB don't have *any* analog HD output? That's very unusual here.
No, to have it is very unusual here.:rolleyes:
Here is the VOOcorder ;
http://www.bemobile.be/wp-content/uploads/2009/05/voocorder.jpg
http://www.speed.be/voo/voocorder.jpg
Explanations in french ;
http://www.le-homecinema.com/forum/img/1268139617VOOcorder.jpg
Music Fan
21st December 2010, 11:59
I tried to help you find a way of digitally transferring them to your PC.
I know, and I thank you for that.;)
I found an interesting information on a belgian forum : a guy connected the hard drive to his pc, made an image of this before to reformat it because it made a lot of noise, he erased the HDD and copied the image on it (with Acronis) but he didn't say what was the format of the HDD and if he could copy files.
I'm waiting for his response.
This would be very usual after 2012, when, according to the Mayan calender, an era would come to an end, the analogue era.
:D
Didée
21st December 2010, 12:36
The 0 (zero) in the dblD line is not recognized.
There is not one single instance of "0" (number) in that script. All there is is the (letter) "o".
jmac698
21st December 2010, 13:04
http://www.broadstripe.com/pdf/UserGuides/Motorola%20DCT6400%20User%20Guide.pdf
See page 10 and 16. This is usual STB for US. SCART seems pretty good for an SD system, more advanced than what we have, but you completely skipped analog HD. Anyhow, my technique should also record RGB with any composite capture card! There is a menu on PS2 for RGB or YPbPr through SCART, I've read. I do see a mention of switches. None of this gives you HD.
I can't help your problem at all, though :(
I have one more idea - does this problem still occur when PAUSE ? If not, you could slow-play...
2Bdecided
21st December 2010, 13:30
Anyhow, your STB don't have *any* analog HD output? That's very unusual here.It's absolutely standard throughout the whole of Europe. USA got HDTVs before HDMI, Europe mostly didn't. So you need analogue HD for your old TVs, but we don't.
Some first generation STBs have analogue HD component outputs (for those few people with early HDTVs), but current STBs have no analogue HD outputs. The rights holders demand that HD is only output with HDCP, and few users need analogue HD, so it's dead.
Even most UK free-to-air HD STBs don't have analogue HD outputs.
Cheers,
David.
2Bdecided
21st December 2010, 13:33
I tried it, and as usual when I try filters, it didn't work.:rolleyes:What did you do? How did you use it?
You need to add a source at the top before giving it to VirtualDub to check it or MeGUI to encode it. mpeg2source("blah.d2v") or whatever. Assuming MPEG-2 source...
http://neuron2.net/dgmpgdec/dgmpgdec.html
http://neuron2.net/dgmpgdec/QuickStart.html
Cheers,
David.
Music Fan
21st December 2010, 13:59
There is not one single instance of "0" (number) in that script. All there is is the (letter) "o".
Ok, but the problem is the same.
Didée
21st December 2010, 14:00
:script:
Music Fan
21st December 2010, 14:05
What did you do? How did you use it?
You need to add a source at the top before giving it to VirtualDub to check it or MeGUI to encode it. mpeg2source("blah.d2v") or whatever. Assuming MPEG-2 source...
http://neuron2.net/dgmpgdec/dgmpgdec.html
http://neuron2.net/dgmpgdec/QuickStart.html
Cheers,
David.
Of course, I'm not so stupid. As I said above, I use DGindex, and I added the script of Didée after.
Here is the script, I probably forgot a dll ;
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\nnedi2.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mt_masktools-25.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mt_masktools-26.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\RemoveGrain.dll")
Mpeg2Source("L:\Videos L\my video.d2v")
ConvertToYV12()
NNEDI2(field=-2)
dbl = Merge(SelectEven(),SelectOdd())
dblD = mt_MakeDiff(o,dbl,U=3,V=3)
shrpD = mt_MakeDiff(dbl,dbl.RemoveGrain(11),U=3,V=3)
DD = shrpD.Repair(dblD,13)
dbl.mt_AddDiff(DD,U=3,V=3)
Didée
21st December 2010, 14:26
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\nnedi2.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mt_masktools-25.dll")
# LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mt_masktools-26.dll") # "-25" is for Avisynth 2.5.x, "-26" for Avisynth 2.6.
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\RemoveGrain.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Repair.dll")
Mpeg2Source("L:\Videos L\my video.d2v")
ConvertToYV12()
o = last
NNEDI2(field=-2)
dbl = Merge(SelectEven(),SelectOdd())
dblD = mt_MakeDiff(o,dbl,U=3,V=3)
shrpD = mt_MakeDiff(dbl,dbl.RemoveGrain(11),U=3,V=3)
DD = shrpD.Repair(dblD,13)
dbl.mt_AddDiff(DD,U=3,V=3)
Ghitulescu
21st December 2010, 14:30
Here is the VOOcorder ;
http://www.bemobile.be/wp-content/uploads/2009/05/voocorder.jpg
http://www.speed.be/voo/voocorder.jpg
It looks a bit different than this one -> http://www.cisco.com/web/consumer/pdf/aag_8485DVB.pdf
No test port but a second SCART and an antenna out.
Music Fan
21st December 2010, 15:18
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\nnedi2.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mt_masktools-25.dll")
# LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mt_masktools-26.dll") # "-25" is for Avisynth 2.5.x, "-26" for Avisynth 2.6.
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\RemoveGrain.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Repair.dll")
Mpeg2Source("L:\Videos L\my video.d2v")
ConvertToYV12()
o = last
NNEDI2(field=-2)
dbl = Merge(SelectEven(),SelectOdd())
dblD = mt_MakeDiff(o,dbl,U=3,V=3)
shrpD = mt_MakeDiff(dbl,dbl.RemoveGrain(11),U=3,V=3)
DD = shrpD.Repair(dblD,13)
dbl.mt_AddDiff(DD,U=3,V=3)
Thanks, it works now ;)
The logo is still aliased but everything else is really better.
For interlaced videos that I wanna keep interlaced, what do I have to change in your script ?
Generally, when I resize an interlaced video, I do that ;
tdeint(mode=1)
converttoyuy2()#or YV12
crop(x,x,x,x)
lanczosresize(x,x)
assumetff()
separatefields()
selectevery(4,0,3)
weave()
I don't need to resize always, but as said above, nnedi2 needs progressive video, right ?
Didée
21st December 2010, 15:23
That script is only for progressive material. It's not suited for interlaced content.
Music Fan
21st December 2010, 15:46
Ok, and for progressive videos recorded in mpeg-2 (interlaced), do I have to do a 2:2 pulldown before the nnedi2 operation ? Because my video has 50 fields, even if the source is progressive. Generally, I do nothing and I encode in progressive, which means that the 2:2 pulldown is done by the encoder (I guess).
I didn't do that today, so I guess it's not important.
Anyway, I record 99 times on 100 interlaced programs. What do you advise me to remove aliasing on it ?
Could this script work ?
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\nnedi2.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mt_masktools-25.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\RemoveGrain.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Repair.dll")
Mpeg2Source("L:\Videos L\my video.d2v")#50i
ConvertToYV12()
tdeint(mode=1)#50p
o = last
NNEDI2(field=-2)
dbl = Merge(SelectEven(),SelectOdd())
dblD = mt_MakeDiff(o,dbl,U=3,V=3)
shrpD = mt_MakeDiff(dbl,dbl.RemoveGrain(11),U=3,V=3)
DD = shrpD.Repair(dblD,13)
dbl.mt_AddDiff(DD,U=3,V=3)
assumetff()
separatefields()
selectevery(4,0,3)
weave()#50i
Didée
21st December 2010, 17:37
Could this script work ?
A big waste of time. Interlaced content per definition is aliased. What you're doing there is: have one field missing, do much effort to smoothly recreate the missing field, then throw it away again.
Simply doing nothing yields almost the same result. Just much faster. ;)
Music Fan
21st December 2010, 18:14
Ok, thanks.
But when do we use double rate modes ?
I don't understand very well what means "intra-field only deinterlacer".
And a question about the last case I could meet ; interlaced videos (50i) that I would like to deinterlace and encode in 25p : should I use tdeint() before nnedi2 or it's unuseful ? Like that ;
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\nnedi2.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mt_masktools-25.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\RemoveGrain.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Repair.dll")
Mpeg2Source("L:\Videos L\my video.d2v")#50i
ConvertToYV12()
tdeint()#25p
o = last
NNEDI2(field=-2)
dbl = Merge(SelectEven(),SelectOdd())
dblD = mt_MakeDiff(o,dbl,U=3,V=3)
shrpD = mt_MakeDiff(dbl,dbl.RemoveGrain(11),U=3,V=3)
DD = shrpD.Repair(dblD,13)
dbl.mt_AddDiff(DD,U=3,V=3)
Didée
21st December 2010, 22:00
Phew ... are we to start out with "what is interlacing" and "deinterlacing explained" ? If so, Google has more answers than i could ever write down.
An "intra-only" deinterlacer (or: interpolator) is looking only at one field while guessing how to make a useful reconstruction of the missing other field. It is not considering the temporal neighbors at all.
Opposed to "smart" or "adaptive" deinterlacers, which can use the temporal neighbor frames/fields to reconstruct the current missing field. (However, that "adaptiveness" usually works only on *perfectly static* parts of the image. Which's a feature more seldom than one might suppose.)
The "double rate mode" generally is called "bobbing". This is useful to keep the motion fluidness of the original source (for sports/live events, dance shows, etc.). When true interlacing is deinterlaced to half field rate (50i -> 25p), motion is not as fluid anymore, and usually exhibits an additional motion strobing effect because the originally used shutter time was set up for full fieldrate, not for half framerate.
Given your somewhat unusual way of capturing, - in particular with that blackbox of HD->SD resizing inbetween -, I have no idea what i should recommend to you. Any of the "standard advises" could be right, or could be wrong just as well.
Posting some video samples would give a better idea about what the problems are, and what could (or need to) be done.
Music Fan
21st December 2010, 23:15
Ok, thanks for the explanations, I will probably post a video sample.
But actually, I wanted to know if nnedi2 allowed to de-interlace interlaced sources or if we had to de-interlace it before with tdeint (or any other plugin). As you said that the script above was done for progressive sources, I'm a little bit lost. But I will try the others field modes without the other lines of the script to understand better what does exactly nnedi2.
Writing this, I realize that I probably mixed up two things in my mind about the script given above : the de-interlacing part (done by nnedi2) and the filters used after.
About the bobbing, I knew it, that's why I spoke about the mode 1 of tdeint that I use to keep interlacing after resizing.
So I don't understand why you said my method to keep fluidness was not useful as the double rate modes of nnedi2 also do that ?
Or do you mean that removing aliasing and keeping the fluidness with nnedi2 is only useful if we keep the double rate (50p), without re-interlacing it (in 50i) ?
If yes, I guess that I could use bobbing with nnedi2 in place of tdeint and re-interlace the video when I only need resize without removing aliasing.
edit : ok, I assumed well ; i tried only this line => NNEDI2(field=-2), and I got 50 fps, like mode 1 with tdeint.
The confusion came of the fact that you said the script was done for progressive sources, and I thought (because I read too fast !) that nnedi2 was done for progressive sources, now it's clearer.;)
And what you call "intra-only" deinterlacer, I call it spatial-only deinterlacer (maybe wrongly), that's why I didn't understand immediately.
Didée
21st December 2010, 23:40
Sure, NNEDI is a deinterlacer. It either keeps the top field, throws away the bottom field and interpolates it (or vice versa keeps bottom, interpolates top). That's "single rate" mode. Or it deinterlaces in bob mode, by alternatingly keeping top/bottom, and interpolating bottom/top.
The posted AA script uses the bob mode not for reasons of motion fluidity. It's just a small trick used to build up an average of top-interpolation and bottom-interpolation. And while this is a valid approach for antialiasing of a progressive frame, it doesn't make make much sense to be applied directly to an interlaced frame. In that case, it would just create motion ghosting by averaging two frames from different points-in-time.
The script you posted at last isn't good because you start with tdeint in single-rate mode - after that, motion fluidity is already lost. Then you use the AA script to anti-alias the result of tdeint's deinterlacing (which basically shouldn't be necessary, however in your case it could be a different story). In this process, the one half of NNEDI's interpolation is using already-interpolated scanlines as base data. Which is not valuable at all.
€dit:
what you call "intra-only" deinterlacer, I call it spatial-only deinterlacer (maybe wrongly)
"spatial-only" is good denomination, too. However it wasn't me who started talking "intra-only" - that was you, by (probably?) quoting from NNEDI's readme. :p
Music Fan
21st December 2010, 23:49
Wow wow wow, it makes a lot of interesting and important informations ! I will have to read it several times to well understand.
it wasn't me who started talking "intra-only" - that was you, by (probably?) quoting from NNEDI's readme.
Right.:D
Music Fan
27th December 2010, 10:20
Hi,
here is a very short extract of a tv-show (interlaced) recorded with the method described in the first post.
http://www.filefactory.com/file/b4d8510/n/ex3b.rar
The rar includes mpg, d2v and avs files.
I will mostly keep the interlacing and do nothing with avisynth in this case, but for some of my interlaced sources, I'd like to de-interlace and remove the aliasing.
I don't know how to do that, because the script of Didée work with progressive and not interlaced sources, as it's the case of this extract.
Thanks for your help ;)
Didée
29th December 2010, 22:57
That sample shows pretty much nothing, except the glory of mpeg compression artifacts.
When the task is [interlaced-in]->[interlaced-out], then aliasing generally isn't of concern. Interlaced content *inherently* is aliased.
In case the box is producing unwanted field misalignment during the downsize, I cannot see it in this sample.
Music Fan
30th December 2010, 00:12
Thanks for the download.
I see a difference between my HD to SD recordings and my SD channels recordings. So for me, my decoder add some bad things.
Anyway, I'd like to know how to remove the aliasing (that we see on the lines of the girl's shirt) after having de-interlaced this video.
If you had to do it for you, I guess that you would add something after NNEDI2(field=-1).:p
Didée
30th December 2010, 03:22
I see a difference between my HD to SD recordings and my SD channels recordings. So for me, my decoder add some bad things.
After a closer look at the sample, it seems that all chroma is lagging one field behind.
Regarding the previously assumed field misalignment, such I can't see in this sample. The diagonals at shallow angle seem fine.
Anyway, I'd like to know how to remove the aliasing (that we see on the lines of the girl's shirt) after having de-interlaced this video.
Rephrased: "How do I post-process, after having used a poor deinterlacer?"
The better question would be: "How should I deinterlace, if I wish to?"
http://img191.imageshack.us/img191/3658/deinterlacers.th.png (http://img191.imageshack.us/i/deinterlacers.png/)
mpeg2source("ex3b.d2v")
yad = yadif()
yadm = yadifmod(edeint=nnedi2())
td = tdeint()
tgmc = tempgaussmc_beta2(1,1,1,edimode="nnedi2",Smode=1,sharpness=0.49,SVthin=0.24,Sbb=0, sharp=1) # a little softer than the defaults
tgmc = tgmc.mergechroma(tgmc.selectevery(1,-1)) # reset source's chroma lag
tgmc = tgmc.selecteven() # reduce bobbing to single-rate deinterlacing
top = stackhorizontal( yad.subtitle("Yadif()"), td.subtitle("tdeint()"))
bot = stackhorizontal( yadm.subtitle("yadifmod(edeint=nnedi2())"),tgmc.subtitle("TGMC_b2"))
stackvertical(top,bot)
return(last)
Rule of thumb: the damage you avoid to do ... is the damage you don't need to fix.
Music Fan
31st December 2010, 10:49
Thanks a lot, amazing work !
TMGC look nice.
it seems that all chroma is lagging one field behind.
Regarding the previously assumed field misalignment, such I can't see in this sample. The diagonals at shallow angle seem fine.
What does it mean exactly and how do you see this chroma problem ?
Didée
31st December 2010, 14:10
Just apply a bob deinterlacer - Yadif(mode=1) or a plain bob() - and look closely at the clapping hands. Where hands move, you'll see reddish ghosts in those places where the hands have been one frame before. Shifting the chroma planes one field into the future apparently fixes the issue.
However, it would be good to examine a few more captures, in particular progressive content, before drawing final conclusions.
Edit:
Uh, I myself should've looked more close. Chroma is not just a simply lagging by one field. In fact, it's a combination of one-field-lag PLUS swapped chroma fields.
o = mpeg2source("ex3b.d2v")
bob1 = o.bob(0,0.5) .crop(0,80,0,0) # crop is only for preview in Vdub (1920x1200 screen is too small)
bob2 = bob1.mergechroma(bob1.selectevery(1,-1).selectevery(2,1,0).selectevery(1,1)) # shift 1 field back, swap phases, shif 1 field forward again
stackhorizontal(bob1.addborders(0,0,8,0,color=$008000).subtitle("source, bobbed"),bob2.subtitle("source, bobbed, chroma fixed"))
stackvertical(stackhorizontal(bob1.UtoY().subtitle("U chroma channel").addborders(0,0,4,0,color=$008000),
\ bob2.UtoY().subtitle("U chroma channel")).lanczosresize(last.width,bob1.height) )
return(last)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.