View Full Version : Idea for fast first pass
Ranguvar
29th July 2008, 00:54
I'm using TemporalDegrain in a lot of my scripts now, and especially for Blu-ray movies, it's obviously quite slow. As encoding a lossless filtered video before encoding with x264 is messy and takes a lot of space, I was wondering if there would be much quality loss at all by using a different script for the first pass, like a fast 2D FFT3DGPU? This encode is going to take forever, so I'd like to hear the opinions of others before I test myself. I am using very high (2nd pass) settings (subme 7, trellis 2, me umh, 5 refs, etc.) so if it's going to make a substantial difference I won't use it. I thought of this because the output of the first pass already has all detail and grain obliterated anyways, so why bother handing it a finely degrained input?
Sharktooth
29th July 2008, 01:14
yes, very much (in regards to the quality question).
use a faster preset, like the DXVA HQ or even the Unrestricted 2pass Balanced (look inside the XMLs for x264 settings). subme 7, trellis 2, umh, etc. are just an overkill...
Warpman
29th July 2008, 01:15
why don't you use crf ? you only need to run it once and thats it... or you filter and save to a lossless codec like huffvuv or lagarith and feed this file to x264.
Sharktooth
29th July 2008, 01:18
megui has even an option for pre-rendering to huffyuv....
Ranguvar
29th July 2008, 01:31
yes, very much (in regards to the quality question).
Sorry, what do you mean? It will or won't impact quality much? And those settings are for the second pass; first pass is me dia, subme 1, etc.
Sharktooth
29th July 2008, 02:29
that the source should be untouched between passes or the encoder will go nutz collecting the wrong statistics and the result will be an ugly bunch of blocks.
Comatose
29th July 2008, 03:02
Just encode to lossless first. It's the best way to do it.
Even if you do CRF mode, it's going to be REALLY, REALLYYYYYYYYYYYYYYY slow.
Manao
29th July 2008, 06:51
that the source should be untouched between passes or the encoder will go nutz collecting the wrong statistics and the result will be an ugly bunch of blocks.Imho that's pure FUD. There aren't any conceptual differences between lowering input filtering for first pass, or lowering x264 encoding settings for first pass. If you have a high quality / slow denoiser and a low quality / fast denoiser, both set up to remove roughly as much grain, using the fast one during the first pass won't hurt.
foxyshadis
29th July 2008, 06:53
that the source should be untouched between passes or the encoder will go nutz collecting the wrong statistics and the result will be an ugly bunch of blocks.
That's not true. Sure, you can't give a source so different that it's practically a different movie, but you can replace a very slow degrain with a similar-strength very fast one. (For instance: TemporalDegrain or MVDegrain2 with Deen.) Stats are a very rough approximation, after all; I actually noticed more of a difference moving to full first pass than full degrain. Megui could even implement this for automated encoding.
If you use TemporalDegrain and have ANY suspicion that you might end up re-encoding, however, just make a lossless pass.
edit:haha, too slow.
squid_80
29th July 2008, 08:06
megui has even an option for pre-rendering to huffyuv....
I hope it uses gradient mode and not median.
Sharktooth
29th July 2008, 14:30
i dont remember. also i didnt code it. i have to check.
@manao&foxy: the problems start when you use a spatial denoiser and a temporalr denoiser like the example in the first post. they produce completely different results. you cant just remove the same amount of noise, coz they remove it in a different way and the encoder will collect incongruent stats.
RickA
30th July 2008, 20:04
Greets,
@ Sharktooth (and any others with knowledge on this), When you say "subme 7, trellis 2, umh, etc. are just an overkill..." would you please be kind enough to draw a line where you think the threshold to overkill begins and offer why? I think it would greatly help those of us who do not understand the inner workings as well as yourself. Even after reading several guides it is sometimes difficult to know what boundaries to stay within during our quest for quality. I had the impression it was wise to use such settings in order to use things like Psy RDO in an effort to approach max quality possible. Thanks.
Cheers,
Rick
Sharktooth
31st July 2008, 01:59
umh is not an overkill, trellis 2 is not properly an overkill (at least when combined with the right options).... subme 7, me tesa, merange 32 of even higher for umh... those are overkill
The reason is they give a small advantage but a tremedous endoding speed hit.
deawing a line means you want to know the best settings. there's no line and no besr, it depends on you and your conscience.
Ranguvar
31st July 2008, 02:12
IMO, they're not overkill. I can see a noticeable difference at low bitrates with them on, particularly trellis 2 and subme 7 thanks to Psy RDO. As for merange, it helps a ton in action-type movies with lots of fast movement.
I have a quad-core, GeForce 9600GT 512MiB videocard, and 2GiB of RAM; I'm fine with a "slow" (read: 24fps with bt=4, precision=2, etc. FFT3DGPU) second pass. I was just looking for a way to get a lot of speed during the first pass without sacrificing much quality at all, since back then I was using an MVDegrain-type degrain, and encoding was severely limited by the speed of that, to the point where the first and second passes had barely any speed difference. I'm now using a simple tuned FFT3DGPU for each encode, and encoding is perfectly fast enough for me, which goes at 15fps at the absolute lowest with a Blu-ray source.
I wouldn't say anything but me esa/tesa, merange 64, or 6+ refs for non-anime is overkill. Overkill is a little subjective. Perhaps those settings are overkill for wanting to do a fast denoise on the first pass instead, but I didn't know that until I asked ;)
Sharktooth
31st July 2008, 02:34
there's indeed a difference but is it worth the exrta time needed for the encoding?
sometimes yes and (that's why there's still an insane profile in megui) but in general it's not.
i mean, the insane settings should be used only when needed while "normal" settings shoiuld be always used except for the rare cases where insane settings......
Ranguvar
31st July 2008, 03:01
I'm a quality nut ;) Anything above 10fps on the second pass and 20fps on the first pass is fine with me. Maybe it's going overboard, but I run my PC 24/7, and these are all archival backups, not quick conversions for a standalone, so why not :)
RickA
31st July 2008, 04:48
Thank you Sharktooth very much for your insights on the settings. Greatly appreciated. I was not seeking an actual line per say or a best. You hit the nail on the head with the 'small advantage but tremendous encoding hit'. Precisely what I was wanting to know.
Glad you asked this Ranguvar, I too was thinking about ways to try to speed up the first pass as well.
Cheers,
Rick
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.