Using ffmpeg to denoise (reduce film grain)
If you are patient enough, use the nlmeans
filter (it needs more time to denoise).
Alternatively, you can use atadenoise
or hqdn3d
video filters for fast denoising.
There are also other filters you could try, like vaguedenoiser
.
I would strongly advise you to pick a couple of representative frames from videos and then try to denoise it with those filters first, experimenting with different options of these filters, and picking the one that works best for your case.
Related videos on Youtube
jbbarnes77
Updated on December 20, 2022Comments
-
jbbarnes77 over 1 year
I have a large collection of movies I'd like to re-encode to both reduce size and improve picture quality. A large number are old black and white movies that are pretty grainy, but even titles through the 1980s can have excessive grain. This is aesthetically unpleasing and also increases file sizes.
ffmpeg has a ton of filters available, and it's hard to know where to start. Can someone recommend a filter with reasonable values to begin with?
My current settings:
ffmpeg -i in.mkv -c:v libx265 -c:a copy -crf 28 out.mkv
-
Admin about 4 yearsHoly cow, you aren't kidding about needing patience for nlmeans. The examples I looked up are very impressive, but at 1.5 fps on an i9-9900 it will take days. I'll be trying all your suggestions.
-
Admin over 3 yearsnlmeans is a very good feature of ffmpeg. Also nlmeans_opencl is an opencl accelerated equivalent. I used the nlmeans_opencl filter with a new NVidia GPU and got 10fps with default settings, and 18fps with p=5:r=11 which led to great results on 1080p captures of grainy film
-
Admin over 2 yearsThank you very much! For me hqdn3d seems better than atadenoise and as per the manual it does enhance compressibility and I observed some improvement in encoding speed too.