View Full Version : Encoding parameters question
FirstBorg
16th December 2010, 10:33
Hello,
I'm in the beginning of encoding all of my dvd's, HD dvds and blu rays in order to have it on my disk for a more convenient watching :)
Anyways, Im using MeGui, and since I have no idea of proper x264 coding options, Im just using the x264 blu ray profile.
But it behaves a bit strange. I encoded a movie which runs around 2 hours 30. I am keeping the resolution, but crop the black borders, so the movie gets to something like 1920x800. Now, this encoded video stream has a final size of about 4.7 gb. Then I did another movie, around 20 minutes shorter, but 2 gb larger in file size of the encoded video.
Why is that?
And can you please suggest some x264 settings to lower the file size a bit without giving up much of the video quality?
thx
nm
16th December 2010, 11:15
I'm in the beginning of encoding all of my dvd's, HD dvds and blu rays in order to have it on my disk for a more convenient watching :)
Anyways, Im using MeGui, and since I have no idea of proper x264 coding options, Im just using the x264 blu ray profile.
Since you probably aren't going to put the videos back to Blu-ray, some less restrictive preset might be a good idea. "High-quality DXVA", if there's still such an option, would be suitable for GPU decoding.
But it behaves a bit strange. I encoded a movie which runs around 2 hours 30. I am keeping the resolution, but crop the black borders, so the movie gets to something like 1920x800. Now, this encoded video stream has a final size of about 4.7 gb. Then I did another movie, around 20 minutes shorter, but 2 gb larger in file size of the encoded video.
Why is that?
That's normal for "constant quality" encoding (CRF). The first video just compressed more, perhaps because it was less noisy or contained less movement. Frame size also matters, if the second video was full 1920x1080 instead of 1920x800.
And can you please suggest some x264 settings to lower the file size a bit without giving up much of the video quality?
Use less restrictive x264 settings than a Blu-ray preset.
Give up transparency:
Filter the video. If you are willing to remove grain, denoising will make the video much more compressible. MDegrain2 in MVTools2 is nice.
Use a slightly higher CRF value. CRF 20..22 is still quite tolerable, if you are using something lower now.
nurbs
16th December 2010, 11:22
The Blu Ray profile is a bad choice unless you need Blu Ray compatibility, since the options needed to achieve compatibility hurt compression efficiency. The DXVA High-Def. profile would probably be better for your use. I'd also recommend that you set the tuning in the profile to "Film" or "Animation" depending on your content.
The reason why your rips came out with different sizes is that MeGUI (and x264 itself) default to CRF encoding which gives you roughly constant quality (as long as you don't change other settings). Some movies need higher bitrate to achieve a certain quality than others. Your second movie was simply less compressible, so the encoder used a higher bitrate to compensate for that. The presets that come with MeGUI default to CRF 20. You can get lower bitrates (and quality) by increasing that number.
I'd recommend that you pick the DXVA profile, set the tuning to Film and then encode some short movie samples at different CRF values. Find the highest CRF which gives you acceptable quality and use that or lower it by 1 if you want to be at the safe side. People usually use CRF values in the range from 18 to 26.
Blue_MiSfit
16th December 2010, 11:54
Yep, toss the BluRay profile. I think the biggest pain point with it is the short GOP length required for BluRay (1 second vs up to 10+ seconds for typical encoding where seek performance isn't CRITICAL).
If the bitrate of your second movie was intolerably larger, you can either raise the CRF number or add a denoising filter / play with different x264 options. Feel free to post a "help" thread in Avisynth Usage or the MPEG-4 AVC forum!
Derek
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.