PDA

View Full Version : Help Deinterlacing (sample provided)


futurex
23rd May 2006, 07:15
Hi,

i am trying to deinterlace a video captured from dvb (25fps) and encode to x264. everything i try seems to end up in some jerky motion throughout the video, and i'm inclined to think its not normal since it happens only every few seconds. when i BOB to 50fps, it seems to turn out fine and motion is very smooth.

i have tried both tdeint and mvbob, like so

mpeg2source("c:\video.d2v")
tdeint(mode=0,order=1)

and mpeg2source("c:\video.d2v")
mvbob()
selecteven()

i also tried selectodd() for mvbob

nothing seems to be helping, i have a 3 second sample below i hope someone can look at and show me how to get this to 25fps with consistent motion :)

sample: http://rapidshare.de/files/21153874/sample_clip.m2v.html

thankyou! :thanks:

Revgen
23rd May 2006, 07:40
Try this:

mpeg2source("c:\video.d2v")
mvbob()
mvconv(25000,1000)

mvconv should already be included with MVBob.

futurex
23rd May 2006, 07:50
thanks for your help revgen, but no improvement :(

futurex
23rd May 2006, 08:13
ok i just tried

mpeg2source("c:\video.d2v")
assumetff
mvbob()
selecteven()

and

mpeg2source("c:\video.d2v")
assumebff
mvbob()
selecteven()

and for some strange reason the BFF has less jerkiness than TFF. BFF has jerkiness in different parts of the video, and a little less severe. i just assumed it was tff since all dvb so far has been for me, and it looked fine when when bobbed (tff)

Revgen
23rd May 2006, 09:12
Okay, I finally looked at the clip. It's a progressive clip that's been hard telecined. You need to use something like Restore24 to return it back to it's original 24fps progressive format.

futurex
23rd May 2006, 10:01
thanks revgen,

i just did some reading up on restore24() and looks like i shouldnt be using it cause its so out of date, (and it gives an error about YV12layer when i load it anyway). but then i read the new version is half broken and doesnt have documentation. this stuff looks way over my head :(

any help with a script please? pretty please?

thanks :)

foxyshadis
23rd May 2006, 11:05
mpeg2source("sample_clip.d2v")
assumebff
tfm()
tdecimate(cycle=25)

Works pretty well. It's not interlaced or field-shifted, but a little of both, so maybe adding a clip2 to tfm taking input from, say, mvbob could help. The conversion to 25 was not clean at all, there's numerous artifacts all over the source, from either deinterlacing or some kind of motion compensation, as well as some ghosting. It might take a bit to get that stuff under control, undot/removegrain could help, restore24 probably won't.

futurex
23rd May 2006, 12:33
but a little of both, so maybe adding a clip2 to tfm taking input from, say, mvbob could help

thanks, but unfortunately that went in one ear and out the other. sorry to be a pain, but as you see i haven't fully grasped avisynth scripting, but am willing to learn. can you provide an example?

where should mvbob come in to the script?

foxyshadis
23rd May 2006, 14:03
That's definitely tff video. (Should have tried first, heh.) mvbob really didn't help. I think your main choice for good quality is get an r1 dvd/recording, since it was probably made from that, or live with all the artifacts. Sorry. =\ r24 might help with some of the ghosting, or mrestore, but I'm not good at getting it to work well.

scharfis_brain
23rd May 2006, 16:31
there is NO fix possible for this video. Even manual pattern deblending did not help.
So delete this video. And get the DVD.

MrTroy
23rd May 2006, 20:23
i just did some reading up on restore24() and looks like i shouldnt be using it cause its so out of date, (and it gives an error about YV12layer when i load it anyway)Maybe your version of Restore24 doesn't support YV12? Have you tried including ConvertToYUY2() before Restore24 in your script?

P.S. I'm not trying to contradict what Sharfis said, I'm just trying to get your Restore24 to work (for future use, maybe).

foxyshadis
24th May 2006, 04:17
YV12Layer is part of Masktools 1.x and requires YV12 input (Definitely don't use YUY2, but may need ConvertToYV12). You have to load the plugins before the scripts if they arent autoloaded.

futurex
24th May 2006, 08:39
thanks everyone :)

guess i'll just have to bob it then, thats when it looks best. i actually have about 20 videos from the same broadcast (much better quality) if i have trouble deinterlacing i'll post another sample

thanks again :)

scharfis_brain
24th May 2006, 14:56
even with bobbling this video looks very jerky.
This is due to the fact, that the standards conversion machine didn't do the fallback to blending when there was a 3:2 Pattern. So the result is a stop-moving - stop-moving stutter now:

original: AA BBB CC DDD EE FFF
after the conversion every transition between different frames (letters) becomes synthesized into another new frame. but there also are states where there are transitions between two identical frames (letters) so there won't be interpolation at all.
So this will end up with a pretty jerky mess.
Delete it. Get the DVD. It will be progressive.

Mshake
2nd July 2006, 12:25
Okay, I finally looked at the clip. It's a progressive clip that's been hard telecined. You need to use something like Restore24 to return it back to it's original 24fps progressive format.

Hi there,
Apologies if i resurface this thread to find out more.

Could you tell me how you confirmed the d2v file as progressive clip that's been hard telecined? The d2v fiile that I got from this thread is:

iDCT_Algorithm=6
YUVRGB_Scale=1
Luminance_Filter=0,0
Clipping=0,0,0,0
Aspect_Ratio=16:9
Picture_Size=720x576
Field_Operation=0
Frame_Rate=25000
Location=0,0,0,568

900 6 0 0 0 0 92 b2 b2 a2 b2 b2 a2 b2 b2 a2
900 6 0 320053 0 0 32 32 92 b2 b2 a2 b2 b2 a2 b2 b2 a2
900 6 0 684826 0 0 32 32 92 b2 b2 a2 b2 b2 a2 b2 b2 a2
900 6 0 1049716 0 0 32 32 92 b2 b2 a2 b2 b2 a2 b2 b2 a2
900 6 0 1406029 0 0 32 32 92 b2 b2 a2 b2 b2 a2 b2 b2 a2
900 6 0 1757657 0 0 32 32 92 b2 b2 a2 b2 b2 a2 b2 b2 a2
900 6 0 2114975 0 0 32 32 92 b2 b2 a2 b2 b2 a2 b2 b2 a2
900 6 0 2474444 0 0 32 32 92 b2 b2 a2 b2 b2 a2 b2 b2 a2 ff

FINISHED 0.00% FILM

This looks like the usual filie that I get from Dvb captures and I have been using mvbob to deinterlace these file and they look good. I thought my captures are pure interlaced source but since you mention this to be hard telecined, can you tell me how you made the conclusions?

scharfis_brain
2nd July 2006, 13:11
1) You CANNOT make conclusions of the actual video content based on the D2V-File

2) it is not hard telecined Film. it is a NTSC-FILM that has been converted the wrong way like I described above.
There is NO way to undo that. Even watching this file on TV must be pure horror, cause it is very jerky.

Mshake
2nd July 2006, 14:09
hmm...

Wanted to ask how you guys can know how to tell the source correctly simply by watching the clip.... but guess all this comes with experience?

Have read neuron2's dgindex's manual especially sections on the parsed2v information and also those ivtc's guides but am still a little confused about the information presented from d2v files.

As I have mentioned, all my current dvb captures are PAL HDTV streams with similar structures as the d2v file above. How do i make concrete conclusions about the type of video content to do what is necessary?

I have only been deinterlacing them using filters presented from you guys which I acknowledge is extremely good!

I passed the clip through vdubmod and scroll frame by frame....it looks every single frame is interlaced and that is why I deinterlace them accordingly... is the way I am going about this wrong?

scharfis_brain
2nd July 2006, 14:32
there are MANY different situations that can cause combing in video.

1) phase shifted progressive video.
2) telecined video
3) fieldblended video
4) real interlacing (from cameras)
5) other crap, like in this thread.

1&2 are restorable to a progressive video using fieldmatchers/decimators like Decomb or TIVTC
3) needs a deinterlacer, prefferrably TDeint() and a Deblender
4) shouldn't be deinterlaced, or if you REALLY need to, take a Deinterlacer like smoothdeinterlacer, tomsmocomp or my securedeint, in order to avoid motion artifacts
5) delete that video. nothing helps.

each video meeds different treament. sometimes per scene. The information how to treat a video cannot me read out by a program or so. You need to see and learn, what to do...

neuron2
2nd July 2006, 14:44
I passed the clip through vdubmod and scroll frame by frame The key to analyzing video is to step through fields, not frames. I've explained it many times here.

foxyshadis
2nd July 2006, 14:55
As an aside, you should separate fields (or dumb bob) on a moving scene to quickly visually differentiate the first 4. (#2 is always pretty obvious though.)

If the fields match (only moving every other field):
if every frame is combed, it's #1. If some are, some aren't in a pattern, #2. Same solution except #2 gets decimated.
If fields don't match:
and each field has blending, #3 (thus the name). If they're clean it's #4.

You can't eyeball for hybrid video though, which you have to be careful of.

Mshake
2nd July 2006, 15:56
sorry i used the wrong term...yes i did separatefields() and scroll thru them individually... apologies... yes neuron2 did read your posts in lots of these pages....and your homepages as well....super resource centre...:)
but most guides are okay for noobies like me to read./try to understand although some need special care and attention and further researching....
hope i am getting there...

"you need to see and learn" ---> think this is main key...:(

scharfis_brain
2nd July 2006, 16:14
I can even tell what kind of video I got with separating fields.
It sometimes is easier that way for me to look at the weaved fields.