PDA

View Full Version : To interlace or deinterlace?


doctorjellybean
12th September 2009, 17:01
I'm creating a DVD for a friend of mine's family and friends. The contents is made up of photos and footage shot with my camcorder. The camcorder uses a DVD disc for recording, and I have to finalize the disc and transfer the contents to my PC for editing. I use Sony Vegas Pro 9 for editing and creating the video files, and Sony DVD Architect Pro 5.0 for creating the DVD discs. As I'm in the UK, we use the PAL system for our TV's and DVD players.

My problem with some of the video footage is that it is very interlaced when playing the DVD back on the TV (well, I think that is what it is). The first screenshot is of a frame taken from Windows Media Centre. I get exactly the same result when playing it on my TV through my DVD player.

http://i25.tinypic.com/muauo.jpg

You can see the ragged lines near the top.

However, if I play the same DVD on my PC using a different media player, e.g. Media Player Classic or even Windows Media Player, I get a different result as per the screenshot below

http://i25.tinypic.com/vshs42.jpg

There is a fairly big difference.

So now I would like to know how to create a DVD, that when played back on a TV from a DVD player, that the output will look like the last screenshot and not the first. I found this page, but that makes things more confusing LOL.

http://www.100fps.com/

Thanks in advance.

Inspector.Gadget
12th September 2009, 17:24
Post a video sample. You can cut VOB files to M2V files with DGIndex.

doctorjellybean
12th September 2009, 18:43
I've uploaded 2 samples, both are part of the same DVD.

www.doctorbean.adsl24.co.uk/VTS_02_2.demuxed.m2v

www.doctorbean.adsl24.co.uk/VTS_02_3.demuxed.m2v

Many thanks!

LoRd_MuldeR
12th September 2009, 19:00
Something is entirely wrong with your sample:

It's not just interlaced. Looks more like somebody resized an interlaced video without deinterlacing it first!

If you separate/stack the fields, you will see that the combing (actually resized/distorted combing!) is present inside the individual fields.

http://img90.imageshack.us/img90/2331/borked.th.jpg (http://img90.imageshack.us/img90/2331/borked.jpg)

I fear there is no way to restore content that has been destroyed that way...

doctorjellybean
12th September 2009, 19:06
Something is entirely wrong with your sample. It's not just interlaced. Looks more like somebody resized an interlaced video without deinterlacing it first!

If you separate/stack the fields, you will see that the combing is inside the individual fields. I fear there is no way to restore content that has been destroyed that way...

I still have the original footage. Yes, I did resize/crop the footage to get rid of a small black bar at the bottom.

Right, so I have to start from scratch? From what I gather from your reply, I have to deinterlace the footage before editing/resizing, and then interlace the final output? Could you please advise me what I need to do, as I'm really a newbie when it comes to this. Oh, and what tools are best for the job?

Many thanks in advance!

LoRd_MuldeR
12th September 2009, 19:10
Please post an unprocessed(!) sample of your original footage!

And yes, if you resized interlaced video without deinterlacing it properly first, you can throw away your result and start from the scratch...

doctorjellybean
12th September 2009, 19:34
I've uploaded the original, unprocessed footage of the same samples as in my second post (in the same order)

www.doctorbean.adsl24.co.uk/VTS_04_1.demuxed.m2v

www.doctorbean.adsl24.co.uk/VTS_13_1.demuxed.m2v

Thanks once again!

thewebchat
12th September 2009, 19:47
In your footage, you can crop the sides safely before deinterlacing and you can crop the top by 4px (always crop YV12 interlaced by 4 at a time). After you bob deinterlace it, you can resize it to your desired size. After resizing, you can then separate the fields and do a Weave(SelectEvery(4,0,3)) or similar to convert back to interlaced. Note that using bob deinterlacing instead of half-rate deinterlacing is important if you want an interlaced result.

For example, I did this:

MPEG2Source("lol_pal_crap.d2v")
Crop(8,4,-2,0)
TDeint(mode=1,edeint=nnedi2(field=-2))
Spline36Resize(720,576)
SeparateFields()
SelectEvery(4,0,3)
Weave()

doctorjellybean
13th September 2009, 04:13
Thanks!

Which tools are good for this? I had a look at Avidemux, and there are more than one on the Interlacing tab.

Inspector.Gadget
13th September 2009, 05:54
You should use Avisynth because it has the most flexibility via plugins. BTW, thewebchat's script will give you interlaced output; if you'd like progressive output, you can do something as simple as


MPEG2Source("lol_pal_crap.d2v")
Yadif()

manono
13th September 2009, 11:12
Although plain deinterlacing it is easier to accomplish, if you want to maintain the original fluidity of motion, deinterlace by bobbing it, filter it, and then reinterlace it, following thewebchat's script. Be careful to keep the field order in the process.

doctorjellybean
13th September 2009, 11:35
Many thanks manono!

As I'm a total newbie to this, i.e. have never done deinterlacing/interlacing before, how do I create this script, and using which Avisynth plugins? I take it once I have deinterlaced it, I can then resize, etc before reinterlacing it? Apologies if I'm asking the obvious, but like I said I'm new to this.

Many thanks.

LoRd_MuldeR
13th September 2009, 12:22
Thanks!

Which tools are good for this? I had a look at Avidemux, and there are more than one on the Interlacing tab.

I'd recommend to give Yadif or TDeint a try. Both are available in Avidemux :)

As I'm a total newbie to this, i.e. have never done deinterlacing/interlacing before, how do I create this script, and using which Avisynth plugins?

New to AviSynth - start here (http://avisynth.org/mediawiki/Main_Page#New_to_AviSynth_-_start_here) ;)

For Avisynth usage question, have a look at this sub-forum:
http://forum.doom9.org/forumdisplay.php?f=33

I take it once I have deinterlaced it, I can then resize, etc before reinterlacing it?

Yes. But the real question is: Why re-interlace? If you are going to watch it on a PC screen or LCD/Plasma TV, it will need to be deinterlaced anyway!

So if you re-interlace, your workflow actually would be:
Decode -> Deinterlace -> Crop&Resize -> Re-Interlace -> Re-Encode and later Decode -> Deinterlace -> Watch :eek:

Therefore I would either deinterlace/bob it and keep it that way (progressive) -or- I wouldn't deinterlace/resize at all and simply keep the source as-is (interlaced).

Note that on a television screen the "black borders" of the original source won't show up anyway, due to Overscan!

doctorjellybean
13th September 2009, 12:54
Thanks :)

I might just leave the original footage as is if that is the case.

creamyhorror
13th September 2009, 19:46
Avisynth is of course powerful, but doesn't Vegas have a deinterlacing option when you import videos into it? You could use that instead of Avisynth if you're not that picky about quality.

LoRd_MuldeR
13th September 2009, 20:15
Anyway, on a Video-DVD you can only have either 25/29.97 frames per second (progressive) or 50/59.94 fields per second (interlaced).

So if my source already is interlaced and my target is a Video-DVD, I would always keep it interlaced instead of deinterlacing and loosing half of the temporal resolution ;)

doctorjellybean
13th September 2009, 20:23
Note that on a television screen the "black borders" of the original source won't show up anyway, due to Overscan!

I was only going to deinterlace it as I thought I needed to resize the footage due to the black borders on the original source. Of course, there are no black borders due to the overscan (I didn't know that until you said that and I played the original disc).

Just goes to show, never too old to learn :)

LoRd_MuldeR
13th September 2009, 21:49
Sidenote: If you really need to resize an interlaced video without deinterlacing it, you could do something like this:

SeparateFields().Spline36Resize(w,h).Weave()

Please note that h is only 1/2 of the final height...

Gavino
14th September 2009, 10:21
Since the resize alters the spatial relationship of the two fields, that way will give you inferior (or even worse) results (unless you compensate for this by a sub-pixel shift during the resize).

Jay Bee
14th September 2009, 11:11
It sounds like you're not doing any real editing to the files, just cutting and authoring to DVD. In that case it is best to just leave the files as they are without any reencodeing and use a program like videoredo for the cutting.

That way you have no change in quality, no time wasting reencoding and the result will be perfect on both PC and TV based systems.

Ghitulescu
14th September 2009, 11:47
It sounds like you're not doing any real editing to the files, cutting and authoring to DVD. In that case it is best to just leave the files as they are without any reencodeing and use a program like videoredo for the cutting.

That way you have no change in quality, no time wasting reencoding and the result will be perfect ob both PC and TV based systems.

I fully agree with Jay Bee.
That black border cannot be seen on any normal TV due to overscan. If you cut it out and resize the footage, not only that you adeversely affect the quality but also loose from the visible image :) You do nothing but degrade the quality.
Secondly, the real problem you have to face is the interlacing of static images as you said you'll put also some pictures in between. Some programs are better than others so you might consider, should Vegas be not that good in this, loading the pictures into picture handling softwares to have it cut/resized to 768x576 (PAR=1), stretched to 720x576 (PAR=59:54 or 12:11), then transformed into a small uncompressed AVI with eg Avisynth/vdub that is imported in Vegas.