Professional Documents
Culture Documents
------------------
Prologue & Premise
------------------
Not much of a manifesto but hey, the name sounded cool at least.
Couple things before diving in. If you have no idea what you're doing at this
point you
probably shouldn't be reading this or be anywhere near this page. Knowledge of
video stuffs
(IVTC, etc...) is a prerequisite to yatta. If you find yourself asking "Why?"
to a bunch of
things in this document then you might be getting a little ahead of yourself.
The whole point
of yatta is to improve upon the decisions made by tfm/telecide/tdecimate so if
you don't really
know what you're doing in yatta you're probably better off just using
tfm().tdecimate() or else
you might unknowingly fuck shit up and make it worse that it would've been.
The purpose of this is to provide a practical usage guide to ymc and yatta. I
may refer to
pattern guidance as PG in this document.
---------------------------
General Yatta Usage and You
---------------------------
The ideal yatta session will involve very little to no use of the mouse. You
should try and do
everything with the keyboard and keyboard shortcuts as they make things go much
faster (and
easier). So go look at the hotkey list!
Some random general facts about yatta; A lot of the stuff in the right click
menu is probably
useless. A lot of stuff in yatta are 'one time use' features which were made
for a niche case
and will probably never be used again.
Go look at the settings dialog where all the hotkeys are. Learn them all,
become a god.
------------------
Metrics Collection
------------------
DVD2AVI or DGIndex?
Use whatever the fuck works.
DVD2AVI will provide faster seeking if it works.
timecop's modified to accept 188-byte transport streams:
http://pbx.mine.nu/dvd2avi/
For metrics collection you need a shiny d2v file to throw at ymc. So pick your
poison
(dvd2avi/dgindex) and make one.
Order of filters:
(Cutter->Crop->)tfm+telecide metrics->SCXvid->tdecimate
Crop and Cutter are both optional and should both be done before matching.
Cutter is generally
used on transport streams to cut commercials and 99.99% of the time don't use
it on dvd's.
Cropping before matching can help if there's shit on the edges that could mess
up the metrics
(cropping helps get better metrics). Feel free to be liberal with the crop
and overcrop, this
is just metrics collection and doesn't matter that much. The whole point is to
remove shit
around the edges that could mess with metrics collection so undercropping here
(or anywhere
really) is retarded.
TFM+Telecide Metrics will produce better matches for when pattern guidance
fails or for some
reason you want to resort to the original matches in yatta. Couple notes
though with regards to
it's usage. You MUST change the field parameter so that you get c/n matches
(instead of the
default c/p). While theoretically the same yatta needs c/n in order to
properly perform pattern
guidance (which uses cccnn permutations).
Order 0 -> Field T
Order 1 -> Field B
You don't have to touch anything else in tfm's settings. You can set slow=2 if
you feel like
donating more cpu cycles to tfm. I'd recommend keeping micm/mode to 0 so you
don't wind up with
a p match in the middle of a high motion on a shit video because tfm is
retarded enough to put
it there. If you're planning on doing pattern guidance NEVER run ymc with just
'tfm'. Yatta
needs the metrics from telecide in order to do pattern guidance.
SCXvid has to occur after matching but before decimation. The reason for this
is because you
need scene change information BEFORE decimation since that is how the pattern
changes.
---------------------------------------
Presets, Custom Lists, Sections and You
---------------------------------------
Sections:
When you open up a yap file after running ymc, sections will already be in
place that were
automagically generated from SCXvid. Every frame SCXvid flagged as an I
frame (keyframe)
will get marked as a new section. Sections are scene changes as detected
by SCXvid.
In the sections list in the tools menu only the start frame appears but
keep in mind that
end frame is the start frame of the next section subtracted by 1 (start and
end frames appear
when you're working with the video in the top left).
Presets:
Can be applied to the whole video by calling them bare at some arbitrary
location in the
script or can be applied on a per section basis. They're defined in the
tools->preset menu.
In the most basic sense it's a collection of one or more avisynth filters
which will get
applied wherever you put them. Remember to hit "update" every time you
change a preset.
Custom Lists:
Similar to presets except they are not bound by sections and are applied to
an arbitrary
range of frames. Unlike presets, they can only be on line (preferably a
single function
call), and they must apply the frame range themselves using %s and %e,
which are the start
and end frames respectively. For example: myfunction(%s,%e) which applies
itself to those
frames. In the tools->custom lists menu, the left box is a list of your
defined functions,
the top right large box is the list of frames to which it is applied, the
middle right box
is the function call for the selected function, and the bottom right box is
the filename to
which you have saved it to (which is completely useless so don't even worry
about it). The
most common example of this is reblend or reblend_vin as far as I know and
is the only
practical usage of custom lists.
-----------
Yatta Setup
-----------
Couple things before you get started in yatta. Some of these can be set once
and you'll never
have to do it again, others you'll be doing every time you load a yap file for
the first time.
To start off in the settings dialog there's a setting called "show too short
warnings". This is
where yatta usage can branch a little big because of discrepancies of whether
or not ignoring
too short sections really makes a difference.
The thing about too short errors is that when they occur it is an inherently
high motion place
in the video, which means it should be safe to ignore too short warnings. So
if you're feeling
a bit lazy you can uncheck it and ignore them and no one will be the wiser.
However this is
yatta, we manual IVTC everything to the extreme so the only way to guarantee no
fuck ups is to
not ignore them. They don't increase work load a lot it's just a bit of extra
work (it'll
appear as though there's a lot of them but they're often grouped together and
can get plowed
through rather quickly).
*DISCLAIMER*
It's probably safe to ignore too short warnings due to reasons above (high
motion) but ymmv.
*END DISCLAIMER*
Tools Dialog:
AVS Generation: Tdecimate
spline36 and nnedi3 are decent but pick what's best for the
situation
Find: VMetric from both sides 5-10 (I guess?) for dvd, 30 for transport
stream
(these values are in general, may depend on the source but they're good
starting points)
Here's where old sort of meets new. With hard telecine comes combed/interlaced
fades (aka
telecine combing, scanlated fades). This occurs on fades to and frame black or
white and on
cross fades. The old way of dealing with it was to use a custom list and the
reblend fucntion.
This basically blurred the fade till no tomorrow to get rid of the combing. A
vtresh search
(explained later) will pick up 99.99% of these but going through the video
doesn't hurt to apply
these via a custom list.
A newer way of dealing with it is a modified version of reblend which makes use
of the excellent
vinverse plugin to deal with the combing.
Available here: http://warpsharp.info/yatta/reblend_vin.avs
If you are using reblend_vin then add a custom list entry and call it whatever
you want (right
click in lists, new list -> empty). Click on the new list and in the first of
the two text
boxes put "reblend_vin(%s,%e)". Right click your custom list and put it as
"post telecide".
I don't exactly trust anything that does automagic thresholding but vinverse()
by itself does
have fairly good thresholding built in so another way to deal with it is to
have a preset with
just vinverse() in it and set it to apply it post telecide.
We're done in the tools dialog for now, right click anywhere in the video
Additional->Cropping
and Resize. Set your final cropping and resizing here.
HIT SAVE and don't save again till you're finished with pattern guidance.
Once again right click anywhere in the video Pattern Guidance->Set Min. Length
and set it to 5.
The default of 20 is too long. 10 is safe, real men use 5.
---------------------------------------
VFR
(setting no decimate the right way(tm))
---------------------------------------
Once you've found your sections you would like to no decimate, in the set
pattern dialog
(ctrl+t) set matches to 'c' and decimate to 'k' and then ctrl+s over the
sections in question to
set them all to the proper c matches.
Then at the start of the place you'd like to mark for no decimate hit o, go
find then end
(probably ctrl+up plus back one frame) and hit o again to mark the section for
no decimate.
-------------------------------------------------------------------------
Pattern Guidance
Non-Shitty Transport Stream Way
(your source is probably a dvd or a clean hard telecine transport stream)
-------------------------------------------------------------------------
It's time for magic and for you to lose your sanity. Remember this is a
practical usage guide
for ymc, yatta and pattern guidance. It will cover the most common types of
errors and sources
you'll probably deal with but I'm not psychic and every source is different so
ymmv with how
useful any of the following is.
Right click video -> pattern guidance -> pattern guidance -> are you sure? Fuck
yea. And with
that you'll be presented with a log, a log of all the nasty places everyone
would rather ignore.
So now that we have matching failures what exactly do we do with them? Well
it's sort of
obvious if you understand patterns but this should provide information on
common reasons for a
matching failure and how to deal with them. The first thing to understand is
that matching
failures go the end of the ORIGINAL failing section so be sure to keep that in
mind as you might
add sections.
Common Reasons for a Matching Failure:
* Bad scene change detection (oops SCXvid missed something)
* Fade to black/white and then from black/white
* Pattern change in the middle of a scene (fun game, guess where the
pattern change occurs)
* Metrics get kind of funky in pans (get your funk on)
* Not enough info from metrics for PG (really low motion)
* Plain old fucked up source (even yatta can't work miracles)
* Crossfade (two overlapping patterns, annoying as fuck sometimes)
The following is going to be a sort of step by step guide into fixing the
failures defined
above. I'll go through each one by one and common ways to fix them. Remember
there is always
more than one way to do things and I may only cover the most common way (or
most sane way).
Some of the ways I go about things are personal preference although if there is
multiple ways of
dealing with something I will try and provide some insight.
*ATTENTION* Please always look through the entire original failing section
before doing
anything to understand WHY it's failing. If you don't understand why a certain
section is
producing a matching failure you're doing it wrong(tm) and this guide is pretty
useless huh.
If for some reason one of the two halves fail then look for the reason why
(could be any of
the reasons listed at the start of this section).
Create a new section at this point and try to run local pattern
guidance over these two
new sections. If you didn't get any new failures then you're good. If
so you picked
the wrong place OR there may be more pattern changes.
Unless you're fucking pro and can spot patterns in the matches a mile away
or can see it in
the 12 or less fps motion that's going on sometimes just keep at it till
you've the pattern
change(s). It's a relatively easy thing to fix so if it's causing you
trouble you're doing
it wrong(tm).
Find yourself the first of the two dup frames. ctrl+t to bring up the set
pattern dialog.
cccnn -> <TAB> -> kkkkd -> <ENTER>. ctrl+s until the decimated frame is
the current frame.
You can check around to see if you got it right. It also may not be a bad
idea to check the
last frame in the section (ctrl+up + left arrow once) to see if it's combed
but if you don't
do that you'll catch it later during high vmetric search anyway.
REALLY LOW MOTION (SQUINT TO SEE THAT MOUTH MOVE WAY OFF IN THE DISTANCE):
This is basically "find the right pattern". So ctrl+t -> cccnn -> <TAB> ->
kkkkd ->
<ENTER>. ctrl+s at the beginning to set our first pattern, advance until
you see any
combing. ctrl+s until that combing is gone and so one and so forth until
there is no more.
Congrats you found the right pattern, easy right?
You should always section off the crossfade from the rest of the stuff. So
you're left with
three different sections (beginning with one, the failing one):
1.) Stuff before the crossfade
2.) The crossfade
3.) Stuff after the crossfade
This would be sectioned off something like: New section at start of
crossfade, new section
at end of crossfade plus 1 frame.
You can run local pattern guidance (ctrl+alt+g) on 1) and 3) leaving you
just with the nasty
bit which is the crossfade itself. There are a few different approaches to
dealing with it.
There are basically 3 different types of crossfades. Two are easy to deal
with and the
third is a bitch.
1.) Crossfades where one or both halves is static.
2.) Crossfades where the patterns match up (doesn't even show up as
matching failure!)
3.) Crossfades where there are two different patterns overlapping
You could run into something which doesn't fall into any of these
classifications (evul
24fps overlapping with 30fps?) but the above are the most common. These
various types of
crossfades can and should be addressed differently. All crossfades except
3a) and 3b) will
be 'perfect'. 3a) might have a wrong decimation somewhere but will still
appear fine on
playback. 3b) is the only one where you may run into trouble with
stuttering on playback
which is what we try to minimize when doing it in yatta.
If both halves are static and you're asking why does it show up as a
matching failure
you don't understand how patterns work. The stuff before the
crossfade was one pattern
and the stuff after the crossfade was a different pattern. Since it's
all one section
it can find a common pattern accross the entire original failing
section.
#3a - CROSSFADES WHERE ONE OR BOTH HALVES IS 12FPS (OR LESS) MOTION:
If one halves of your crossfade is 12fps motion (or less) and the
other half is full
24fps motion then set the pattern of the crossfade to that of the
24fps motion
section. Then postprocess the crossfade with something like nnedi3.
If both halves are 12fps motion or less then you can just section it
off and apply
local pattern guidance to the surrounding sections and just
reblend/vinverse the
crossfade itself and leave any patterns alone.
-----------------------------------
Stuff After Normal Pattern Guidance
-----------------------------------
There's some general stuff you should do after pattern guidance. There may be
some combing
remaining because pattern guidance barfed on a scene, the last frame of a
section doesn't have
the right match or there may be some unnecessary post processing going on in
sections that
didn't get some love from pattern guidance because they were too short.
After you finish pattern guidance you can finally hit save too (although I hear
in recent
versions of yatta the log gets saved now but whatever, you're a man and you'll
do it like it's
been done for generations).
If you're satisfied with what you've got in the right click menu you can save
all overrides and
everything will be generated and saved for you. Save, quit, load avs and
enjoy.
------------------------------------------------------------
Pattern Guidance
My Source is a Nice Transport Stream with fake soft telecine
(constant pattern between commercials)
------------------------------------------------------------
Ok so it's not really soft telecine (because if it was you could just do force
film in
dgdecode/dvd2avi). I guess this section applies to soft telecine dvd's too if
that's your thing
but force film is cool too (for that).
With this kind of source when you're collecting metrics you really don't need
the matches from
TFM (it's a waste of time) so you can just use cutter->telecide->scxvid-
>decimate. Actually you
probably don't even need SCXvid since we'll be making our own sections anyway.
Just
cutter->telecide->decimate should be very quick (10 minutes on an i7).
When you load it just create section start points where all the commercials
breaks were and
perform local pattern guidance (ctrl+alg+g) on these 4-5 sections and you're
done. You're not
running pattern guidance from the right click menu because it's not necessary.
You still should do a vthresh search, I've had some combed frames here and
there (they can be
just a random frame for not apparent reason) despite the seemingly constant
pattern. I've also
had some here the there was one scene that something was done too which caused
it to have a
different pattern then the rest (but it won't error because the section we ran
PG on is so
large) but you'll find it with a vthresh search.
Fix any other junk that needs to be fixed, filtered, whatever, and save that
shit.
-----------------------------------------------------------------
Pattern Guidance
My Source is a Shitty Transport Stream with o9k Matching Failures
(because Mentar said so)
-----------------------------------------------------------------
So your source is a transport sream but it's really shitty (Zero no Tsukaima -
Princess no
Rondo) and pattern guidance produces over 9k matching failures. This type of
pattern guidance
is only meant for those types of really shitty transport streams which are hard
telecine to
boot.
To start off with before you run pattern guidance make sure all your shit is
set up and make
sure the min. length for pattern guidance is 5. Second make sure your vthresh
search is
difference on both sides and set to 30. Whether show too short sections is on
doesn't matter
and you'll see why in a minute.
Apply pattern guidance. Proceed to close the log (yes we're ignoring the log).
Right click menu -> Recalculate Matches -> Select lowest vmetric at section
bounds:
Enter 50 for the threshold.
This threshold is the vmetric threshold for when it gets triggered, so
if the vmetric
for the last frame of that section is >50 then chose the lowest vmetric
out of the
matches.
Search for high vmetrics and fix any problems you might encounter (you'll
encounter any number
of problems listed in the previous pattern guidance section). The idea here is
that you'll
encounter any of the actual problems during the vthresh search. Do the same
for
postprocessed frames with M.
Protip: if you don't feel like using vinverse if you put gradfunkmirror() after
resizing to
1280x720 (or lower) it'll deal with any telecide combing (combing on fades) and
kill two birds
with one stone.
Save all overrides, save, done and give praise to the Germans.
---------
CHANGELOG
---------
------------
CREDITS
e-penor time
------------