2011/03/23

そうか、cropしてしまえばよいのか

アニメをエンコードする人ならだれでも1度は悩んだことがあるであろうテロップでの誤爆問題。
その時だけ60fpsや120fpsにするのもなんだなぁ、と思っていたのですが、テロップがかくつこうが構わないのであれば判定にcropしたものを使ってしまえばよいのではないかと思い至りました。

具体的にはこんな感じで

元    :TFM(mode=1,order=-1,PP=7,slow=2).TDecimate(mode=1)

修正後  :temp1=TFM(mode=1,order=-1,PP=7,slow=2)
      temp1.CropBottom(200).TDecimate(mode=1,clip2=temp1)

判定にはtemp1をcropしたものを使い、実際に使うクリップはオリジナルのまま、という方法です。

以前はインターレース解除フィルタのTFMとTDeintでどう違うのかいまいち分からなかったのですが、昔調べた限りでは
http://forum.doom9.org/showthread.php?t=99420 より、
TFM is a field matcher. It's for progressive content.
If you have interlaced content there are no matching fields (except in static scenes, to be pedantic), so TDeint should be used.
In this context, fields "match" if they are sampled from the same temporal moment.
For interlaced video, all fields are sampled at different moments, so they cannot match.
ということなので、プログレッシブソースのアニメはTFMで良いと思われ。
TDecimateは逆テレシネフィルタです。1passのvfrにも対応していますが、誤爆するとそれが続くことがある、といううわさがあるのでどうせvfrをやるのであれば2passにした方がよいという話。

まぁ、あとDelogoも簡単でしたし、CMカット以外は自動でやってくれます。
・・・CMカットだけは面倒なのですが、logo判定をベースにした自動化フィルタとかだれか作ってくれませんかね。

(110523追記)
・・・なんかアクセスが増えた・・と思ったらいつの間にかnyaaさんのところに捕獲されていました。
いつも参考にさせていただいてます。m(_ _)m
ってかこんなど素人の考えを試していただいて申し訳ないです。
(110807追記)
ちゃんと調べると、TFM自体にオプションがありました。
y0/y1 -
These define an exclusion band which excludes the lines between y0 and y1 from
being included in the field matching decision. An exclusion band can be used
to ignore subtitles, a logo, or other things that may interfer with the matching.
y0 sets the starting scan line and y1 sets the ending line, all lines in between
y0 and y1 (including y0 and y1) will be ignored. Set y0 equal to y1 to disable.
ということで、y0/y1で範囲を指定するとそこの部分は除いて判定してくれます。

0 件のコメント:

コメントを投稿