arche 177 Posted August 20, 2017 Posted August 20, 2017 I am still very new to Handbrake and have been messing with the built in presets and trying to come up with a better compression for myself. I have attached one that I am testing now. I wanted to see if anyone could look at it and tell me if there is a better way for a better compression. I know there will be a little quality loss, but only want to use this on old tv shows that blu-ray type quality isn't necessary. I would like to stay in the 720p range. Also trying to keep it in a mp4 container. Right now the current preset will almost compress to half the size, so a 1GB mp4 file with get around 500MB. Using Handbrake Windows 1.0.7, it exported into a json file instead of a plist file. Any help would be appreciated. Had to put it into a zip file as json files aren't allowed to be uploaded. test.zip
Waldonnis 148 Posted August 23, 2017 Posted August 23, 2017 I'll take a better look in the near future, but two things caught my eye immediately and was wondering the rationale behind those choices... You're fixing the framerate at 60 rather than letting Handbrake/x264 use the source's framerate. It's not a big deal, really, and I can see why it could be beneficial in some cases and with some sources, but it's not a choice I see people making often so it made me wonder why. The other thing is the reference frame count. 10 is a LOT of reference frames, and actually exceeds the limit of your level choice (4.0's stored frame limit is 9, IIRC). You can probably cut the reference frame count in half and not notice much of a difference (for most material, I usually use 4-5 reference frames personally, but will go a tad higher sometimes). Some (older/cheaper/less capable) playback devices may not cope well with 10 reference frames, so it's something to think about. On to the real question, though: What's the goal? Are you trying to target a pseudo-visual-quality level or a specific file size/compression ratio? Everyone, including me, says "both", but that's not a realistic answer and we know it (who doesn't want lossless quality videos in a tiny file?) File size (and quality, really) is always determined by bitrate - and while the encoder has some tricks to alter how/where that bitrate is spent and for tweaking compression efficiency, you can't escape that reality. If you want a more specific file size, you really only have one option: reduce the bitrate. This could mean altering the CRF value or targeting a specific bitrate (highly recommend 2-pass for the latter). Further tuning can increase quality or compression efficiency to a certain extent, but usually not as much as turning those "big knobs". In my opinion, the best approach when starting to form your first encoding preset is to determine your storage constraints (at least for archiving/storage/disc authoring). If you have no constraints at all, then quality/bitrate/file size can be very high and you could just use a lossless encoding or just store the source itself. If you do have constraints (HDD space, DVD/BD limits, etc.), then figure out the largest your file can be and start trying to fit your output into that space by determining the bitrate needed to do so. Once you get in that ballpark, you can start tweaking analysis/GOP options so you can see what effect they have on your output quality- and size-wise. It takes time and you'll find some sources don't work as well with a given preset of options (I wouldn't use the same settings for anime that I would for a 70s-era grainy film, for example), but you can alter bitrates and analysis/quantizer constraints/tuning to account for those scenarios once you are familiar with what the settings actually do. It took me almost two weeks of scripted chain-encoding to formulate a handful of working HEVC/x265 "presets", to give you an idea, but barring some type of source material that I didn't account for, I don't have to do much outside of a few tweaks here and there I'm quite pedantic about detail/grain preservation, so I doubt most others would need such an exhaustive process to arrive at settings they like...so don't worry. Encoding for streaming is the same basic approach, except your constraint isn't space per se but rather the bitrate(s) you want to support...which makes it really easy. If direct playback (not transcoding) via Emby is preferred, then the bitrate limits of your playback devices/network will be something you'll need to consider as well - just to make sure you don't exceed the max your worst direct playback scenario can handle. Once (if) you get into encoding more, you'll probably find your list of presets gets longer as you add more for different types of sources (grainy vs. animated vs. action vs. dark...and so forth). Personally, if I'm not heavily space-constrained, I prefer a CRF-based encode with a ton of tweaks specific to the source material. With some sources, this means my compression efficiency is rather good, but some sources just don't compress well compared to others using the same settings. For example, I just encoded Alien and Aliens last week (BD-sourced; both similar source file sizes) for using one of my "generic" presets for both - Alien ended up being about a quarter of the source's file size and bitrate, but Aliens was much bigger at a little over half of its source's bitrate/size. There's a lot of reasons for that, but such is the way of "quality"-based encoding...seems illogical at times, but some sources are just more difficult and result in much larger files/bitrates. If I needed to reduce Aliens' bitrate/size, I'd probably start with altering the CRF, then look at my other settings to see if other changes may be needed. 2
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now