PDA

View Full Version : Filters for videogame captures?


zilog jones
18th September 2004, 19:50
I've got some captures taken from a few Gamecube and Dreamcast games (capped at 720x576 PAL, Huffyuv), which I want to put onto a SVCD (well, really a CVD, which is just the same thing but 352x576 instead of 480x576) because I'm a smelly student and I'm too unemployed to afford a DVD burner -_-

After some preliminary tests of just encoding the videos to MPEG2 (352x576, 25fps, 2.5Mbps CBR, using TMPGEnc with slowest motion estimation) without any filtering or anything, they seemed quite crappy - there was serious full-screen blockiness in some areas, especially with fast camera movements like in the replays of F-Zero GX (a racing game - and a VERY FAST one).

The source is clean enough, being taken straight from the consoles, but there was the problem that we only had composite video connections at the time - so everything's dot-crawl-tastic. Would GuavaComb be the best filter to get rid of this?

What other filters would help with this mostly fast motion stuff? I don't want to lose too much of the sharpness, but then again I'm pretty much halving the horizontal resolution, so I could probably do a lot of smoothing. I've tried using Convolution3D(movieLQ) on some similar stuff, but it didn't seem to do much.

Please take into account that it's all interlaced video, too. I assume it's best to filter the fields separately like in the Capture Guide here?

What resizer should I use? I pretty much use Lanczos all the time, but does that compress well to MPEG2?

Any advice will be greatly appreciated!

lamer_de
19th September 2004, 08:48
Guavacomb is probably a good start for de-dotting, but it never worked for me (probably because my sources were already compressed once and not interlaced), but you can try this filter as well (Vdub only):
http://home.earthlink.net/~tacosalad/video/dotcrawl.html

Then there's this Japanese filter called DeDot, you'll have to use the forum search to find it, don't know the url out of my head.

I would give MipSmooth for the filtering a shot, it works fairly well with cg/animated content from my tests with anime. I found even the default settings rather strong, but as I don't know the detail level of your videos, you should play around a bit with values. And yeah, you'll need to use the sepreatefileds/weave combo to apply those filters thought for progressive frames to interlaced material (at least I think so, I never worked with true interlaced material :p). I you're going to filter anyway, Bilinearresize is probbaly the best way to go. There shouldn't be much "hyper-fine" detail you want to preserve like film grain anyway. Helps compression, too.

CU,
lamer_de

scharfis_brain
19th September 2004, 09:54
@zilog jones:
are you sure, that you can't do any fieldmatching with your video?
cause game consoles often drop the framerate to a half or third of the fieldrate (50 / sec) if the image gets too complex.

also you should try to do some motionblurring. it will
- make your video looking more smooth and natural
- make it better compressible

zilog jones
19th September 2004, 18:05
Originally posted by lamer_de
Guavacomb is probably a good start for de-dotting, but it never worked for me (probably because my sources were already compressed once and not interlaced), but you can try this filter as well (Vdub only):
http://home.earthlink.net/~tacosalad/video/dotcrawl.html

Then there's this Japanese filter called DeDot, you'll have to use the forum search to find it, don't know the url out of my head.

I would give MipSmooth for the filtering a shot, it works fairly well with cg/animated content from my tests with anime. I found even the default settings rather strong, but as I don't know the detail level of your videos, you should play around a bit with values. And yeah, you'll need to use the sepreatefileds/weave combo to apply those filters thought for progressive frames to interlaced material (at least I think so, I never worked with true interlaced material :p). I you're going to filter anyway, Bilinearresize is probbaly the best way to go. There shouldn't be much "hyper-fine" detail you want to preserve like film grain anyway. Helps compression, too.


As a matter of fact I was testing out MipSmooth last night, before even reading this! I eventually got it working with the fields separately, using the way as shown in the Capture Guide:

<...>
SeparateFields

odd = SelectOdd(last).MipSmooth(preset="movielq")
even = SelectEven(last).MipSmooth(preset="movielq")
Interleave(odd, even)

lanczosResize(352,288)
Weave()

Only problem with this is where would I put GuavaComb in with this? I assume as that's a temporal smoother it will need to be done on the fields separately too, but I can't find a way to make the two filters to work together. I tried:
SeparateFields

odd = SelectOdd(last).MipSmooth(preset="movielq")
even = SelectEven(last).MipSmooth(preset="movielq")

odd = SelectOdd(last).GuavaComb(mode="PAL")
even = SelectEven(last).GuavaComb(mode="PAL")

Interleave(odd, even)

lanczosResize(352,288)
Weave()
But that just makes none of the filters work. I tried a few other ways too (can't remember right now) but they didn't work either.

are you sure, that you can't do any fieldmatching with your video?
cause game consoles often drop the framerate to a half or third of the fieldrate (50 / sec) if the image gets too complex.

No, if you look at the newer games like these, you'll find that they're pretty much running at 50/60Hz all the time and occasionally slowing down if there's too much action on the screen at once (or slowing down a lot if it's badly programmed!). Pretty much every frame where there's movement in what I have looks interlaced.

scharfis_brain
19th September 2004, 18:15
you script has to be like this one, to work properly:

SeparateFields

odd = SelectOdd(last).MipSmooth(preset="movielq")
even = SelectEven(last).MipSmooth(preset="movielq")

odd = odd.GuavaComb(mode="PAL")
even = even.GuavaComb(mode="PAL")

Interleave(odd, even)

lanczosResize(352,288)
Weave()

btw. Interlaced look must not mean interlaced content :)

and what about applying a mvblur() on your video?

maybe you could provide an unprocessed sample?

zilog jones
19th September 2004, 18:37
Thanks for the help with the script - I knew it was something stupid I was doing wrong!

I'll try mvblur if I could find the filter - I don't see it on http://www.avisynth.org/warpenterprises/. Could you give me a link?

Here's a sample: www.skynet.ie/~zilog/ssb0.png
Sorry it's just a picture - I'm on a 56k connection here and I'm in a rush!

And I'm definately sure it's all full 50 fields per second - if I use DGBob on it, it all comes out as different frames. I know most older 3D games like stuff on the PlayStation and Saturn would usually only run at 25/30fps, if not a lot lower, but times have changed since then!

scharfis_brain
19th September 2004, 19:05
mvblur comes with mvtools.dll http://forum.doom9.org/showthread.php?s=&threadid=82015 from manao.


it is a little bit hard to handle if you are new to this stuff.

but before using mvblur, you need to bob-deinterlace the video, I think therefore TDeint() is worth a try. especially its ELA-interpolation may help reduce jaggy edges.

zilog jones
21st September 2004, 01:23
I don't know if I'll bother with mvblur - I'm kinda stuck for time as I have to have all this stuff finished by the 28th, and I'm nowhere near finished. This - combined with the (lack of) awesome power of my PIII which takes up to 1 and a half hours to encode 3-minute MPEG2 clips when I'm using MipSmooth, Undot, GuavaComb and CNR2 - doesn't really help things.

MipSmooth has helped a lot, but I found (with the interlaced videos anyway) that I had to put the settings a good bit higher than the defaults to make things not too blocky. For the videos taken off composite sources, I use something like this:

AviSource("G:\video\attempt1\attempt1.avi")

Undot
SeparateFields

odd = SelectOdd(last).GuavaComb(mode="PAL")
even = SelectEven(last).GuavaComb(mode="PAL")

odd = odd.cnr2
even = even.cnr2

odd = odd.MipSmooth(preset="movielq", spatial=10, temporal=15, spatial_chroma=12, temporal_chroma=15, method="superstrong")
even = even.MipSmooth(preset="movielq", spatial=10, temporal=15, spatial_chroma=12, temporal_chroma=15, method="superstrong")


Interleave(odd, even)

# RESIZING
bilinearResize(352,288)
Weave()
letterbox(5,5,16,12)
ConvertToRGB24(interlaced=true) #TMPGEnc (the MPEG2 encoder I'm using) uses RGB24

From doing compressibility checks in GordianKnot (though encoding to XviD 'cause it has no MPEG2 support), it seemed that putting CNR and GuavaComb (the chroma noise filters I'm using, which work very well) before MipSmooth seemed to compress better despite what guides (and even the manual for GuavaComb) say.

Only problem is I'm still getting quite a lot of blockyness in really fast motion and big camera movements, especially in F-Zero of course. Should I just raise the temporal smoothing even more? I know de-interlacing would make it a lot better, but it looks so much nicer and faster interlaced!

Mug Funky
21st September 2004, 10:30
FYI, other encoders will handle low-bitrate interlaced video better than TMPGenc.

try CCE (with alternate scan, NOT zigzag scan.), or QuEnc with "interlaced" checked (this doesn't do alternate scan, but works pretty well on interlaced frames anyway. next release will have alt scan and some other things).

i feel you pain about not being able to afford a DVD burner - i just bought one, found out it was defective, and then on the way to returning it, it gets stolen. guh. they don't cover that on the warranties.

Chainmax
21st September 2004, 13:27
zilog jones, have you tried using RemoveGrain instead of Undot? It should give you a nice compressibility gain and maybe allow you to reduce the setings on MipSmooth. About the blockyness, I am having a similar problem with some low bitrate on panning scenes. I'm pretty sure oversmoothing isn't the answer but I don't know what to do either. Why don't you try Unfilter? Maybe it will help.

zilog jones
22nd September 2004, 20:24
Hmm, never thought about using a different encoder. I'll try out CCE and QuEnc if I get a chance. I hope they're not too much slower though - I usually have to do the MPEG2 encoding overnight due to the crappyness of my PIII.

Er, what's the difference between alternate and zigzag scan? Some sort of different encoding methods or something? And do these encoders allow making non-standard stuff? I'm using 352x576 because I'd rather have better compression than higher resolution, and they play fine on my DVD player which can play pretty much anything (I accidentally made a 352x276 video once and even *that* played!). Only bad thing about it is it can't play CDs faster than 2x speed, so no miniDVDs for me! A shame really, as the video I'm making isn't that long either (only about 20-25 minutes).

I try RemoveGrain (if I can find it) and UnFilter too. Despite the high settings I've been using, the video still looks pretty good and clear on a TV. Plus I'm probably gonna end up showing on a crappy 14"-er anyway, so I'm not too bothered.

In case you're wondering what all this is for, it's for the University of Limerick Games Society (I'm the prez). We're going to show it on our stand at the clubs & soc's recruitment day, to make us look cool or something. We mostly play old school non-computery RPGs, but they're not the most exiting things to watch, so we're showing the pretty shiny things we play too.

zilog jones
23rd September 2004, 17:04
OK, with QuEnc the videos look great compared to TMPGEnc! And it's a damn sight quicker too - it took me 50 minutes to encode one of the videos (using the script below) on a 2.4GHz P4 (though the files were over a network using a crossover cable and I was also muxing audio) in TMPGEnc, but took only about 35 minutes on my 933MHz P3 with QuEnc! It seems to handle fast motion a lot better and generally looks a lot clearer, though blockyness around logos and static text overlays seems a bit worse. I haven't tried CCE yet, but I only have the logo-tastic trial anyway.

And on further investigation, RemoveGrain doesn't seem to be too good at dealing with interlaced video. Plus I don't think UnDot is even helping much with my videos - besides the dot crawl around solid edges they look pretty clean.

Actually, how should I set GuavaComb to deal better with fast motion stuff? It doesn't seem to be doing much on that F-Zero video - there's still dot crawl even on the static "replay" text in the corner, though that text is a very bright green with blurred (kind of glowing effect) edges.

Leak
23rd September 2004, 17:13
Originally posted by zilog jones
Actually, how should I set GuavaComb to deal better with fast motion stuff? It doesn't seem to be doing much on that F-Zero video - there's still dot crawl even on the static "replay" text in the corner, though that text is a very bright green with blurred (kind of glowing effect) edges.

Have you tried DeDot yet? It also eliminates dot crawl, and for me it works better than GuavaComb, even at it's default settings...

You can find it here (http://nullinfo.s21.xrea.com/#DeDot_YV12)...

np: Rechenzentrum - Solaris (The John Peel Session)

zilog jones
23rd September 2004, 17:30
Thanks! I'll try it out. Is there any English documentation on it though? From reading the text file with my crap knowledge of Japanese (which mostly consists of being able to read English and German words written in Japanese, and the noises certain animals make), I have come to the conclusion that it's (i) a plugin, (ii) it has something to do with "dot" something and "cross-colour" (I assume that's colour bleeding?), (iii) something abouce "interlace" and "resize", and (iv) something about tuners and capture cards.

zilog jones
24th September 2004, 19:25
OK, I tried DeDot and it just made things worse - it made these weird small artefacts around the place. I guess it's designed for NTSC only or something.

This goes back to the question - how should I set GuavaComb to handle fast motion better, if possible? It just doesn't seem to be doing anything with that F-Zero video at all.

niiyan
25th September 2004, 16:54
Here is my "poor" translation of DeDot.txt.
I hope it would help you and other members of this forum. ;)


Avisynth Plugin

DeDot (DeDot 0.3) : thejam


It reduces DotCrawl and Cross-Color. Maybe.

Changes
0.3
debug Check Cross-Color more strictly.
0.2
debug Remove green points flickering on the upper right corner.
debug Reduce dust.


Requirements
MMX2 CPU.
Only used for interlaced materials.


Usage
Write in your avs file as follows:
LoadPlugin("path\De.dll")
# your sources and other filters
DeDot()


Parameters
DeDot(luma2d,lumaT,chromaT1,chromaT2)
default 20,20,15,5
luma2d
Spatial luma threshold.
This value is lower, DeDot detects more pixels as Dot Crawl.
lumaT
Tolerance of Temporal luma signals.
This value is higher, DeDot detects more pixels as Dot Crawl.
chromaT1
Tolerance of temporal chroma signals.
This value is higher, DeDot detects more pixels as cross-color.
chromaT2
Temporal chroma threshold.
This value is lower, DeDot detects more pixels as cross-color.


Warning
Filter before deinterlace and resize.
If pixels are mixed, difficult to detect.

I don't know well, but different TV tuners and Capture cards have
different appearing patterns of Dot Crawl and Cross-Color ?
If so, you may not get good results depending on environment.


Disclaimer
At your own risk.

zilog jones
26th September 2004, 15:54
Thanks, but again I think it's designed for NTSC only, which isn't of much help to me (<--look at my location ^_^)

On another note, I've encountered a problem with QuEnc - it doesn't seem to be able to handle TFF interlaced video. And guess what? All of my captured video and some stuff taken off a DVD is TFF! Swapping fields just makes them shake-o-rama.

I have a few things that are BFF (some PC-rendered stuff and a progressive 30fps to interlaced PAL conversion I did myself just using convertFPS(50) and then interlacing it), and they work fine.

Mug Funky
26th September 2004, 18:00
yes, at the moment there's no option to set field-order in QuEnc.

use this in your scripts (at the end)

doubleweave().selectodd()

this will shift everything along by 1 field, thus changing the field order without the need to mess up the spatial alignment (like with swapfields(), which is designed for b0rk capture drivers rather than nice field swapping).

FYI, DVD is TFF by default, but can handle BFF (which is good, because DV footage is BFF by default. damn annoying conventions that don't match... basically the only way to know what's what is to do a lot of test encodes and play them on the equipment it's destined for).

don't worry - QuEnc is in active development (both Nic and Dragongodz are developing it, and Peter Cheat is modding Libavcodec to get better rate-control, to help eliminate bitrate spikes).

zilog jones
27th September 2004, 10:43
Ooh, thanks! I was thinking of if there was a way to move things forward by one field yesterday, but I never tried to work out a way to do it... and then I forgot to ask about it... and then I forgot in general about it and just used TMPGEnc again for the TFF stuff.

basically the only way to know what's what is to do a lot of test encodes and play them on the equipment it's destined for
I usually test interlaced video with Media Player Classic - its MPEG decoder has three different real-time de-interlacers - weave, blend and (thank god) bob. It only wants to work with proper .mpg streams (not .m2v), but a simple mux is much quicker than burning the CD and all that jazz.

Of course when I first started using QuEnc with TFF footage, though, I forgot about that and didn't find out things had gone hideously wrong until I had already authored and burned the CD and was watching it on my TV. Aarg!

Besides that, I've had no trouble with QuEnc, though I am just using CBR. I was annoyed at first about its lack of batch encoding, but then remembered that Windows programs can still work with batch files. Brings me back to the days of my 386 and good ol' DOS 5...