Log in

View Full Version : Problem Processing Family Guy


drtj
18th September 2007, 03:49
Well I have eliminated the combing problems in my Simpsons captures. I was hoping that I would be able to process my Family Guy episodes with the same script since I was experiencing similar combed frames. So much for that hope…

Now I am noticing a new problem. It seems that every so often in a random pattern there are frames that seem to be just a bit off, especially in the horizontal lines of non-moving objects.

I have provided links to small clips:

short clip: 18 mb
http://rapidshare.com/files/56462741/short1.ts
a bit longer: 65 mb
http://rapidshare.com/files/56461833/1.ts

and if you look at the lines of the pink couch especially the top and bottom borders, it looks like it is jumping up and down (shifting) when it shouldn’t be moving at all. When viewed at 59.94 fps, the original frame rate, you really have to look for it, but if you reduce the frame rate / decimate some of those frames then it is very noticeable.

I was reading through the threads how in some animation this affect is created when using “props” like the couch is not drawn over and over again but just drawn once and then stuck in the cartoon. However no solutions. Words like shimmer, jumping horizontal line, and antialiasing are other terms that I came across but still no real answers how to deal with this problem.

Any help or a point in the right direction would be greatly appreciated.

Thanks.

drj

Guest
18th September 2007, 04:09
How did you capture that clip? It is pathologically messed up.

drtj
18th September 2007, 04:14
I used a OTA HD capture card attached to an antenna.

I sometimes capture those from my STB as well with a fire wire cable and get the same exact features and problems.

drj

drtj
18th September 2007, 09:05
Any known treatment for my ailing source?

2Bdecided
18th September 2007, 13:16
You know, the SD stream might have been a better source!

If I understand correctly, both the things you've had trouble with have been SD upconverts showing on an HD channel. The conversions of both seem downright weird.

It might even be worth phoning Fox or their local affiliate, and saying these shows look really bad on your TV, and what are they doing wrong. I don't know about The Simpsons, but the Family Guy stuff would almost certainly look bad on most TVs.

FWIW when Family guy is shown here in the UK (in SD) it looks clear, crisp, and basically artefact-free. That's on a SD CRT though - I've not captured a clip to check.

It appears to be available on DVD from Amazon at a reasonable price.

Cheers,
David.

drtj
18th September 2007, 21:37
If the download speed on rapid share is too slow I have listed the same 2 clips on best sharing as well.

short: 18 mb
http://www.bestsharing.com/files/OQdkgZ339824/short1.ts.html

long: 65mb
http://www.bestsharing.com/files/AdQw4jo339825/1.ts.html

Chainmax
18th September 2007, 22:50
Downloading long version, will try to take a look at it as soon as I can.

drtj
19th September 2007, 04:24
Just wanted to clarify. The problem that I am having is not blended or combed frames. I took care of that with Mrestore and the following script thanks to jmac698's initial push in that direction and MOmonster's definitive solution.

import("Mrestore.avs")
Mrestore(quality=2,mlimit=0.1,numr=2002,denm=5005)

This problem affects objects that are not moving at all like the outlines of the couch. It seems to jump up and down / shimmer / jitter / flutter / stutter / go out of focus. The horizontal lines throughout this clip are badly affected.

I think the best thing is if there was a filter out there that decimated the duplicated frames that seem to be off by a bit. I am fairly certain that whenever this horizontal instability occurs there are several duplicates that are off that are causing me such grief. I have tried looking for such a filter and have had no luck finding one and hoped that someone might know of one.

Or maybe I off in my interpretation and there is another solution, maybe...?

I hope I can get a solution. I have spent quite a bit of time combing the net, pun intended, trying to figure this one out. But I am confident that this forum will show me the light as it always does and I owe a many thanks for it.

drj

MOmonster
19th September 2007, 09:03
@drtj
You can reduce this bad effect a little bit with blendbob. A small specialized function can reduce this problem much more, especially in the still scenes. I will have a further look on your source this weekend.

drtj
21st September 2007, 04:36
@MOmonster
Thanks for your time and expertise.

scharfis_brain
22nd September 2007, 09:21
without haven seen that samples:

Family Guy has been edited using Adobe Premiere.

They used its slowdown and speedup features.
These ones will stupidly bob-deinterlace the input video and then change the framerate and reinterlace it.
This explains the bobbing effect.

You can't do anything against that.
It is already present in the very first source...

drtj
22nd September 2007, 19:37
I saw that documentary / behind the scenes special about Family Guy as well. That is what I was talking about before, where the background and things like the couch are not actually drawn in every frame, just cut and pasted and moved around, and I think that is what causes this nuisance.

I have seen this very episode processed to the effect that this “bobbing,” jitter, stutter, shutter, jagginess, whatever you want to call it (I just want to get rid of it) is eliminated. I know that this processed .avi it is not from the DVD of that season because this file came out right after the episode aired.

The first rule of Doom9 is that we don’t talk about these files…the 2nd rule of Dooom9 is that we do not talk about these files…so I really can’t say were I got the file from…but I am sure you can infer its origin.

I also purchased the season 5 discs where this episode is found in the Family Guy series, and the video files there do not have this effect either. So I am assuming that this nonsense is introduced in trying to convert it to some format suitable for broadcast TV.

With the new season about to begin I was wondering if it is even worth my time to capture episodes if I cannot process them with decent results or if I should just wait for it to come out on DVD. I like having both.

I am sure there is a way, it is just not becoming readily available to me as of yet.

Still haven’t given up hope…

scharfis_brain
22nd September 2007, 19:50
I looked at this sample.

The flicker was present even before the upscaling to 720p.
So it is not an issue of the standards conversion.

It is NOT fixable.

[irony on]
oh, wait: maybe you are pleased with this:
Temporalsoften(7,255,255)
[irony off]

I've seen several samples of the Family Guy episodes showing exactly the same issue. The Flickering had been introduced during editing.

EDIT: you may create a monstrous script that adaptively checks for dupes and blends these together.
further that script has to blend all horizontal lines adaptively temporally without touching solid areas.
This will not be easy to script. And I don't know how the side effects would look alike.

MOmonster
23rd September 2007, 01:00
@drtj
It was much more time consuming than I thought. So I hope this works for you. I wonīt write another function:devil:.
This works pretty well for me. Thanks to triticals great TIVTC plugin we can detect the right frames:
function drtj_repair(clip clp)
{

###### source preparation ######
global bffout = clp.lanczosresize(width(clp),480,0,0,0,-8).assumebff().doubleweave().selectodd()
global tffout = clp.lanczosresize(width(clp),480,0,0,0,-8).assumetff().doubleweave().selectodd()


###### initialise variables ######
global tffn = 0
global bffn = 0
global bcn = 0
global tcn = 0

###### final evaluation ######
ScriptClip(bffout, " bffp>tffp && (bffp+tffp<bffn+tffn && bcp+tcp==bcn+tcn || bcp+tcp<bcn+tcn) ? bffout.duplicateframe(0) : bffp+tffp<bffn+tffn && bcp+tcp==bcn+tcn || bcp+tcp<bcn+tcn ? tffout.duplicateframe(0) : bffn<tffn ? tffout : bffout ")

FrameEvaluate(last, "

## value calculating & shifting ##
global tffp = tffn
global tffn = tffout.CFieldDiff()

global bffp = bffn
global bffn = bffout.CFieldDiff()

global bcp = bcn
global bcn = bffout.IsCombedTIVTC(cthresh=8,Mi=64) ? 1 : 0

global tcp = tcn
global tcn = tffout.IsCombedTIVTC(cthresh=8,Mi=64) ? 1 : 0

")

return last
}
You should tweak the combing detection for your sample, use a good resizing algo after this function and decimate the output.
Using sample:
h = height(last)
w = width(last)
last.drtj_repair()
lanczosresize(w,h)
...
Edit: updated function.

scharfis_brain
23rd September 2007, 11:24
Momonster, what is this function effectively doing?

So I was wrong for the major flicker.: was caused by the conversion which was only frame adaptive not pixel adaptive, which explains the major flicker.

MOmonster
23rd September 2007, 12:31
@scharfis_brain
You are right, the bobbing effect (the reason for the mayor flicker) is already in the non-upscaled source.
It cost some time until I found the right downscaling to undo the bobbing effect just by weaving the right fields.
The function downscales the sample to the original size and weaves bff and tff. The frames with the clearer edges have a higher FielDiff value. That way the function detect the right weaved fields for output.

This is a quick and dirty solution. Knowing the exact upscaling algorithm and searching for a pattern could improve the output just a little bit more. But this is the first time I see this problem and donīt want to spend much time in a very seldom problem.
The downscaling idea works better than I thought but itīs everything else than perfect, because all the side-effects (for example compression artefacts and unknown resizing filter) are visible.

scharfis_brain
23rd September 2007, 13:14
So I wasn't wrong?

Now I am confused...

All I knew, was that Family Guy is a source painly to process at all.

MOmonster
23rd September 2007, 13:52
And what makes you confused know?
If I bob the telecined source and than upscale the frames, I also can undo this by doing the opposite thing:
Downscale to the original size and than choosing the original fields.
If we had a constant pattern, a fast and nice IVTC would be possible.
But of cause the edits and the fact, that the downscaling donīt really undo the upscaling, donīt allow a perfect restoring.

MOmonster
23rd September 2007, 20:43
@drtj
this modification works a little bit better. a good decimation and the output is fine:
function drtj_repair(clip clp)
{

###### source preparation ######
global bffout = clp.lanczosresize(width(clp),480,0,0,0,-8).assumebff().doubleweave().selectodd()
global tffout = clp.lanczosresize(width(clp),480,0,0,0,-8).assumetff().doubleweave().selectodd()


###### initialise variables ######
global cho = 0

###### final evaluation ######
ScriptClip(bffout, " (current_frame+cho)%2==0 ? tffout : bffout")

FrameEvaluate(last, "

## value calculating & shifting ##
tffn = tffout.CFieldDiff()
bffn = bffout.CFieldDiff()

global cho = tffn>bffn+10000 ? 0+current_frame%2 : bffn>tffn+10000 ? 1-current_frame%2 : cho

")

return last.tfm(slow=2,mmsco=false,micmatching=3,pp=0,Mi=32,cthresh=7)
}

drtj
8th October 2007, 06:32
Sorry I haven’t responded in some time after MOmonster’s awesome script. It WORKS, quite beautifully I might add. I have been busy with some exams and then I have been experimenting with the script to see what kind of results I was getting and if they worked on all my captures of the Family Guy. THEY DO!

So thank you very much MOmonster for all your hard work and seeing this through. Like I said, I have purchased the official DVDs and have the episode these clips come from on the official DVD and will post those clips as soon as I find some time and how to do it exactly if anyone is interested in what it is supposed to look like.

Thanks to eBay I have been able to complete my Family Guy DVD collection and I must say that the DVDs from the 1st two seasons are quite literally doo doo. I am not sure how they came up with what they did or how they edit this stuff, but I can’t believe that they are charging people to buy these discs. They just look awful. They sort of look okay on my old tube TV, but on my 1080P 52” LCD it looks like &@##. Even with a DVD player that upconverts normal resolution DVDs, on my PlayStation 3, or my HD drive in my entertainment center PC. I have everything set up correctly, but the picture just looks bad, and I am not talking about the animation itself which isn't too hot in itself, but the actual final product. However the later seasons, especially seasons 4 and the 1st part of 5 are much, much better.

Anyway, thank you again so much MOmonster. I owe you one. I am so glad that I asked you to look at my post.

drj

OPTiK
3rd November 2007, 19:27
Hey guys, quick question. Can anyone post what the .avs file is supposed to look like to implement that function. I'm new to this and want to implement this fix. Thanks in advance!

guldukat
3rd November 2007, 22:49
you would just do drtj_repair()

OPTiK
4th November 2007, 17:12
where do i store the function?

MOmonster
4th November 2007, 23:21
Donīt exactly get what you mean:confused:.
Copy this function here (http://forum.doom9.org/showthread.php?p=1047962#post1047962) into your notepad and save it as drtj_repair.avs or drtj_repair.avsi

Then write your avs this way:
LoadPlugin("location/TIVTC.dll")
import("location/drtj_repair.avs")

#load source here
drtj_repair()
#decimation here

OPTiK
5th November 2007, 03:41
I fooled around with the settings some, and for my last question i will ask...

where do i input the file name? i tried drtj_repair( "file.avi" ) with no success . I get the error

"Script error: expected a , or )".

Am i supposed to do something with AviSource?

Adub
5th November 2007, 04:07
What? Just use avisource("file.avi") at the beginning of your script, use the format that MOmonster posted, and it should work fine.

Oh, and that script error will tell you at which line your problem occurs, so it should be pretty easy to track down.

OPTiK
5th November 2007, 04:29
Thanks guys. I got it working but the picture is unproportional and and see the lines worse than before. I tried different decimations (tdecimate(mode=1), tdecimate(mode=1, hybrid = 1)) and it still looks bad. Am I missing something? Sorry I'm really new to this.

MOmonster
5th November 2007, 10:56
There is a reason why I named the function drtj_repair. It will only work in this special case, only with this source. And because your source is an avi, I donīt think that your source is identical with the one of drtj.
I got it working but the picture is unproportional ...
Sorry, I forgot that the function doesnīt internal back-scale the source.
h = height(last)
w = width(last)
last.drtj_repair()
lanczosresize(w,h)
#decimation
Maybe your source needs different scaling. Or your problem is similar, but the reason for this is different. Then the function has no usage for you. If your source is family guy too, please upload a small sample that we can have a look on it. Else you should better open a new thread to explain your problem.