Author Topic: Bleach  (Read 4614 times)

Offline kuchikirukia

  • Member
  • Posts: 58
Re: Bleach
« Reply #20 on: October 20, 2014, 01:13:46 am »
Why does MeGUI insist on forcing the opening to 23.976FPS?  This is frustrating.

In order to get the OP to work, I need to send it though Handbrake because I can't find a detelecine/decomb/decimate filter combination for AviSynth that doesn't either force the whole thing to 23.976FPS or doesn't unnecessarily blend the 30fps progressive frames, then run a custom script to bypass MeGUI setting a fpsnum/fpsden.
I'm not thrilled because I'm worried that even the lossless setting on Handbrake will incur dithering errors since it's 8 bit, but I'm out of ideas.

E: NOOOOOO!  The audio doesn't line up.  Why doesn't the audio line up?
26FPS CFR?  What is this thing doing?
« Last Edit: October 20, 2014, 01:51:55 am by kuchikirukia »

Offline Krudda

  • Member
  • Posts: 10322
  • 私は 日本語 が 上手 じゃ ありません
    • My Anime List
Re: Bleach
« Reply #21 on: October 20, 2014, 01:55:06 am »
Because it is 23.976?

In AviSynth use Tivtc_TFM().Tdeint()
Problem solved.
Of course, you require the .dll files associated.

If the file actually is 29.970 (credits anyway) there are filters to fix that, or you can simply drop the Deinterlacing.
« Last Edit: October 20, 2014, 02:00:00 am by Krudda »

Offline kuchikirukia

  • Member
  • Posts: 58
Re: Bleach
« Reply #22 on: October 20, 2014, 02:34:17 am »
Because it is 23.976?

In AviSynth use Tivtc_TFM().Tdeint()
Problem solved.
Of course, you require the .dll files associated.

If the file actually is 29.970 (credits anyway) there are filters to fix that, or you can simply drop the Deinterlacing.

It's hybrid.  Parts are 24fps progressive.  Parts are 30fps progressive.  Parts are 30fps 3:2 and so need detelecining to 24fps.

24fps

30fps no telecine:

30fps telecined:


Oh, and to add insult to injury, the first second of the opening is almost completely interlaced.

Handbrake can handle the detelecine and give me a good 24/30 Variable Frame Rate progressive file, but Avisynth then destroys it trying to make it Constant Frame Rate.  Trying to detelecine in Avisynth doesn't work as it either decimates the 30fps progressive down to 24CFR, leaves 24fps dups in to raise to 30 creating jerkiness, or when it does a proper hybrid output, tdecimate BLENDS the 30fps progressive frames for no freaking reason!
E: (on second look, I don't think I've ever gotten a proper VFR out.  I think it's blending because it's trying to do 28/26FPS CFR)
« Last Edit: October 20, 2014, 06:12:51 am by kuchikirukia »

Offline Krudda

  • Member
  • Posts: 10322
  • 私は 日本語 が 上手 じゃ ありません
    • My Anime List
Re: Bleach
« Reply #23 on: October 20, 2014, 02:42:37 am »
Oh hybrid... I h8 hybrid and haven't a clue so you're on your own.

Ihni suggestion: YATTA?
« Last Edit: October 20, 2014, 02:44:08 am by Krudda »

Offline Desbreko

  • Member
  • Posts: 614
Re: Bleach
« Reply #24 on: October 20, 2014, 02:50:14 am »
There's been some threads in the Uploaders' Forum about how to handle variable frame rate material. I'd suggest looking at those.

Offline kuchikirukia

  • Member
  • Posts: 58
Re: Bleach
« Reply #25 on: October 22, 2014, 11:11:02 am »
So, I take it its ok to tailor encoding settings for certain episodes?  8, 9, and 17 have rain that was getting a little smeared so I dropped the Undot() and brought crf to 12 to get "individual raindrop" quality.  It bumps the episodes from 150MB to 200-225 without any apparent difference except for an ever-so-slightly more "full" rain, but considering the emotional weight of the sequences I want to give them all they need.

I'm thinking of pushing the Zaraki, Yoruichi/Soi Fon, and Byakuya fights to crf=12 just to make sure nothing there is starved of bitrate.

But I do have to say, this H.264 is a miracle of the universe.
« Last Edit: October 22, 2014, 12:02:52 pm by kuchikirukia »

Offline cold_hell

  • Member
  • Posts: 351
Re: Bleach
« Reply #26 on: October 22, 2014, 12:36:52 pm »
Isn't increasing --qcomp (and probably reducing ip/pbratio) better for nonstatic scenes than just reducing the CRF?
qcomp 0.6 gives you very low quantizers (high quality) on statics and leave the scenes with motion,grain,rain bitstarved to death.
Reducing the CRF will give them even lower quantizers just for the sake of few more bits in the scenes you want.

Edit: I'm not sure if my theory is correct or not, but it won't hurt you to test it if you have some free time
« Last Edit: October 22, 2014, 12:38:56 pm by cold_hell »

Offline Krudda

  • Member
  • Posts: 10322
  • 私は 日本語 が 上手 じゃ ありません
    • My Anime List
Re: Bleach
« Reply #27 on: October 22, 2014, 01:57:00 pm »
What settings are you using with crf 12 aand still get such reasonable filesize?
If I used crf 12 I'd end up with a file over half a gig...

Offline kuchikirukia

  • Member
  • Posts: 58
Re: Bleach
« Reply #28 on: October 22, 2014, 02:00:14 pm »
Ah, so pushing it more towards a constant quantizer, eh?  Since CRF apparently boosts the quantizer to static areas and I don't want to lose quality there, I'll give it a whirl at CRF=13 and qcomp=.9 and see what that does to static vs motion bitrate.
e: Hrmm, that's going to be pushing 400MB.  Let's try 14 and 0.8.  Ran it through and 13/.9 is 270MB.  The projected file size at 25% complete was way off.
I have no idea why the huge difference, but it looks like 14/0.8 going to put me at ~200-220MB.  30 more minutes 'till it's done and I'll see how the bitrate breaks down.

What settings are you using with crf 12 aand still get such reasonable filesize?
If I used crf 12 I'd end up with a file over half a gig...

With AviSynth 2.6 MT and MeGui's FFMS thread count set to 2 on a quad-core:
Code: [Select]
LoadPlugin("C:\Program Files\MeGUI_2507_x86\tools\avisynth_plugin\TIVTC.dll")
LoadPlugin("C:\Program Files\MeGUI_2507_x86\tools\avisynth_plugin\RepairSSE3.dll")
LoadPlugin("C:\Program Files\MeGUI_2507_x86\tools\avisynth_plugin\aWarpSharp.dll")
LoadPlugin("C:\Program Files\MeGUI_2507_x86\tools\avisynth_plugin\RemoveGrainSSE3.dll")
LoadPlugin("C:\Program Files\MeGUI_2507_x86\tools\avisynth_plugin\mt_masktools-26.dll")
Import("C:\Program Files\MeGUI_2507_x86\tools\avisynth_plugin\edgecleaner.avsi")
Import("C:\Program Files\MeGUI_2507_x86\tools\avisynth_plugin\lsfmod.avsi")
SetMemoryMax(1400)
<input>
tfm(order=1, mode=5).tdecimate(mode=1)
RemoveGrain(mode=1)
crop(4, 0, -4, 0)
Bicubicresize(640, 480)
lsfmod(ss_x=1.5, edgemode=1, strength=100, soft=0, soothe=false)
lsfmod(ss_x=2.0, edgemode=1, strength=200, soft=0, soothe=false)
Edgecleaner(strength=20, smode=1)

Code: [Select]
[Information] [10/22/2014 3:32:06 AM] Job commandline: "C:\Program Files\MeGUI_2507_x86\tools\x264_10b\x264-10b.exe" --preset veryslow --tune animation --crf 12.0 --deblock 3:3 --keyint 240 --no-fast-pskip --qpfile "E:\Video\BLEACH_DISC_02\zlzhahva.s3t\title00 (1)-008.mkv - Chapter Information.qpf" --sar 1:1 --output "E:\Video\BLEACH_DISC_02\zlzhahva.s3t\title00 (1)-008_Video.264" "E:\Video\BLEACH_DISC_02\zlzhahva.s3t\title00 (1)-008.mkv.avs" 

OP and ED are stripped so these file sizes are for 20 minutes.

Audio takes up 23MB of the mentioned file sizes at QAAC Q=91 VBR. (160kbps average)
« Last Edit: October 26, 2014, 12:19:44 pm by kuchikirukia »

Offline kuchikirukia

  • Member
  • Posts: 58
Re: Bleach
« Reply #29 on: October 22, 2014, 06:26:09 pm »
crf=12, qcomp=6:  Average: 1262; Peak: 11466 (212MB)
crf=14, qcomp=8:  Average: 1131; Peak: 12008 (193MB)

14, 0.8 seems to be a little lower on the low end than default crf=14, while much higher on the high end.  Default crf=14 is Average: 798; Peak: 9081. (144MB)

Offline Desbreko

  • Member
  • Posts: 614
Re: Bleach
« Reply #30 on: October 22, 2014, 07:57:42 pm »
If you're happy with the quality of low-motion scenes at a given crf but you want high-motion scenes to get more bits, then yeah, just raise qcomp instead of lowering crf. Good qcomp values are mostly in the range of 0.6 through 0.8.

But before that, I'd stop using tune animation and deblock 3:3. The low aq-strength and psy-rd values that it sets, along with the strong deblocking, are probably the main reason the rain is getting smeared even at such a low crf.

For most anime, I leave deblocking and aq-strength on the defaults (except when using aq-mode 3, in which case 0.8 is comparable to aq-mode 1 at 1.0), and psy-rd 0.8:0.05 (or 0.8:0.1 for 8-bit encoding) works well for most sources.

Offline Zalis116

  • Box Fansubs
  • Member
  • Posts: 4406
    • ReDone-Subs Founder & Sole Member
Re: Bleach
« Reply #31 on: October 22, 2014, 09:04:15 pm »
Quote from: Shreevatsa
It's very good for its file size with no overbloating, no dual audio & no ridiculous upscale either. I think it is a perfect encode in every way.
Why does "no dual audio" make it inherently better, let alone "perfect"?


Got any old fansubs on HDD/DVD/CD? Please take a look at this thread.

Offline Krudda

  • Member
  • Posts: 10322
  • 私は 日本語 が 上手 じゃ ありません
    • My Anime List
Re: Bleach
« Reply #32 on: October 22, 2014, 10:39:21 pm »
Quote from: Shreevatsa
It's very good for its file size with no overbloating, no dual audio & no ridiculous upscale either. I think it is a perfect encode in every way.
Why does "no dual audio" make it inherently better, let alone "perfect"?
Because he's clearly a snobbish prick who only considers Japanese + subs any good and says 'fuck you' to the opinion of others.

Offline der richter

  • Former Staff
  • Member
  • Posts: 1235
  • Judgment
Re: Bleach
« Reply #33 on: October 23, 2014, 12:37:03 am »
thx for starting a pointless rant, like so often about that topic. just stop with the off topic.

get over it and accept that there are people who don't have a use for the dubs, and for those such releases can be 'perfect' in their opinion. it has nothing to do with being a 'snobbish prick' (really no need to be offending here). if you also consider that not everyone is a native english speaker, english dubs (considering they are the majority of all dubs) have even less value.

Krudda with your comment it's you who says "fuck you to the opinion of others", because you don't allow him his opinion. nice double standard there.

[edit]
i had no idea how dumb you can be. "i am not gonna post off topic after this, but now i will do it once again" bullshit. really if you want to tell me something do it per PM. the case you are describing is not even remotely relatable to what happened here. he just said "i think" (his own opinion) "that this is the perfect release" for him. he never said dubs are shit, don't include them (don't stock the red apples anymore), or anything of that sort.
« Last Edit: October 23, 2014, 03:59:52 pm by der richter »

Offline Krudda

  • Member
  • Posts: 10322
  • 私は 日本語 が 上手 じゃ ありません
    • My Anime List
Re: Bleach
« Reply #34 on: October 23, 2014, 02:01:53 am »
I won't post off Topix again after this, but please understand. I know he has his right to like or dislike dubs, its the attitude of "i don't like dubs, so they're inferior to everything, my opinion is the only one that mstters" that I was referring to.

Consider it this way.

A merchant sells both red and green apples. You like both, the other guy only likes green. He says to the cashier "red apples are bad, stop stocking them"
Well that's his opinion, but its not fair to you is it.
« Last Edit: October 23, 2014, 02:24:56 am by Krudda »

Offline kuchikirukia

  • Member
  • Posts: 58
Re: Bleach
« Reply #35 on: October 23, 2014, 01:11:31 pm »
But before that, I'd stop using tune animation and deblock 3:3. The low aq-strength and psy-rd values that it sets, along with the strong deblocking, are probably the main reason the rain is getting smeared even at such a low crf.

You're right.  While it needed more bitrate to bring out the finer drops, the Animation 3:3 was doing some smearing.  Switching to Grain brings out the rain on the grain that was being wiped away and HOLY SHIT OMGWTFBBQ THE BACKGROUND IS 30MB WORTH OF PEBBLES!!

Umm... hmmm, this has me rethinking some things.

Offline revo

  • Member
  • Posts: 814
  • I Can Only Carry 50 Loli's at a Time
Re: Bleach
« Reply #36 on: October 23, 2014, 02:17:56 pm »
do not use any tune options

Offline kuchikirukia

  • Member
  • Posts: 58
Re: Bleach
« Reply #37 on: October 23, 2014, 03:36:56 pm »
I went and fixed the avisynth script I posted since the way I had setmtmode it was doing nothing (looking in process explorer all the avisynth filter DLL's were being executed under a single msvcrt.dll thread and that was bottlenecking the encoding. With the update it spawns two avisynth.dll's).  I've been troubleshooting a problem where the encode gets 30MB in and gradually slows to a halt (while sitting there still taking 100% CPU) so I've been trying all sorts of things, and what I posted was seemingly not one of the smartest of them.  I think the bug was related to LSFmod's repair function since I haven't seen it since I disabled that with soft=0, soothe=false, but I haven't yet gone back to 4 threads in setmtmode while MeGUI's FFMS Thread Count is set to 0 (auto) or 4 so maybe it could be related to spawning too many threads there.
Went from 8.3 to 9.6FPS.  I'm now pretty well pegged at 100% on all 4 cores so there probably isn't more to be gained by adding more threads (at least with the amount of time x264 takes up at Very Slow), but I'll run some more tests and see.

e: 4 avisynth/4 FFMS threads works, but it seems to be a tad slower for me.  Sticking with 2/2.
So looks like it is something in the the Repair function of LSFMod's defaults that was causing it to fault with multithreading, since it works without them.
« Last Edit: October 23, 2014, 07:14:44 pm by kuchikirukia »

Offline mastrboy

  • Member
  • Posts: 44
Re: Bleach
« Reply #38 on: October 23, 2014, 04:12:23 pm »
Ok, no biggie that I need to do those endings separately since I found out the telecide filter I was using wasn't working right on any of the OPs and EDs so I needed to break them out anyway.

E:
What
The
Fuck.
The opening is made up of 24FPS progressive, 30FPS progressive, and 30FPS 3:2?
Ok, so now I have no idea what to do.  I guess I'll see what Handbrake does to it. 

The last encode I did was an rip of Blade in like '01.  It may even have been DivX, though I was messing around with Xvid at the time.  This is... just a little more complicated.
It's not unusual for Anime to have OP/ED with different FPS than the series, and in this case with mixed FPS you need to use VFR (timecode files in mkv) if you are a perfectionist.
There's a tool called Yatta-ivtc which helps you create avs and timecode files, but the learning curve is quite high, I often find that writing the timecode/avs files by hand is easier if the video isn't very long, which should be the case for OP/ED.

Edit: Bleh, forgot to read page 2 before answering, seems like others provided pretty much the same info... Sorry.
« Last Edit: October 23, 2014, 04:14:27 pm by mastrboy »

Offline kuchikirukia

  • Member
  • Posts: 58
Re: Bleach
« Reply #39 on: October 23, 2014, 04:59:34 pm »
Yeah, I see how TFM handles it now that all that "output file" stuff doesn't look so scary and now that I know how to insert a timecodes.txt into mkvmerge.