PDA

View Full Version : How to de-interlace badly encoded video?


RedZ
31st August 2007, 18:01
Hi,

I've been away from the video editing "scene" so I don't feel that up to date about what software is the best for doing various things.

So here's what I'd like to do. I have a number of DIVX movies with alot of interlacing artifacts and I'd like to get rid of those artefacts without loosing too much of the video quality.

I have examined the movies using VirtualDub and it looks like those that encoded the movies did the following:

1. The analog interlaced video were transfered over to the computer.
2. While still being interlaced, the video were enlarged. Resulting in interlaced lines with jaggies that consume more than one row of pixels per interlaced original line.
3. Some logos and company information were added as an overlay.
4. The video were encoded to DIVX and then distributed to there customers.

What would be a good way of reversing this process (with the exception of the company overlay)?

This is what I have worked out so far using Virtual Dub, and it appears to work very well.

1. Make sure no postprocessing is applied by the DIVX Pro decoder. Doing any more postprocessing would likely just add more junk to the video.
2. Add a resize filter, either the built in or Smart Resize and shrinking the video, close to where the expanded interlace lines appears as only one row of pixels. (Tweaking the resize method to preserve the details.)
3. Next, applying either the built in deinterlace filter or for example Smart Deinterlace. Tweak the settings until the interlace is eliminated as much as possible without damaging the rest of the video.

With this setup I can then re-encode the DIVX video with the DIVX Pro codec, doing no resizing or de-interlacing in the codec. When the final result is shown in full screen and compared to the original, I think there is very little details/quality that is lost and those awfull interlacing artefacts are now almost completley gone.

So now, finally, the questions:
Is this the best way to solve the problem?

Is there any other software that can be used to do the same, but which is faster than Virtual Dub (full video processing and stream copy for audio)?

Is AVISynth a better option? Would it be faster? And would audio be properly synced? I used AVISynth way back and it's very powerfull but I always had a lot of syncing problems with audio. What "backend" would be best for encoding the output from the AVISynth script?

The output format should be either DIVX or WMV VC-1.

I think the priority here is preserving as much quality as possible while still processing the video/encoding as fast as possible.

With the above mention setup I'm at about 60-70% of real-time, which is acceptible for 20-30 minute movies. Processing times of several hours is probably more than my patiens would allow. :)

Any advice on this would be appreachiated.

/RedZ

Sharktooth
31st August 2007, 18:14
You seem to have been away from reading to forum rules too:
12) How NOT to post on this forum:

Do not ask "what's best" because this question cannot be answered objectively. Each and everyone has their own view about what's best in a certain area. The best is what works best for you!

neuron2
31st August 2007, 18:28
I have a number of DIVX movies with alot of interlacing artifacts and I'd like to get rid of those artefacts without loosing too much of the video quality.

I have examined the movies using VirtualDub and it looks like those that encoded the movies did the following Where and how did you get these movies? Serious rule 6 questions are arising here.

http://forum.doom9.org/forum-rules.htm

RedZ
31st August 2007, 19:10
You seem to have been away from reading to forum rules too:

Sorry for that, let me rephase my self then. I realise that things can be fine tuned and altered for eternity in order to reach what could be considered to be "the best" result.

But rather than discussing subjective oppinions, I would like some examples of what steps and what tools to use in order to effectively remove interlaced lines from a movie that have been either enlarged or reduced in size without being properly de-interlaced first.

How would someone go about removing those interlaced lines that have been distorted? Simply applying regular de-interlacing filter doesn't seem to work that well since the interlaced lines are too "thick" or in some other way don't look like regular interlaced lines do.

I would beleive that those are valid questions to ask at this forum? Am I correct or should I leave through the back door?

neuron2
31st August 2007, 19:29
OP has clarified the status in PM and things are legit.

neuron2
31st August 2007, 19:33
I doubt that anyone here is going to be very interested in this problem because it has no solution. Once you've resized interlaced video like that you've irreversibly combined data from the different fields. You should contact the company and educate them on how to encode video. :)

Sharktooth
31st August 2007, 19:42
uhm... i think there isnt a better method than yours. maybe you could try a different deinterlacer to see if gives more quality but still...

RedZ
31st August 2007, 19:50
Thank you. I have contacted them and explained the problem, but my educational skills may be somewhat lacking. In the end they may very well just ignore me, so I'd like to salvage what can be salvaged.

My understanding of the problem also tells me that the video is irreversibly damaged, but given that this type of problem isn't unknown, someone may have deviced some way of at least partly restoring the video, in perhaps a bit more sofisticated way than what I have done.

It's at least worth asking. (And thanks for your patiens with an old noob.)

Shinigami-Sama
1st September 2007, 02:06
The only thing I can think of is chopping the video(lossless i-frame only codec would make this easier) into sections and applying filters to each section then recombine them once you have the sections under control

wildaces
4th September 2007, 06:00
When dealing with movies with jagged edges such as the high speed shaking of the hand, my preferred video editor would be Ulead Media Studio Pro 7.
I would insert the offending video in the timeline, right click on the video, choose "Media Source Option", checking "deinterlace" option,and finally rendering the video using frame-based as frame type to either DV-avi or DVD-Mpeg2.