This project has moved. For the latest updates, please go here.

File Size Using Custom Profile - Newb Questions

May 15, 2016 at 9:09 PM
Edited May 16, 2016 at 3:06 AM
Hello All!

So I'm relatively new to MCEBuddy and need some clarification/confirmation on a few things.

I wanted to create a custom profile that would convert any source file (primarily WTV and MKV rips from BD) into a smaller MKV that retains relatively high video quality, has 1 bit-for-bit copy of original audio, and 1 audio track downmixed to stereo. I wanted to do it single-pass to keep the conversion time reasonable.

I based my profile loosely off the MKV High Quality profile. The changes to the profile I made are:
  1. Changed from 2-pass to single pass.
  2. Uses only Handbrake.
  3. On Handbrake video options, I replaced the bitrate (-b) option with the constant quality (-q) option and set to 20 (hoping to minimize file size and keep quality pretty high).
  4. Revamped the audio options to look only at the 1st source audio track, then encode 2 tracks on the output file. 1st track is passthru with sampling rate, bitrate, and downmix options set to auto. The 2nd track is encoded using AAC with sampling rate set to auto, bitrate at 160, and downmix set to stereo.
As far as MCEBuddy options, I used the following:
  1. Set width slider all the way to the right.
  2. Enabled the "Detect and optimize video quality" option (although not sure if that makes a difference with the above changes).
  3. Enabled multichannel audio option.
  4. Disabled "Select best soundtrack" option.
  5. Enabled hardware acceleration option (I have an Intel chip with QuickSync).
  6. Using Comskip donator version - detect ads only (will tweak EDL file for later removal).
  7. Using "USA Wilky13" custom comskip ini with a couple of my own tweaks.
So with all of that set, I converted a pretty big WTV file (3+ hour football game), about 21 GB total size. The whole conversion process finished in a bit over 3 hours and the quality seems to be great. However, the converted file is huge - about 41 GB! Almost double the original. I was surprised so figured I'd come here for some pointers. You can find the log file here:

LOG FILE

So here are my questions:
  1. Is this file size to be expected given these parameters? If so, which options are the biggest contributors to the big file size?
  2. How do my video and audio options look in general considering what I'm trying to accomplish? If not, are there other suggested options that would work as well or better and also possibly lower the file size?
  3. Am I correct to enable the "Detect and optimize video quality" option or should it be disabled? Or does it even matter in this case?
  4. Any other suggestions/observations that would improve file size without increasing encoding time in a big way?
I realize there are tradeoffs in time vs. quality vs. file size. I was just surprised the converted file was so large, so just trying to see if there is some little option/setting that is wrong or missing, if I need to take a different approach altogether, if I'm just dealing with the normal tradeoffs, or what.

Thanks in advance for any help/input, the product is very cool!!!

UPDATE: So I went in and changed the profile to 2-pass (didn't change any other parameters) and the ouput file was still over 41 GB in size. The only real difference I saw was of course the conversion took a little longer. I'm starting to think it's simply the constant quality setting driving up the file size.
May 16, 2016 at 6:22 PM
OK, so another quick update.

I re-ran the conversion for another try. I set it back to single pass, then removed the constant quality of 20 (-q 20), and added back in the bitrate option set to 1800 (-b 1800) just like the original MKV High Quality profile. So essentially running MKV High Quality with the audio options set like I want. File size was now under 6 GB, so the constant quality option is definitely driving up the file size.

I guess I'm looking for pointers on the best direction from here. My goal is to have video quality high enough that it is practically imperceptible from the original - definitely no tolerance for blockiness, pixelating, etc. - while shooting for a file size roughly half or less than original. I realize there are lots of variables and quality is somewhat subjective, so not necessarily looking for hard numbers on options, just advice on which direction to go. My options as I see them:
  1. Keep the average bitrate (-b) option in and increase as high as possible until I get acceptable quality and file size.
  2. Use the constant quality (-q) option and use the lowest possible value that gets me acceptable quality and file size.
  3. Use the default MKV High Quality profile video options (i.e. bitrate at 1800) and increase the quality slider until results are satisfactory.
  4. Some combination of the above or something else entirely - open to suggestions!!!
So anyone have any advice on which direction to proceed? I've learned a lot already and any additional help is much appreciated!
Coordinator
May 24, 2016 at 7:05 PM
If quality is your primary concern (and not conversion time) then would start with a high profile baseline, i.e. 2pass. It makes for very high quality files with a smaller footprint but takes an enormous amount of time to convert it. Constant quality is also a better bet than constant bitrate.

May 25, 2016 at 2:42 PM
Edited May 25, 2016 at 2:43 PM
@rboy1
Thank you for the response! I haven't had time to come back and post updates here lately, but over the last few days I've really dug into the various h264 encoding options. After playing with a bunch of different stuff, I've learned a ton more about impact of various options and how they affect quality and file size. A few high level things I've come to understand:
  1. Hardware encoding (i.e. QuickSync) is simply just not as "good" as software encoding - or at least it's not as efficient (from a compression standpoint) at a given quality/bitrate level. To get the quality I'm looking for in an acceptable file size, I can't seem to hit on a good set of options for QSV and always find myself going back to x264 instead.
  2. If you value quality over encoding time, constant quality is definitely the way to go once you understand all the other encoding options. Just as you suggested, I've found myself gravitating towards a high profile (and slower of course) baseline and then tweaking the options from there.
  3. It pays to really understand all the various options and the impact of each so they can be adjusted individually versus simply using the broad x264 profiles, presets, levels, and tunes. Yes, starting with a certain baseline close to your desired options is great (like you recommend above) but if you take the time to understand each option you can really dial in your conversions. I've learned a lot and glad I took the time to do it. Lots of good info and help out there if you're willing to dig in.
So where I am now is still running a few tests on some of the fine tuning options to make sure I know what I want. I think I'm going to wind up with a few different profiles for certain files. I'll probably have 1-3 for stuff I really care about quality-wise - like archived football games, BD rips, etc. - and then other "less intense" profiles for regular TV shows, etc. so they will convert faster. The flexibility of MCEBuddy really makes this pretty easy overall, so thanks for the good work!

I do have one question for you on your x264 options in the stock High Quality profiles. You set the "keyint" value to 25 and the "keyint-min" value to 20. Of course the x264 defaults are 250 and 25 and I've read some things that suggest too many keyframes adversely affect quality for a given bitrate. Is there a particular reason you use these values in your stock HQ profiles?

Also, here are some of the "tweaks" I've made so far (still playing around some) in an attempt to improve quality (and perhaps file size), knowing they might increase encoding time. I'd appreciate any comment you (or anyone else) might have in regards to the impact of these on overall quality and related encoding time:
  1. Changed me=hex to me=umh
  2. Removed partitions=all to allow Handbrake to set to default (should eliminate p4x4 which I understand to be of no concern on HD source)
  3. Changed keyint=25 to keyint=250. Changed keyint-min=20 to keyint-min=25 (x264 default values on both, see above question)
  4. Removed level-idc=40 to allow Handbrake to set to auto (I understand Handbrake will then set level based on all other parameters?)
  5. Removed nofast-pskip (turns on P-frame early skip detection). According to one source, can speed up encoding by as much as 20% with virtually no perceptible loss in quality (at reasonable bitrates).
Note: Using the tweaks, I unchecked the "Detect and optimize video quality" option. Is that the best course?

Thanks for your help so far and thanks in advance for any help/comments on the above. I've learned a lot already!