Log in

View Full Version : Reducing bit rate for old cartoons in CRF mode


Dust Signs
8th September 2009, 15:52
Hi,

I'm currently encoding some old cartoons (PAL DVD, 720x576 at 25 fps) which have been "digitally remastered" which means that some denoising and sharpening had obviously been applied beforehands. The material actually looks quite good but due to the sharp edges the file size is getting really huge when encoding with x264 in CRF mode. As I encode all my DVDs with CRF 16 so that they still look pleasant on a full HD LCD screen or TV I first tried to encode the cartoons with CRF 18 or 20 - but if I do so, I experience bluring and banding. Is there anything I could do regarding preprocessing (filters, x264's noise reduction, loop filter settings etc.) so that I get a decent output video at a decent file size (at the moment 4,05 GB with the movie being 65 minutes long)?

I appreciate any ideas
Dust Signs

nurbs
8th September 2009, 15:58
Have you tried --tune animation? If not it would be a good start. I can't tell how it will change the bitrate at a given CRF of course.

Dust Signs
8th September 2009, 16:04
I'll try that, thanks. According to http://git.videolan.org/gitweb.cgi?p=x264.git;a=blobdiff;f=x264.c;h=e79f9acc2b3486adbc8b958b1df4f6044616215a;hp=9aafc357930dc3821cc45eec0480f2f6324e15ed;hb=af2a4ecd7bcefc97c8aa83913c9a2980206f9cd0;hpb=72534d466a6bd99b9cbf32c74e667bea608c6dee it does the following:

+ param->i_frame_reference = param->i_frame_reference > 1 ? param->i_frame_reference*2 : 1;
+ param->i_deblocking_filter_alphac0 = 1;
+ param->i_deblocking_filter_beta = 1;
+ param->analyse.f_psy_rd = 0.4;
+ param->rc.f_aq_strength = 0.6;
+ param->i_bframe += 2;

Dust Signs

creamyhorror
8th September 2009, 16:22
CRF 18 should be enough for mostly any animation. Maybe you can post a screenshot of the blurring or banding?

LoRd_MuldeR
8th September 2009, 16:24
Reducing the grain/noise also is a method to reduce the bitrate requirement. You could try something like MDeGrain from MVTools (http://avisynth.org.ru/mvtools/mvtools2.html).

nurbs
8th September 2009, 16:27
You can look at MeWiki (http://mewiki.project357.com/wiki/X264_Settings) for the settings so you don't have to look at the source code if you want to know what the tunings and presets do.

Dust Signs
8th September 2009, 17:06
Thanks for all your replies so far. This is what the source usually looks like (no preprocessing besides cropping applied, there is only little or no grain; the image is saved as a JPEG with 100%): http://temp.dustsigns.de/Preview_AUK.jpg

Dust Signs