Log in

View Full Version : Conditional Border Control?


Nomake Wan
6th February 2007, 03:15
All right, I'm getting close to a personal goal, but I'd love to be able to solve this problem before I finish the project.

I have this DVD which combines progressive-encoded animation sequences with cel-transfer interlaced sections. The problem is, the animation sequences all have the proper movement and position (that is, the frame doesn't jump around on the screen)...

...but the cel animation sections are hell. When I put the DVD into my DVD player and watch the DVD on a TV, there are no problems with the cel sections. They don't jump around on screen at all, they look fine. But when I put the DVD into my computer and attempt to decode it (whether I'm watching it or actually running an encoder on it), the cel frames move around--sometimes to the degree of being completely outside the frame. To illustrate this problem, I provide the following image:

http://img187.imageshack.us/img187/3536/problem1gp4.th.png (http://img187.imageshack.us/img187/3536/problem1gp4.png)

Note the gray area to the right. This is where the cel animation frame is actually moved to the left far enough that it has exceeded the frame width of the DVD. Most of the cel sections aren't this severe--but all of them move around, whereas the other sections do not. Again, when viewed on a normal DVD player connected to a TV, this phenomenon does not occur.

Is there some code I'm missing? Is there something I can add to a script to solve this random motion problem? What causes this to happen?

I've included video examples, in case my explanations didn't make sense.

Frame moves vertically (http://rapidshare.com/files/14969849/frameud.avi.html)

Normal Frame (http://rapidshare.com/files/14970049/framenorm.avi.html)

Frame Moves All Directions (http://rapidshare.com/files/14969959/framelrud.avi.html)

Normal Frame #2 (http://rapidshare.com/files/14970018/framenorm2.avi.html)

Notice that in the "Normal Frame" videos, the frame does not deviate whatsoever no matter how much motion occurs in the image. In the cel animation videos, the frame moves sporadically regardless of on-screen motion.

Thanks in advance.

Guest
6th February 2007, 03:20
Post an unprocessed VOB fragment that we can use to reproduce the issue.

What tools did you use to decode the VOB?

Nomake Wan
6th February 2007, 03:34
Crap, gotta get DVDDecrypter back on here to make the VOB fragment...

This problem occurs in every single program which can interact with video DVDs. Not a single program, player, decoder or otherwise, can display this properly.

As for what I used to make the videos, I used DGIndex 1.4.8 and VirtualDubMod. Script as follows:

loadplugin("C:\Documents and Settings\Largo\My Documents\DGIndex\DGDecode.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Decomb.dll")
MPEG2Source("VTS_01_0.d2v")

Guest
6th February 2007, 03:40
Just looked at one of your AVIs. That gray bar could be in the overscan of your TV and that is why you don't see it. The jumping around is hard to assess because the scene itself has jumping, i.e., the car bouncing around. Maybe the animators did the car bouncing by shifting cells around and they just goofed on the right and didn't notice it because of the overscan. If all decoders show it, it's very likely to be an authoring goof.

Nomake Wan
6th February 2007, 03:43
That's the thing, though--overscan usually isn't this severe. Even cutting out the normal frames from the sides like I would on any DVD rip doesn't get rid of the gray bars. I would have to seriously cut out a lot of image data to remove it.

And the jumping around is obvious if you instead look at the edges of the frame rather than the image. Look at the edge of any "Normal Frame" videos, then look at the edge of the others. On the "Normal Frame" videos, the edge does not move at all. On the others, the actual edge of the frame jumps and skips around.

Nomake Wan
6th February 2007, 04:17
Sorry for the delay, took me a bit to upload. Here's the second example as a raw VOB fragment. I'm uploading the other scene as I type this and will edit this post to include it once it's finished.

http://rapidshare.com/files/15129468/VTS_01_2s.VOB.html

http://rapidshare.com/files/15129927/VTS_01_1s.VOB.html

All done.

Guest
6th February 2007, 04:55
I downloaded the second and then rapid share said I reached the download limit and I couldn't get the first. Why do you use such a poor host????

Anyway, I couldn't see any problem at all with the second one (VTS_01_1s) when single stepping in DGIndex 1.4.9b13, no gray bar, nothing. What are you drawing our attention to?

There's the intentional bouncing effect of a fast moving car.

Point us to stuff in your source VOB, not the encoded result!

Nomake Wan
6th February 2007, 05:22
I use rapidsuck because it's fast and because the host I USED to have went down. I don't have any dedicated hosting anymore. >.>

In the first one (1s), it's the section at 9 seconds in to 11 seconds in. The gray bar appears on the top of the frame (overscan is only on the sides, usually, isn't it..?).

The second one (2s) is much clearer... suggest another host and I'll upload it at once.

Guest
6th February 2007, 05:26
megaupload.com

Overscan applies to all borders.

To me that looks like an intentional shift to simulate car motion.

Do you see this in a scene that doesn't include intentional bouncing effects?

You can fix those gray areas using line replication ("border control").

Nomake Wan
6th February 2007, 05:42
http://www.megaupload.com/?d=W7O2K9AG

(3 seconds to 6 seconds, gray appears primarily on right side, but about a second in appears on the top as well)

How would I go about using this line replication method?

Guest
6th February 2007, 05:47
Please answer my questions if you want me to answer yours:

"Do you see this in a scene that doesn't include intentional bouncing effects?"

Nomake Wan
6th February 2007, 06:01
Sadly any of the scenes which use this type of transfer have "intentional bouncing effects." (Sorry, I blanked and forgot you asked, my apologies)

I'm thinking you're right about authoring problems, though... while it isn't the error I'm talking about, I noticed a new error while looking through scenes just now:

http://img242.imageshack.us/img242/5918/snapshot20070205235831ou7.th.jpg (http://img242.imageshack.us/img242/5918/snapshot20070205235831ou7.jpg)

The green "leaks" from the text into the border... which I'm guessing they just ignored since it was overscanned anyway.

Guest
6th February 2007, 06:57
There's a filter called BorderControl() which you would have to apply conditionally. It's worth it if the video is important to you and you don't want to crop it.

Nomake Wan
6th February 2007, 07:32
Forgive my n00bishness, but could you give an example script of using this filter conditionally based on timecodes? For instance, to remove the gray border on "Frame Moves All Directions" AVI clip?

EDIT: Great tool this is.

http://img168.imageshack.us/img168/559/problemls5.th.png (http://img168.imageshack.us/img168/559/problemls5.png)

compared to

http://img160.imageshack.us/img160/2992/solutionas5.th.png (http://img160.imageshack.us/img160/2992/solutionas5.png)

Is muuuuuch better. Just gotta figure out how to give it specific timecodes... -_-

Guest
6th February 2007, 11:59
I don't have time to develop a script for you, but maybe someone in the Avisynth Usage forum will. So I have moved your thread and changed the title as it is clearly not a decoding issue anymore.

Nomake Wan
7th February 2007, 02:05
So could anyone possibly throw together a little script with the BorderControl() filter conditionally called based on timecodes? I can go throught and adjust timings and settings, no problem there... but at the moment I have no clue how to do conditional scripts, so...

Alain2
7th February 2007, 02:54
Maybe you can do it using ReplaceFramesSimple or ApplyRange from Stickboy stuff (http://avisynth.org/stickboy/)

Nomake Wan
7th February 2007, 04:28
Ooh, ApplyRange looks like it'd work. Thanks a bunch!

Just means a bunch of tweaking after-the-fact. Guess I should hurry up and finish this thing, then...