View Full Version : Near lossless x264 encoding settings for noisy 480p MJPEGs
grkn
16th November 2009, 22:16
A 16 min MJPEG from my Canon Powershot takes 3,2 GB of space. Not good. So I though I'd find a way to re-compress my "home videos" without loosing too much information.
So, which settings can I use in Handbrake to get a 5-10x compression, and keeping quality as high as possible? The movies often contain a lot of noise in dark areas, and I've found that default encoding settings in e.g. handbrake tend to take out too much noise and too much detail. Encoding speed is not important.
Dark Shikari
16th November 2009, 22:21
Start by upgrading to the latest Handbrake svn snapshot (http://handbrake.fr/snapshot.php). Then pick a quality level around 60-65% using the High Profile preset.
7ekno
20th November 2009, 09:27
Run the files through an Avisynth script, something like:
MCTemporalDenoise(settings="low")
To remove a little noise and soothe the grain to increase compressability, then run them through an x264 setting of your choice (start with --crf 18, adjust up to suite filesize / quality desired)
x264 --crf 18 --preset slow --tune film --level 4.0 (or whatever the target playback device dictates)..
7ek
benwaggoner
21st November 2009, 02:11
Hmmm. Are there any deblocking decoders for MJPEG? If it's block noise instead of low-light CCD gain noise, that would be computationally cheaper and a lot more effective.
Of course, bad source is generally bad in more than one way at a time :).
Reimar
21st November 2009, 11:26
Hmmm. Are there any deblocking decoders for MJPEG?
libavcodec exports the qscales for MJPEG, which means you can use MPlayer's deblocking postprocessing filters with it.
Blue_MiSfit
22nd November 2009, 01:05
That's a good plan!
If you can't get deblocking working satisfactorily (and you do have visible blocking in the source), then DFTTest is my go-to for standalone deblocking.
~miSfit
Reimar
22nd November 2009, 10:43
If you can't get deblocking working satisfactorily (and you do have visible blocking in the source), then DFTTest is my go-to for standalone deblocking.
I don't know what exactly DFTTest does, so it may have other advantages, but MPlayer's postprocessing filters can do "stand-alone" deblocking, too, you just have to give it a qp (quantizer) value if the decoder doesn't set it.
And there are a lot of different ones: pp, spp uspp, fspp, pp7.
Usually fspp is just fine, and while I don't know about quality I don't think you'll find a slower one than uspp (encodes and decodes each frame up to 256 times with different offsets with Snow and averages the result).
henryho_hk
23rd January 2010, 08:04
Use TGMC(tr3=3, NNEDI2) followed by selecteven(). It's amazing.
Blue_MiSfit
23rd January 2010, 11:02
I wouldn't suggest using a deinterlacer on a progressive source :)
I think the part you're interested in is MDegrain3 :D
~MiSfit
henryho_hk
24th January 2010, 06:06
MJPEG produced by digital camera is one of the worst footage in the world.... unstable, noisy, spatial and temporal aliasing, compression artifacts, etc.
TGMC is very powerful in countering all these....
7ekno
24th January 2010, 06:27
MCTemporalDenoise(settings="medium") would be faster (well, depends on GPU I guess) and far more effective on progressive material ...
Try it with same source and you will be amazed ;)
7ek
henryho_hk
24th January 2010, 06:48
MCTemporalDenoise is fantastic for DVD, DV, etc. while TGMC is even better for DC's awful MJPEG.
aegisofrime
24th January 2010, 07:00
I concur with using TGMC: Who cares if the purpose here is not what it's meant for? If the end results looks great then it justifies the means!
In any case, I use TGMC on noisy progressive material a lot myself.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.