PDA

View Full Version : Black and white x264 Params (Newbie)


McArty
28th October 2009, 18:31
Hi, i've been encoding some sd dvds in color, but now am trying to encode my copy of Spellbound Criterion (archiving purpose) and is in black and white. The weird thing is i thought the bitrate was going to get lower than my other encodes, but is higher, maybe because there is grain present.

The command i was using for color (testing crf value until found optimal):

--crf 18.50 --ref 6 --no-fast-pskip --bframes 5 --direct auto --deblock -2:-2 --subme 10 --analyse all --trellis 2 --aq-strength 0.8 --psy-rd 1.0:0.0 --b-adapt 2 --me umh --merange 24 --thread-input --sar 40:33 --output


and the avs script:

MPEG2Source("E:\x264Rips\Spellbound\spellbound.d2v", cpu=0)
TFM().TDecimate()
Crop(8, 0, -8, -0)

Is there any specific x264 param that i should change for b&w?
How can i get rid of the grain (via avs or x264)?

Source Screenshot:

http://img340.imageshack.us/img340/2183/spellboundsource.png

Thanks in advance.

thewebchat
28th October 2009, 20:18
Well, judging from the screenshot you posted, there is quite a bit of detail in your black/white movie, so it's not surprising that the rate requirement would increase. As you said, older films tend to have more grain, so that could be a factor as well. But one thing that you must remember is that the color information only uses up 33% of the bits in a color video (YV12), and the color information usually has less detail than the luminance to begin with. For denoising, you should use whatever denoiser you usually use. Most only work on the luminance anyway. Lastly, you might add a Greyscale() to your AVS script, just in case there's any chroma noise present at all.

wyti
28th October 2009, 20:28
regarding your command line you probably have a lot of time (or a fast CPU) so i recommand you MDegrain2 (or MDegrain3 if you really have time :P), they remove a lot of grain with good detail retention.

Blue_MiSfit
28th October 2009, 21:02
I always run Greyscale() on any black and white content - just in case.

If you've got time to spare, and don't mind the visual difference, I'd second the notion of using MDegrain2, albeit at a gentle setting. Really grainy stuff with the default thSAD=400 sometimes doesn't fully remove the grain, but it does kill its movement. This ends up looking kind of strange :)

Also, any particular reason you're not using a preset for x264? I'd suggest something like the following:


x264.exe input.avs --preset slower --tune film --crf 18.5 --sar 40:33 --bframes 5


--tune grain instead of film, if you want to preserve the grain 100%.

Personally, I would do this - since it's a nice criterion release and I like to preserve them as close to the source as possible. Whats a few extra GB? :devil:

~MiSfit

McArty
29th October 2009, 01:04
Ok, thanks for all the advices, by the moment i'll take a look to the params Blue_MiSfit suggested, and then only if i see it necessary i will use MDegrain2.

And yes, as is for archiving purpose and a mediacenter, i would like to preserve the encode as close to the source as my low experience allows :-) My PC isn't a monster, but i dont mind waiting a day for the encode if the result is ok.

Im going to try an encode sample AGAIN, and AGAIN, and AGAIN :-)

Thank you for the prompt answers!

prOnorama
29th October 2009, 01:50
Personally, I would do this - since it's a nice criterion release and I like to preserve them as close to the source as possible. Whats a few extra GB? :devil:

~MiSfit

Right what's a few Gb? Personally I would not even bother ripping DVD's anymore: my entire DVD collection (ca. 280 or so) would fit on a 2 Gb HD, untouched, best quality, no hassle converting.

Blu-rays are another matter of course they eat away HD space much faster...

@McArty: I think you can do without chroma motion estimation on B & W movies so you could add --no-chroma-me and get a small speed boost

squid_80
29th October 2009, 02:42
Right what's a few Gb? Personally I would not even bother ripping DVD's anymore: my entire DVD collection (ca. 280 or so) would fit on a 2 Gb HD, untouched, best quality, no hassle converting.

Unless I'm misunderstanding something, I think you mean 2 Terabytes?

prOnorama
29th October 2009, 05:24
Hehe yes of course it's 2 Tb (maybe the slip-up is because I have seen the age of the floppy disc when a Gb still was humongous) :)

dstln
29th October 2009, 05:28
Yeah but having movies/commentary/subs in mkvs are so much cleaner than having vobs everywhere :P

And yes, older movies generally have a lot more film damage/grain. That combined with the higher bitrate/detail of criterion, and it's understandable and definitely happens. Honestly I've seen no significant bitrate loss going to b&w, probably for those reasons. There are a lot of things you can play around with though. --tune grain works well. You can also play around with ref/bframe number. it's likely that those movies are fairly stationary

And yeah, if you want to get rid of grain, you can use a good denoiser. While some are very good, there are no perfect denoisers that won't remove actual details, so if filesize isn't an issue, you could just go with the above hints to get the most out of it.

Blue_MiSfit
29th October 2009, 23:58
If you're not worried about filesize, but do want things smaller than your DVD (and muxed into an MP4 or MKV, or whatever you want, to conform with the rest of your collection), I'd just do this:


x264.exe input.avs --crf 16 --tune grain --preset slower --thread-input --output "output.mkv"


Edit:
After posting this, I realized it's very similar to the command line I suggested earlier. CRF16 is my usual default for total transparency when I don't really care about size. I use --crf 10 for mastering / near lossless :)

~MiSfit