Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ajmichmac

macrumors member
Original poster
Mar 7, 2018
87
11
N.E. Michigan
What software is designed to reduce an MKV file to a specified SIZE in GB, without loss of video/audio quality? Need to be able to state the actual file size -- to "shrink to fit" on the media, with zero or minimal degradation. For example, how to slightly reduce a 25.4GB file to 25GB maximum, for that size of blank media. Would like to do so with MKV files up to about 30GB. (Over that size, I use the 50GB media). Experiments with VLC -- changing the output specs slightly -- have been unpredictable at best, and usually result in a drastically smaller file. There does not appear to be the option to just enter the size of the reduced file in any of many apps that I have tried.
 

lostless

macrumors 6502
Oct 22, 2005
488
103
The closest app that lets you set a maximum bit rate thats on mac is shutter encoder, if you do the math you can figure out the file size maximum. Handbrake lets you use an average bit rate, but that will still lead to unknown file sizes within a rage.
But if you are tying to do this without loss, it's impossible. There is loss anytime a video file is processed.
What is your end goal? Just burning a mkv/mp4 file to a blueray/dvd will not play on regular players. You need to authorize a disc.
 

arw

macrumors 65816
Aug 31, 2010
1,230
975
without loss of video/audio quality?
None such software exists for setting a target file size without reducing quality.
And a re-encode always decreases the quality.
You can try the compression > zlib setting for your streams in MKVToolNix.
And additionally remove unnecessary audio tracks.
If that is not suitable/enough, your only choice is to re-encode your video. I only have experience with Handbrake.
You can specify a target bitrate which leads to your target file-size (within a margin, as mentioned by @lostless ):
target file-size - size of audio/subtitle tracks
the result from above / length of the video in seconds = target bitrate
Use 2-pass encode to hit your target bitrate as best as possible.
 
Last edited:
  • Like
Reactions: T'hain Esh Kelch

ajmichmac

macrumors member
Original poster
Mar 7, 2018
87
11
N.E. Michigan
There is loss anytime a video file is processed. What is your end goal?
Thanks, I'll check out shutter encoder, and minimal degradation is all I really hope for. The discs will be played on a mac mini, so there's no need for stand-alone DVD player compatibility. Coincidentally, my Panasonic BD player can handle MKV files as well. I am settling for this after trying in vain to find something that could successfully convert MKV to the DVD/BD player standard... Seems all apps lose something in the process, while taking far too long, be it surround channels or subtitles or video quality.
 

ajmichmac

macrumors member
Original poster
Mar 7, 2018
87
11
N.E. Michigan
None such software exists for setting a target file size without reducing quality. And a re-encode always decreases the quality.
Thanks, I misspoke about no quality loss, only hoping to minimize it. Will try your suggestions as I have used Handbrake but not enough to deal well with the end file size problem. It sounds hit & miss and that's what I've had no luck doing so far! I swear that I've seen "fit to disc" apps before but maybe long ago, referring to audio files only. It is hell getting older, losing the details... ;)
 

HDFan

Contributor
Jun 30, 2007
7,286
3,335
OK, so you don't care about quality loss. But why do you want to reduce the sizes? Hard disks are cheap these days so you can store maybe 85 or so of maxed size 4K 85 GB files on a $150 8 TB drive, even more of 1080p or smaller 4K files. An 18TB drive goes for ~$279. If you plan to keep these files for a long time as display resolutions improve you want your archival copies to have the maximum resolution possible.
 

lostless

macrumors 6502
Oct 22, 2005
488
103
Thanks, I misspoke about no quality loss, only hoping to minimize it. Will try your suggestions as I have used Handbrake but not enough to deal well with the end file size problem. It sounds hit & miss and that's what I've had no luck doing so far! I swear that I've seen "fit to disc" apps before but maybe long ago, referring to audio files only. It is hell getting older, losing the details... ;)
I just wonder why you're concerned with file size? If you do handbrake and use the High quality presets, It looks pretty much just as good as the original blue ray rip (thats what im assuming the mkv files come from) at a significant file size decrease.
Th point of handbrake is to keep quality with as little bits as possible. It will adjust its bit rate based on the complexity of the video. Blue rays, on the other hand, use unessarly large bit rates, because they can and why not. And they know for sure there will be very little loss from the master. The disc is the limit.
But if you use handbrake and cant tell the difference, then its doing its job.
As Far as Blue ray authorizing apps, there isn't many on Mac. There's toast and apples own Compressor. That's about it. Both will adjust bit rate to fit on a disk. But you are right, the encode takes a long time.
 

ajmichmac

macrumors member
Original poster
Mar 7, 2018
87
11
N.E. Michigan
Hard disks are cheap these days... An 18TB drive goes for ~$279.
HDD drives fail too often. Recently lost a barely used 8T HDD, and I feel the spinning drive tech is near obsolete, favoring the speed of SSD. For archiving, I use optical discs.
 

lostless

macrumors 6502
Oct 22, 2005
488
103
As I said, I want to burn to [cheaper] 25GB discs with MKV files about 30GB or less. I don't want to use a 50GB disc for a 25.4GB file.
Got it, but with handbrakes quality based encoding, you could fit 3-4 (or more) movies per disk with virtually little quality loss. Each encode if using high quality can be 2-10 gigs. Depending on the complexity of the movie.
Either way the video needs to be reencoded to fit on a blue ray blank with near identical quality to the human eye.
 
Last edited:

Nermal

Moderator
Staff member
Dec 7, 2002
20,998
4,578
New Zealand
If the original file has multiple audio or video tracks that you can do without, then you can use something like MKVToolNix to remove them. This won't guarantee that it will end up below 25 GB, but could be worth a shot.
 

HDFan

Contributor
Jun 30, 2007
7,286
3,335
HDD drives fail too often. Recently lost a barely used 8T HDD, and I feel the spinning drive tech is near obsolete, favoring the speed of SSD.

HD failure rates, with some model exceptions, are low according to Backblaze data. SSDs eventually will replace hard disks, but right now high capacity SSDs either don't exist or are prohibitively expensive.
 

HobeSoundDarryl

macrumors G5
OP, all things considered, if file size reduction without noticeable quality loss is paramount, I'd run my mkvs through Handbrake. It is great at that and free. Yes, it can take a while but put 1+ in the queue before going to bed and you'll have 1+ compressed movies by morning. 30 nights = 30-60 movies. 90 nights = 90 to 180 movies. Etc.

And I'd re-consider my HDD (mis)perception. HDDs are very reliable. If you pardon the pun, the tech world mostly spins on HDDs. Upwards of all of the cloud storage in the world is spinning HDDs somewhere. Yes, any one of us can experience a dud... but that is as true with Optical, SSD, USB sticks, etc. Even chiseling hieroglyphics into stone is not a forever solution.

To combat loss of HB'ed media library stored on HDD, add at least one more HDD of equal size and regularly synch them. Odds in losing 2 HDDs at the same time is nearly nill. If you wanted the ultimate layer of data security, use 3 HDDs and always have one copy of your media library stored off site. Then, if the home burns down or is robbed, that off-site one restores the library.

Optical is NOT the long-term answer. It too is a "spinning" technology. And optical storage is not forever storage either.
Yes, you have a Panasonic BD player ready to use. But another option for an Apple person is to load their entire HB'ed media library into the TV app, turn on Home Sharing and add an AppleTV (box) to your TV. Then ALL of your media library is easily available on demand without having to find the right disc and insert it in the Panasonic. Anyone in your household could also enjoy the library on their iDevices too. There are few advantages to keeping them as MKVs burned to disc (DTS audio?).

A good dual or triple disc HDD media management strategy will be the most economical by far. If you use HB to compress your files, they'll look nearly as good (your eyes may not be able to tell) while resulting in much smaller files. Up to many hundreds of movies can fit onto a single, good-sized HDD which can be had for < $300.

Else, any concept that burning a single Optical disc is a forever solution is wiped out in the same fire, flood, theft, etc. So the optical strategy then needs dual burns of everything, (ideally offsite) storage of all of the extra discs, etc.

I keep a substantial library of all of my media on HDD hooked to my Mac. I regularly backup that HDD to a NAS elsewhere in the home. And, approx monthly, I also backup to another HDD then go swap it with another copy stored in a bank safe deposit box. My worst-case data scenario would be losing up to 29 days of new media should I lose all storage at home just before the monthly swap of off-site backup drive.

You might consider doing something similar. All things considered, it should prove a much better & affordable- but just as data secure- solution as what you are thinking with this optical-based approach. If in doubt, hybrid this suggestion with one backup to optical and 2 to HDD or 2 optical + 1 HDD. If you already own the original optical discs, you already have 1 optical backup.

I hope this is helpful.
 
Last edited:

HDFan

Contributor
Jun 30, 2007
7,286
3,335
And optical storage is not forever storage either.

I lost optical disks to "laser rot", but that was some time ago.

But another option for an Apple person is to load their entire HB'ed media library into the TV app, turn on Home Sharing and add an AppleTV (box) to your TV. Then ALL of your media library is easily available on demand without having to find the right disc and insert it in the Panasonic.

Simplest strategy is:

1. Rip to MKVs. Keep the original quality. Disk storage is cheap.
2. Follow a 3-2-1 backup strategy. One of these could be on-line.
3. Play via Infuse or Plex on your Apple TV or other devices.

This strategy should put you in good shape for new technology changes, such as 8K.
 
  • Like
Reactions: HobeSoundDarryl

ajmichmac

macrumors member
Original poster
Mar 7, 2018
87
11
N.E. Michigan
I'd re-consider my HDD (mis)perception. HDDs are very reliable... any concept that burning a single Optical disc is a forever solution is wiped out in the same fire, flood, theft, etc.
All your comments much appreciated -- tho my goal is not "forever" storage, and my HDD failures since my first 20 megger way back when have proven (to my satisfaction) that HDD tech is unreliable and I'm not interested in doubling or tripling up obsolete tech just to make up for the inevitable failure rate, at least with Seagate products. And HDD is slow if you want to do anything interactive (serious video editing requires SSD of course). Yes I can and have dumped 'archive' files on HDD for many years and I've had a server to projector home theater a long time now. I want to free what drives I have, including SSDs, using optical disks. They needn't last forever as I'm old and don't care. Anyway, Handbrake deserves another test run so thanks for the confidence in it... I'm impatient when it comes to trial & error file size reduction... but will look for ways within Handbrake to guesstimate the required maximum file size to fit a given BD disc, for example. Anyone up to speed with that app, please chime in if I am missing something about converting to a specific end result size. Thanks a heap.
 

HobeSoundDarryl

macrumors G5
You are sharing new information in this last post that was not in the original post.

We can agree to disagree on HDD reliability. I've got 20-year-old HDDs I recently dug out of retirement to test some hardware and they still work. And again, the bulk of "the cloud" is HDDs. Some will go bad... but that's true with SSD, optical and chiseled (on rock) storage too.

If you want to do serious video editing in a consumer rig, that's SSD and, even better, SSDs configured as RAID-0 for scratch, if not enormous banks of RAM. So with this desire in play, you should have BOTH (slow, big, long-term storage and fast storage for editing). However, I edit intense video on some big RAID-0 HDDs and as a RAID, it is plenty fast enough for my video editing. Of course, I favor SSD for even faster READ-WRITEs, but video files can get BIG and HDDs can deliver much more capacity than SSDs for big video edit files. Even with many little edits and renders of short-length video, one can fill up 4TB SSDs and need more space to finish a project. A big 16-20TB HDD leaves lots of room and a RAID of 2 or 4 of those is enough for motion picture length editing while also delivering fast READ/WRITE (faster than most editors can edit).

Unless there's been some major change in very recent years, optical is SLOW and not suitable for intense interactivity for video editing. Optical is another good, long-term storage medium. I'm not aware of fast Read-Write optical for something like video editing. Based on some perhaps dated knowledge of the 3, consumer-level video editing will most benefit from gigantic RAM, then RAID SSD, then SSD, then RAID HDD, then HDD and then Optical.

I'm quite HB knowledgable. As others have offered, there is no setting for targeting "filling a BD." HB and tools like it are generally revolving around leaving the resulting file size variable while preserving the quality as close as possible to the often gigantic MKV (or PRO-RES) original. So some files will end up big and some much smaller, even if runtime length of the originals are exactly the same. There's all kinds of reasons for this but generally, the goal is to preserve the playback quality while reducing the file size. That file size will be variable because that playback quality target is fluid. Complex video demands more storage. Simple video requires less.

You could play with settings to perhaps find a way to make a given movie compress down to just under a BD capacity. But then apply the same settings to the next movie and the resulting file size will be different. There won't be any settings that will always- say- target 94%+ of BD capacity. The only way to approximate that would be to tweak settings for every movie with best guesses, render and then adjust settings and re-render & tweak settings over and over until you find a settings combination for that ONE movie that is about 94%-99% of BD capacity. Then repeat for every other movie.

If you insist on going the Optical storage way regardless of this post, the HB strategy for that would be to find settings that render playback that meets your own judgement of "good quality" and then "bunch up" the rendered files to fit on a BD disc. A typical 2 hour movie might render well into as little as 1GB to as much as 20GB or so. If you were using BD Double Layer capacity at 50GB, a disc might be able to archive upwards of 49-50 1GB movies or 2 movies at 20GB with maybe a few small ones as "filler."

You could put optimal (for your eyes) HB renders into a folder until it is near 50GB and then burn all of them to an optical disc. Do it again for another batch. And again for another batch. Eventually, all of your movies might be on 10 optical discs or 20 or 50 depending on how many you have.

Will the Panasonic play H265 or H264 movies (rendered by HB)? Will it present you with some kind of on-screen menu when there is more than one such movie burned on a single disc? If you absolutely want playback on the Panasonic BD player, you'll need to test that to see what it will and will not support.

Or again, dump all of your HB renders into some form of big storage, hook an AppleTV to your TV and all of your movies will be available on demand without having to fetch any disc and insert it. A big HDD will hold hundreds of HB-rendered movies. One media backup HDD will avoid your "bad luck with HDD" scenario taking out your collection.

OR again, one HDD with AppleTV for easy access to all of it and all of the same renders also bunched up on Optical discs as a non-HDD backup in case bad luck with the HDD strikes again.

I do understand what you are trying to do here. But I'm pretty confident you are not going to find a time-efficient way to accomplish the objective. Nobody I'm aware of is trying to create such software to target maxing out BD capacity as you seek because- I would presume- not much of a market for that would exist. In short, you are fighting great currents here. You might be best served to alter the target and "go with the flow."
 

HDFan

Contributor
Jun 30, 2007
7,286
3,335
Talk to me when you have an 8T HDD completely fail with about two years use!

And HDD is slow if you want to do anything interactive (serious video editing requires SSD of course).

On my external HD RAID device the only thing Blackmagic says I can't do is 12K DCI ProRes 422HQ. Have no need of an SSD particularly since I have huge datasets which are not SSD cost effective.

We can agree to disagree on HDD reliability. I've got 20-year-old HDDs I recently dug out of retirement to test some hardware and they still work.

You had a bad experience. Sorry for that. But the failure rate data from Backblaze is based on thousands of disks and doesn't support your statement. If HD's were that unreliable then data centers whose customers demand 100% data prortection would not be HD based. SSDs are the future, no question about that.
 

ajmichmac

macrumors member
Original poster
Mar 7, 2018
87
11
N.E. Michigan
On my external HD RAID device the only thing Blackmagic says I can't do is 12K DCI ProRes 422HQ. Have no need of an SSD particularly since I have huge datasets which are not SSD cost effective.

You had a bad experience. Sorry for that. SSDs are the future, no question about that.
All of that taken to heart and thanks. However the question remains, since I'm asking about optical storage capacity vs video file length, how to simplify shrinking a huge file "to fit" on a given, say, 50GB disc. So far only Shutter Encoder has the option to specifify the resulting file size... but it craps out on huge files.
 

ajmichmac

macrumors member
Original poster
Mar 7, 2018
87
11
N.E. Michigan
optical is SLOW and not suitable for intense interactivity for video editing. Optical is another good, long-term storage medium. I'm quite HB knowledgable. As others have offered, there is no setting for targeting "filling a BD."
Yes I know, and the optical discs I'm burning are not for editing purposes, only for storage & occasional playback. The desire is for MY portability, once thought 'doable' with external HDD drives, but once bitten twice shy, now I shun HDD.
Will the Panasonic play H265 or H264 movies (rendered by HB)? Will it present you with some kind of on-screen menu when there is more than one such movie burned on a single disc?
Yes, and yes. However, the Pana lacks the latest audio codecs and simply reports that it cannot play the audio. I'm not that interested in compatibility with the Pana anyway, as I'll generally use a mac and optical drive to feed my HT projection system. Further, being used to a clear/sharp, near-4K image on an Epson 4010 PJ, I shun small MKV or other video files below about 4BG due to lack of detail... not important for some films of course, like older stuff that personally I don't look to for state-of-the-art playback (being short in the audio dept., most often, altho some remastered material is lovely). I have no need for Apple TV, finding media serving apps that work well like PLEX. Thanks again for the in depth replies, much appreciated.
 
  • Like
Reactions: HobeSoundDarryl

lostless

macrumors 6502
Oct 22, 2005
488
103
Your obsession with exact file size is going to drive you crazy. Try handbrakes hq or super hq setting and let your eyes be your judge. I’m sure with super hq, you won’t see any difference. Heck I can barely tell with the hq setting if at all. On fast you can start seeing some compression artifacts here and there but its what I use. But take the smaller file size because it’s the image quality and not always the file size that determines how good a movie looks.
 

ajmichmac

macrumors member
Original poster
Mar 7, 2018
87
11
N.E. Michigan
Thanks, yeah, I know... not exactly 'obsessed' but I want to fit to disc within reason, keeping the original file quality. Because these are projected on a 10 foot wide screen, the best quality does make a difference (since 4K and similar files look outstanding but the MKV file sizes are huge). I just need to mess with HB more than I have, it sounds like, to get a feel for what settings produce what sizes... a crapshoot, evidently.
 

lostless

macrumors 6502
Oct 22, 2005
488
103
just remember use your eyes. Don’t worry about file size. If your files are from Blu-ray’s, as said before, they don’t try to save bit rate. They will give a black screen the same bit rate as a very chaotic scene because they can. Handbrake will reduce the bit rate of that black screen to a very very low bit rate, but may use a similar bit rate to the blue ray as needed to keep the quality up to the setting you set. That’s why file size is not a goal to handbrake.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.