2017-12-19, 07:19 PM
I propose here to switch from veryslow preset to medium, retaining 99.7% of its quality and cut in half the encoding time (according to this page); I took previous settings found here, and added only --ref 4 to maintain BD compliance, and --direct auto to improve quality.
Of course, 0.3% of quality loss and encoding time cut in half would apply only to plain presets (i.e. without messing with other settings); if the encoding time will be only slightly reduced, there will be no need to use these settings; so, some tests are needed - volunteers are welcome!![Wink Wink](https://fanrestore.com/images/smilies/wink.png)
SETTINGS:
replace 25000 with the desired average bitrate, 24 in the keyint with the video framerate (24 would do for 23.976 and 30 for 29.97), Input_File.avs with an AviSynth script (or a video file), and Output_File.264 with the final x264 file.
You can use them directly with the x264 command line - just copy and paste pass 1 settings then, when finished, copy and paste pass2 settings - or save as .bat file
HINTS:
Of course, 0.3% of quality loss and encoding time cut in half would apply only to plain presets (i.e. without messing with other settings); if the encoding time will be only slightly reduced, there will be no need to use these settings; so, some tests are needed - volunteers are welcome!
![Wink Wink](https://fanrestore.com/images/smilies/wink.png)
SETTINGS:
Code:
x264.exe --pass 1 --preset medium --tune film --bluray-compat --level 4.1 --ref 4 --direct auto --keyint 24 --slices 4 --b-pyramid none --weightp 0 --sar 1:1 --colorprim bt709 --transfer bt709 --colormatrix bt709 --bitrate 25000 --vbv-bufsize 30000 --vbv-maxrate 40000 --stats ".stats" --output NUL "Input_File.avs"
x264.exe --pass 2 --preset medium --tune film --bluray-compat --level 4.1 --ref 4 --direct auto --keyint 24 --slices 4 --b-pyramid none --weightp 0 --sar 1:1 --colorprim bt709 --transfer bt709 --colormatrix bt709 --bitrate 25000 --vbv-bufsize 30000 --vbv-maxrate 40000 --stats ".stats" --output "Output_File.264" "Input_File.avs"
replace 25000 with the desired average bitrate, 24 in the keyint with the video framerate (24 would do for 23.976 and 30 for 29.97), Input_File.avs with an AviSynth script (or a video file), and Output_File.264 with the final x264 file.
You can use them directly with the x264 command line - just copy and paste pass 1 settings then, when finished, copy and paste pass2 settings - or save as .bat file
HINTS:
- these settings are good for 1080p video
- pay attention to the BD size: actual ones are 23.3GB for BD-25 and 46.6GB for BD-50
- allow about 7% overhead for the .m2ts container - for example, total file size (video+audio+subs) excluding eventual menus would be around 21.75GB for a BD-25, and 43.55 for a BD-50
- to retain grain, better to not go under 20/22mbps for 2.35:1 and 28/30mbps for 1.78:1/1.85:1
- max bitrate allowed for BD (video+audio) is 48000mbps, so if audio tracks total bitrate is over 8000mbps, you should lower video bitrate accordingly, in particular pay attention to --vbv-maxrate
- to improve speed, you can use for pass 1 a "simpler" version of the final file, for example without noise reduction, grain plate, color grading, but it should be otherwise identical - same frame numbers, same resolution etc.
- do NOT delete any temp files you get after pass 1 (.stats and .stats.mbtree) because they will be used by pass 2!!!