Log in

View Full Version : [Help]Output file size


Mikassi
6th October 2012, 22:08
Hey there. I encoded a 26min Dragon Ball episode using the following script and x264 settings:
Checkmate(tthr2=0)
RemoveGrain(1)
Dither2Pre(flt="FFT3DGpu(sigma=4)")
DitherPost()
TTempSmoothF()
GradFun2DBmod()
LimitedSharpenFaster(strength=255,edgemode=1).LimitedSharpenFaster(strength=40,edgemode=2)
vmToon(ssw=2,ssh=2,strength=60,xstren=128)
maa()
crop(16,0,0,0)
Spline36Resize(768,576)

--preset veryslow --crf 15 --level 5.1
The problem here is that the output file has 600mb. Probably I´m doing something wrong with x264 settings but with other animes this settings made 200mb episodes. How can I lower the size without losing quality? Thanks in advance and sorry if this is a stupid question but I'm new in this world.:D

LoRd_MuldeR
6th October 2012, 23:11
Well, you are using CRF mode. CRF mode is a "quality based" RC mode. Put simply, the CRF value specifies the desired quality level (roughly!) and the encoder will use as many bits as required.

If you want to lower the file size or lower the average bitrate (which is both the same) then you can either increase the CRF value or you can use 2-Pass mode instead of CRF mode.

In case you need to hit a specific file size (or a specific average bitrate), it makes more sense to use 2-Pass mode, because with CRF mode you never know the final file size (average bitrate) beforehand.

Note, however, that the quality of two files, one encoded with CRF and the other encoded with 2-Pass, will be the same, as long as both files come out with the same average bitrate (file size).

This means that neither CRF mode nor 2-Pass mode is better/worse per se! It all depends on what you are trying to achieve: Get the best quality out of a fixed file size or retain a specific level of quality.

As for you pre-processing in Avisynth: I see that you have "sharpening" filters there. Sharpening doesn't make the video more "compressible" (it does the opposite), so you may consider throwing that out.

Last but not least, reducing the bitrate (file size) and not losing quality are two contradictory goals! You obviously can't have both at the same time. You can only find an acceptable compromise.

J_Darnley
7th October 2012, 00:44
What a mess of filters! You remove dots, then you dither, then you blur all that away, then you dither again, then you smooth that out again!

I doubt you could see any difference if you removed:
RemoveGrain(1)
Dither2Pre(flt="FFT3DGpu(sigma=4)")
DitherPost()
TTempSmoothF()
GradFun2DBmod()

Alternatively, you can reconcile "high quality" and "low file size" by doing more of what you're already doing: just apply more blur.

Blue_MiSfit
7th October 2012, 22:08
If your chosen CRF (15) is resulting in files that are too big, either use a higher CRF number, or specify a target bitrate instead. 2 Pass VBR is of course preferable in this case.

You could also adjust your filter chain to produce a more compressible result, but that's a separate discussion.

Mikassi
8th October 2012, 20:21
Thank you for replies, problem solved.