Author Topic: Epic IY Encoding Fail (Help would be much appreciated! :])  (Read 1525 times)

Offline teainapot

  • Member
  • Posts: 16
Epic IY Encoding Fail (Help would be much appreciated! :])
« on: April 07, 2010, 07:02:05 PM »
So, as an Inuyasha fan, I bought the entire series on DVD (the season and movie boxsets, that is). To say that I hate the English dubbed version is a vast understatement. I also find the sub quality lacking, considering that the word "shikigami" is misspelled approximately 15 thousand times in the episode it's used (somewhere in the third season box set). I'm no expert, but I wouldn't call myself a noob. I want to rip each episode in as high quality possible (.mkv container; x264 codec with Vorbis audio), Japanese language only and then, OCR, retime, style, and obviously edit the subs. The latter part I can do easily, as I've taught myself how to work Aegisub, but I've ran into a road block with encoding. After months (months!) of using any freeware encoding program you can find, I finally settled on megui. Handbrake was my first choice, but I can't get it to deinterlace the video right. Megui deinterlaces the video perfectly, but the final encode looks like hell. I've tried any number of possible combinations to fix the problem, but just can't figure it out. Here's some screenshots using the first OP:

Original source (interlaced):
(click to show/hide)
(click to show/hide)

My encode (deinterlaced, specifically IVTC actually, I think this one is decomb with IVTC):
(click to show/hide)
(click to show/hide)

AHQ's encode (deinterlaced, from what I can tell):
(click to show/hide)
(click to show/hide)

What am I doing wrong and how can I fix it?
« Last Edit: April 08, 2010, 03:22:47 AM by teainapot »
Please PM me if you have the fansubs of Inuyasha episodes 1-80! =D

Offline Proin Drakenzol

  • Member
  • Posts: 2296
  • Tiny Dragon Powers of Doom!
Re: Epic IY Encoding Fail (Help would be much appreciated! :])
« Reply #1 on: April 08, 2010, 05:58:08 PM »
what kind of computer are you using? are you making sure to not do anything else with it (even d/l via bittorrent) while you computer is doing the encoding?

The linear nature of your Euclidean geometry both confounds and befuddles me.

Offline teainapot

  • Member
  • Posts: 16
Re: Epic IY Encoding Fail (Help would be much appreciated! :])
« Reply #2 on: April 09, 2010, 12:38:50 AM »
Toshiba Satellite A215-S5837. How would that affect it?
Please PM me if you have the fansubs of Inuyasha episodes 1-80! =D

Offline blubart

  • Member
  • Posts: 2349
Re: Epic IY Encoding Fail (Help would be much appreciated! :])
« Reply #3 on: April 09, 2010, 12:44:32 AM »
your system shouldn't affect the encoding result.
i was wondering: you wrote a lot about deinterlacing, but is it possible the release is simply bitrate starved and looks horrible because of that? which settings do you use for the actual encoding?

Offline teainapot

  • Member
  • Posts: 16
Re: Epic IY Encoding Fail (Help would be much appreciated! :])
« Reply #4 on: April 09, 2010, 01:53:32 AM »
Well, I found sharktooth's megui presets, and I've been messing around with those. After I finally bit the bullet (I don't like to mess with stuff I don't understand) and did some tweaking, it seems it was using VBR at 1000, and I changed it to CRF. That seemed to be the problem. I feel kinda bad for wasting everyone's time. *sheepish*

But, while you're here, what're some "sane" CRF values? I really liked what CRF 15 gave me, but it was 55MB for 1 minute, 35 seconds. This seems rather large.
Please PM me if you have the fansubs of Inuyasha episodes 1-80! =D

Offline vuzedome

  • Member
  • Posts: 6376
  • Reppuzan~!
  • Awards Winner of the BakaBT Mahjong tournament 2010
    • GoGreenToday
Re: Epic IY Encoding Fail (Help would be much appreciated! :])
« Reply #5 on: April 09, 2010, 07:32:49 AM »
CRF 15 will produce rather large files. Try 18 or 20.
BBT Ika Musume Fan Club Member #000044   
Misaka Mikoto Fan Club Member #000044
BBT Duke Nukem Fan Club Member #0000002

Offline Takeshi

  • Member
  • Posts: 5119
  • Animation whore
Re: Epic IY Encoding Fail (Help would be much appreciated! :])
« Reply #6 on: April 09, 2010, 10:38:03 AM »
I tried doing CRF with megui, but it's only one pass (one!) so I usually just use "Automated 2pass" with an analysis pass in the beginning. I feel like I am getting more compression so I don't mind the extra time. However, still trying stuff out so...

Offline blubart

  • Member
  • Posts: 2349
Re: Epic IY Encoding Fail (Help would be much appreciated! :])
« Reply #7 on: April 09, 2010, 11:40:29 AM »
i wouldn't go lower than crf16 (superb quality). crf18 should be enough in most cases. generally the higher the resolution the higher the crf value you can get away with without it starting to look bad. i most likely wouldn't go above 21/22 for a 1080p encode.

crf is not better or worse than a 2pass encode.
2pass encodes to a specific bitrate/filesize. this of course means that with the same bitrate 25 minutes of a static images would result in the same filesize as 25 minutes of high motion scenes - thus it's up to the encoder to decide which bitrate fits the specific source.
crf encodes by quality. predicting which scenes will be less "important" (because they are for example fast motion scenes where our eye wouldn't be able to track a super sharp and detailed picture). this can result in a huge filesize variance (which is not a bad thing per se, as it just means that specific episode requires more bitrate to keep the same quality). perfect for novice encoders and people who don't want to waste a lot of time (crf requires only one pass with only a marginally worse compression ratio compared to 2pass).
« Last Edit: April 09, 2010, 12:24:51 PM by blubart »

Offline Takeshi

  • Member
  • Posts: 5119
  • Animation whore
Re: Epic IY Encoding Fail (Help would be much appreciated! :])
« Reply #8 on: May 10, 2010, 10:18:03 AM »
@blubart; ;)

Funny facts:

I've done a 2-automated encode of Battle Royale I which lasted for 2x8 hours of pure encoding = a 1,26 GB file.
I've done a CRF16 encode of Battle Royale II which lasted for 9-10 hours of pure encoding = a 2,21 GB file.

Either there was a big demand of quality because of high-motion scenes in the second movie as opposed to the first one or this CRF has a bad compression ratio.

Battle Royale II would result in a final filesize of 2,61 GB when I add the audio track. That's fucking huge, but then again this is what CRF produces, right?

Personally, I've been looking for a way to achieve almost exact same quality on the DVD, but it kinda bumps me out that I have to present such big files in order for that to happen. I take it CRF1-15 would produce much bigger files with no apparent difference in quality?

Offline vuzedome

  • Member
  • Posts: 6376
  • Reppuzan~!
  • Awards Winner of the BakaBT Mahjong tournament 2010
    • GoGreenToday
Re: Epic IY Encoding Fail (Help would be much appreciated! :])
« Reply #9 on: May 10, 2010, 10:55:37 AM »
Just don't go below 16.
BBT Ika Musume Fan Club Member #000044   
Misaka Mikoto Fan Club Member #000044
BBT Duke Nukem Fan Club Member #0000002

Offline Daiz

  • Member
  • Posts: 297
  • 10-bit Librarian
    • Underwater
Re: Epic IY Encoding Fail (Help would be much appreciated! :])
« Reply #10 on: May 10, 2010, 12:15:46 PM »
(crf requires only one pass with only a marginally worse compression ratio compared to 2pass).

Actually it is not worse at all. The only thing that might be better than CRF alone is CRF first-pass with the target encoding settings (and obviously --slow-firstpass) and then doing a second pass using the final bitrate from the CRF encode, but even then the difference would be basically nonexistent. Any extra quality that you think 2-pass might give is basically purely placebo.

Quote
#x264 @ Freenode, 25th of February, 2010:
[17:43:35] <vlt> Hello. I want to encode some videos to h.264/avc.  I don't care for an _exact_ file size or bitrate, so I'd use "--crf".  Is it always better to use multipass encoding, i. e. will a multipass encoded video w/ the same _avg_ bitrate look better than the crf-encoded one?
[17:44:41] <Dark_Shikari> vlt: no it won't
[17:44:48] <Dark_Shikari> within margin of error.
[17:44:51] <Dark_Shikari> last test I did, crf won slightly

(Dark_Shikari is one of the leading developers of x264, just to note).

Funny facts:

I've done a 2-automated encode of Battle Royale I which lasted for 2x8 hours of pure encoding = a 1,26 GB file.
I've done a CRF16 encode of Battle Royale II which lasted for 9-10 hours of pure encoding = a 2,21 GB file.

Either there was a big demand of quality because of high-motion scenes in the second movie as opposed to the first one or this CRF has a bad compression ratio.
For live-action material, I'd say that CRF 16 is quite overkill. It's good for animated material, but for live-action DVD material I'd start from 18 and go up from there.

To determine a good CRF for yourself, the best approach would be to cut some intensive scenes together and encode that part many times while raising the CRF until you hit the highest CRF value where you are pleased with the visual quality. Then you encode the whole thing with that CRF.

Offline Takeshi

  • Member
  • Posts: 5119
  • Animation whore
Re: Epic IY Encoding Fail (Help would be much appreciated! :])
« Reply #11 on: May 22, 2010, 07:08:26 AM »
Funny facts:

I've done a 2-automated encode of Battle Royale I which lasted for 2x8 hours of pure encoding = a 1,26 GB file.
I've done a CRF16 encode of Battle Royale II which lasted for 9-10 hours of pure encoding = a 2,21 GB file.

Either there was a big demand of quality because of high-motion scenes in the second movie as opposed to the first one or this CRF has a bad compression ratio.
For live-action material, I'd say that CRF 16 is quite overkill. It's good for animated material, but for live-action DVD material I'd start from 18 and go up from there.

To determine a good CRF for yourself, the best approach would be to cut some intensive scenes together and encode that part many times while raising the CRF until you hit the highest CRF value where you are pleased with the visual quality. Then you encode the whole thing with that CRF.
So CRF16, as blubart pointed out, is the max CRF for anime. And CRF18, for example, will decrease the bitrate used, but will still divide its bitrates based on the scenes in the given anime or live-action?

I don't have a high-end pc to encode on so it takes quite a while for me to see some results. How much a difference is there between CRF18 and CRF23? I noticed that meGUI's CRF setting was set on 23 as default. I still have the impression that 2-pass encodes gives a better result + a smaller filesize.

But I gotta say, I find CRF more appealing in terms of how long it needs to encode. A 100min anime movie is only taking me 9 hours as opposed to the 1 day per pass.

Though I still have to figure out how to encode only cutted scenes.

I find it weird that you can't demux an audio stream, and then choose not to re-encode. No, you have to re-encode it according to meGUI. Forces me to demux no audio streams and then just demux when the encode is done and mux with mkvmerge. Logical since I want the original audio stream to add to my video encode, and not something meGUI wanted to re-encode....