Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER General Discussion Forum

Reply
 
Thread Tools Display Modes
Old 10-19-2018, 05:35 PM   #1
tXShooter
Human being with feelings
 
tXShooter's Avatar
 
Join Date: Aug 2017
Posts: 336
Default How do you Pre- Calculate the Rendered File Size

As the title asks, how does one go about figuring out how big the file size will be (once rendering is done) based on the the settings of the "Render to File" dialog box, without actually rendering?

I need to email the final rendering of about 45 minutes worth of recording, and I'm having to cycle through renderings in between 70 and 30 on the quality selection in order to get the file size down small enough to email. This is taking up a lot of valuable time. But I am trying to preserve as much quality as possible, so I don't want to just automatically select 20 either.

Is there a way to get a better idea of what the setting should be to get the output under a specific size?
tXShooter is offline   Reply With Quote
Old 10-19-2018, 05:58 PM   #2
xpoes
Human being with feelings
 
xpoes's Avatar
 
Join Date: Mar 2017
Location: Australia
Posts: 128
Default

Don't have an answer to your question, but would it be an idea to upload the file to the cloud or a ftp-server or something similar and then send an email with the link?
That way you can save the file 100%
__________________
Xpoes
W10, latest Reaper, Intel Core i7 9700F (8x Core) @4.7GHz, NVIDIA GeForce GTX 970, 32 GB RAM, FluidAudio SRI-2, Nektar Impact LX61+
xpoes is offline   Reply With Quote
Old 10-19-2018, 06:45 PM   #3
JayJSE2
Human being with feelings
 
JayJSE2's Avatar
 
Join Date: Feb 2014
Posts: 310
Default

Quote:
Originally Posted by tXShooter View Post

Is there a way to get a better idea of what the setting should be to get the output under a specific size?
Is there a specific file format you're wanting to use? And is there a specific cap on the upload or are you just trying to get it as small as possible?

If you're wanting to keep it lossless, you could try .flac but it's probably still going to be a huge file

Otherwise, your best options are vorbis/opus VBR. I've just done a quick test rendering out a mix of a 2:47 song as Ogg Opus with VBR, 128k, and a complexity of 1. It sounds fine and it's 2.7 mb. So, assuming the file size scales exactly proportional to time, (as long as my maths is correct) 45 minutes should be around 42 mb at those settings.

I doubt there would be a way to estimate file size, especially for compressed formats, as the
amount of compression depends on the audio you're trying to compress.

Also, if you're worried about whether those settings would be good enough for sound quality, you could set it to render just a few seconds with those settings and listen back to it before rendering the whole thing.
JayJSE2 is offline   Reply With Quote
Old 10-19-2018, 07:26 PM   #4
DVDdoug
Human being with feelings
 
Join Date: Jul 2010
Location: Silicon Valley, CA
Posts: 2,779
Default

With compressed files the bitrate (kbps) is kilobits per second. There are 8 bits in a byte, so divide by 8 to get kilobytes per second.

With uncompressed files it's just the sample rate (Hz) x (bit depth/8) x number of channels x length in seconds. The bitrate for a "CD quality" WAV file (16-bits, 44.1kHz, 2-channels) is 1411kbps, but we don't usually talk about bitrate with uncompressed files.

With VBR (Variable Bit Rate) compression you can't always predict the file size. You can't exactly-predict the size of a FLAC either, but it's usually about 60% of the uncompressed size.
DVDdoug is offline   Reply With Quote
Old 10-19-2018, 07:28 PM   #5
ashcat_lt
Human being with feelings
 
Join Date: Dec 2012
Posts: 7,272
Default

Rule of thumb is that 16bit/44.1KHz stereo .wav is about 10M/minute. 24bit is half again as big, so 15M/minute. Mono is obviously half that, and you can extrapolate for multi-channel. I think 128Kbps .mp3 usually comes out about 1M/min.
ashcat_lt is offline   Reply With Quote
Old 10-20-2018, 12:07 AM   #6
Philbo King
Human being with feelings
 
Philbo King's Avatar
 
Join Date: May 2017
Posts: 3,202
Default

You might consider using FLAC 16 bit. It's lossless so audio quality is not compromised.

45 minutes of 16 bit stereo WAV files will come to about 500 MB. Using FLAC will reduce it to about half of that. Either way it's too big to email. I suggest putting it on a Google drive then sharing it with the recipient. They can then easily download it.
__________________
Tangent Studio - Philbo King
www.soundclick.com/philboking - Audio streams

Last edited by Philbo King; 10-20-2018 at 12:29 AM.
Philbo King is offline   Reply With Quote
Old 10-21-2018, 02:03 PM   #7
tXShooter
Human being with feelings
 
tXShooter's Avatar
 
Join Date: Aug 2017
Posts: 336
Default

I'm currently rendering MP3 (that's the format the radio station will accept other than .WAV), using VBR sample rate of 44.1kHz (stereo). My email cap is supposedly 25MB, but it has rejected 20.1MB size before, so that makes me think it's 20MB.
tXShooter is offline   Reply With Quote
Old 10-21-2018, 02:13 PM   #8
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 29,260
Default

Sending audio over email is sort of a terrible idea in the technical sense. If whomever receives it can check email, then they should be able to click on something like a wetransfer link and download a zip file where the limit is 2GB.

https://wetransfer.com/

I really don't think one should have to degrade their audio to meet an email server send limit.
__________________
Music is what feelings sound like.
karbomusic is offline   Reply With Quote
Old 10-22-2018, 01:06 PM   #9
tXShooter
Human being with feelings
 
tXShooter's Avatar
 
Join Date: Aug 2017
Posts: 336
Default

Quote:
Originally Posted by karbomusic View Post
Sending audio over email is sort of a terrible idea in the technical sense. If whomever receives it can check email, then they should be able to click on something like a wetransfer link and download a zip file where the limit is 2GB.

https://wetransfer.com/

I really don't think one should have to degrade their audio to meet an email server send limit.
Thank you. I will keep that in mind for if / when the radio station changes how they do things.


I’m gathering that it isn’t possible to compute.
tXShooter is offline   Reply With Quote
Old 10-22-2018, 01:47 PM   #10
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 29,260
Default

Quote:
Originally Posted by tXShooter View Post
Thank you. I will keep that in mind for if / when the radio station changes how they do things.


I’m gathering that it isn’t possible to compute.
Lol, I hear you. Seems like they'd be able to get an email that says "Your audio is in this email", then they open and it says "CLICK HERE TO DOWNLOAD"

Sorry you have to deal with that though.
__________________
Music is what feelings sound like.
karbomusic is offline   Reply With Quote
Old 10-22-2018, 02:05 PM   #11
tXShooter
Human being with feelings
 
tXShooter's Avatar
 
Join Date: Aug 2017
Posts: 336
Default

Quote:
Originally Posted by karbomusic View Post
Lol, I hear you. Seems like they'd be able to get an email that says "Your audio is in this email", then they open and it says "CLICK HERE TO DOWNLOAD"

Sorry you have to deal with that though.
I suppose that I should also mention that a lot of my recipients are elderly and not capable/ comfortable with downloading via an external link. For them I have to KISS it... keeping it simple.
tXShooter is offline   Reply With Quote
Old 10-22-2018, 02:45 PM   #12
DVDdoug
Human being with feelings
 
Join Date: Jul 2010
Location: Silicon Valley, CA
Posts: 2,779
Default

Quote:
I'm currently rendering MP3 (that's the format the radio station will accept other than .WAV)
Whoever runs the radio station's website could set up a private upload area.

Quote:
I suppose that I should also mention that a lot of my recipients are elderly and not capable/ comfortable with downloading via an external link
If this is your business (if you are getting paid) you could set it up on your website.
DVDdoug is offline   Reply With Quote
Old 10-22-2018, 03:03 PM   #13
tXShooter
Human being with feelings
 
tXShooter's Avatar
 
Join Date: Aug 2017
Posts: 336
Default

Quote:
Originally Posted by DVDdoug View Post
Whoever runs the radio station's website could set up a private upload area.

If this is your business (if you are getting paid) you could set it up on your website.
Would’ve, should’ve, could’ve... it makes no difference what the setup is... the question still remains. Just because there may be a different method to do something, that doesn’t answer the question at hand.

Let’s pretend we’re worried about disk space. Does that change things?

Thanks for your opinions, but they don’t remotely address the question:

“As the title asks, how does one go about figuring out how big the file size will be (once rendering is done) based on the the settings of the "Render to File" dialog box, without actually rendering?”
tXShooter is offline   Reply With Quote
Old 10-23-2018, 08:28 AM   #14
JSMastering
Human being with feelings
 
JSMastering's Avatar
 
Join Date: Aug 2018
Posts: 212
Default

Quote:
Originally Posted by tXShooter View Post
Would’ve, should’ve, could’ve... it makes no difference what the setup is... the question still remains. Just because there may be a different method to do something, that doesn’t answer the question at hand.

Let’s pretend we’re worried about disk space. Does that change things?

Thanks for your opinions, but they don’t remotely address the question:

“As the title asks, how does one go about figuring out how big the file size will be (once rendering is done) based on the the settings of the "Render to File" dialog box, without actually rendering?”
The short version of that is "Yes, but it's complicated."

All of the algorithms that render the output to a given format are deterministic. So, yes, you can calculate it. The "problem" is that it's not straightforward what the mentioned "quality" setting does without diving into the documentation for the encoder. And there are a few little gotchas like overhead for the format and metadata.

The "solution" is to email a download link. Unless the receiver automates downloading the file (which would be freaking stupid), the experience is basically the same...it's just a question of whether you click a link to, say, dropbox or a link inside the email client.
JSMastering is offline   Reply With Quote
Old 10-23-2018, 10:03 AM   #15
xpander
Human being with feelings
 
xpander's Avatar
 
Join Date: Jun 2007
Location: Terra incognita
Posts: 7,670
Default

File type variables will affect the accuracy somewhat, but there are calculators just for this, e.g.
Audio File Size Calculator
https://www.colincrawley.com/audio-f...ze-calculator/


Thinking about it, maybe an idea for a little Reaper utility script?

Last edited by xpander; 10-23-2018 at 03:19 PM.
xpander is offline   Reply With Quote
Old 10-23-2018, 07:40 PM   #16
tXShooter
Human being with feelings
 
tXShooter's Avatar
 
Join Date: Aug 2017
Posts: 336
Default

Quote:
Originally Posted by xpander View Post
File type variables will affect the accuracy somewhat, but there are calculators just for this, e.g.
Audio File Size Calculator
https://www.colincrawley.com/audio-f...ze-calculator/


Thinking about it, maybe an idea for a little Reaper utility script?
I like where you're going with this, and am thankful you actually read the topic of my post instead of working around one tiny aspect of the scenario I exampled.

Supposing a script could be written, there is the one caveat that JSMastering brought up, and that is: what do those quality settings actually do (programmatically)? Is there any published documentation on that?
tXShooter is offline   Reply With Quote
Old 10-24-2018, 10:47 AM   #17
xpander
Human being with feelings
 
xpander's Avatar
 
Join Date: Jun 2007
Location: Terra incognita
Posts: 7,670
Default

Quote:
Originally Posted by tXShooter View Post
Supposing a script could be written, there is the one caveat that JSMastering brought up, and that is: what do those quality settings actually do (programmatically)? Is there any published documentation on that?
The basic formula for the size calculations is simple.
Formula = Sample rate x sample bit x number of channels x time in seconds / 8 x 1024. This will give the size in kilobytes (KB).

For this size calculation the problem is the variable bitrate encoding (VBR). For a stereo wav at CD quality you'll have a bitrate of 1411 kbit/s (44100 x 16 x 2). With variable bitrate compression the bitrate varies depending on the audio source, usually up to 320 kbit/s. With some formats users can also set a certain range. But this means the size calculation can only be an estimate. There is also an average bitrate encoding (ABR) which will give a fixed average by which calculations can be made more accurately, but the audio quality is not necessarily the best possible the encoding could give.

With all that said, and keeping in mind that the most common size concern is how big will the files be at maximum, I'd gather the safest bet would be to calculate the maximum possible. So fixed rates (and ABR) have their known rates and for the variable formats the maximum value would be used?
xpander is offline   Reply With Quote
Old 10-24-2018, 10:54 AM   #18
ashcat_lt
Human being with feelings
 
Join Date: Dec 2012
Posts: 7,272
Default

Quote:
Originally Posted by xpander View Post
With all that said, and keeping in mind that the most common size concern is how big will the files be at maximum, I'd gather the safest bet would be to calculate the maximum possible. So fixed rates (and ABR) have their known rates and for the variable formats the maximum value would be used?
Yes that.

Let me repeat the important part of what you said:

With VBR, there's no way to know exactly how big it is without doing it.

You could analyze the file and figure out how much the algorithm will throw out, but that is tantamount to just encoding the thing, so why not...??? Estimate based on the maximum and get the actual answer when it's there and you can just look at it.
ashcat_lt is offline   Reply With Quote
Old 10-24-2018, 12:54 PM   #19
Diki Ross
Human being with feelings
 
Join Date: Jan 2015
Location: Sunny Florida
Posts: 34
Default

Are your customers not even the SLIGHTEST bit concerned about audio quality? Is it of zero concern whether the file you send them sounds good or is a mess of data compression artifacts?

The problem is, you seem to have data size as your ONLY concern, not the quality of content you provide the customer. I hope you know for sure that they don't care at all about quality, or they may start to wonder why the longer time files you send them don't sound as good as the shorter ones.

You may also want to check whether the radio station's hardware is comfortable with VBR. Some stations prefer static bitrate MP3's.

There is always the more straightforward solution of talking to your email provider, and paying for a higher tier of service, with larger attachments allowed. It's a business expense, so deductible.

But bottom line, compress 45min of recording to fit inside 20MB, unless it's mono, and speech alone, it's going to sound like poo...
Diki Ross is offline   Reply With Quote
Old 10-24-2018, 09:15 PM   #20
tXShooter
Human being with feelings
 
tXShooter's Avatar
 
Join Date: Aug 2017
Posts: 336
Default

Quote:
Originally Posted by Diki Ross View Post
But bottom line, compress 45min of recording to fit inside 20MB, unless it's mono, and speech alone, it's going to sound like poo...
It's mono, and it's speech alone... it's a sermon.

Thank you for the thrashing that focuses on what you think I haven't thought of... that my 'customers' aren't the SLIGHTEST bit concerned with the quality. Yeah, I haven't thought of that at all. Good catch on your part. (I tell you what...)

I love how some of the comments on this post have been so focused on fixing the delivery aspect of my renderings rather than make any real attempts at solving the question at hand, all without even asking why I need to stick to email in the first place. Other than the mention of possibly analyzing the file, some of you all seem hellbent on me changing my 'evil ways' of emailing.

Quote:
The problem is, you seem to have data size as your ONLY concern, not the quality of content you provide the customer. I hope you know for sure that they don't care at all about quality, or they may start to wonder why the longer time files you send them don't sound as good as the shorter ones.
BAD ASSUMPTION on your part. Dadgum, did you get my dander up on that one! OYE!


(Simmering down)
At times, though, compression can be heard, and that's the SOLE reason why I'm trying to issue out the highest level quality THAT I CAN. HENCE, why I am cycling down from the highest quality MP3 that I can get that will still be small enough to email. Most of our recipients are elderly, or shut-ins, or travel a lot, or are missionaries out across the globe. Most of these recipients aren't all that tech-savvy, so I'm trying to keep things simple for them. Using a third party delivery service or cloud with a link isn't really up their alley. (If you can imagine the days back when AOL used to say, "You've got mail", these would be those folks that actually went out to the street to check their mailbox.) I can't afford to burn to disk four services worth of sermons per week and put them in the mail to 20-100 recipients (more like 700-800 if all members were to get a copy). And the radio stations have their own idiosyncrasies that cause me to have to play by their rules. As a ministry we strive to provide, but come on, let's be at least a little realistic here.



I would like to attempt (at some point) some way to include some of the songs from the choir or other specials to go to those recipients that aren't the radio stations (barring any copyright issues and other legal hurdles), but as it is I'm struggling to just get the sermons out.

My 'customers' get what they get because that's all that we(I) can afford to give them.

All of the above aside, my OP still remains... which is an attempt to pre-calculate the file size for the best quality to size ratio that I can get to email.

Rendering takes time, and cycling through each quality setting takes multiples of that time, as well as taxes my old computer... the poor old fan on it sounds like it's going to spin off its axis at times. I'm a volunteer at my church using my own equipment to provide for this ministry. I don't get paid. When my equipment breaks, I pay for it, out of my own pocket. I'm usually the first one in through the doors to set things up, and I'm typically the last one to leave, mostly because rendering takes so much time. And then there's the emailing that takes place, on an internet that is the cheapest we can find. Emailing 20-100 copies out takes time. Emailing 20-100 emails using a size that doesn't work for gmail takes many multiples more of that time. We would email out to everyone that signs up for our sermons, but at this point we're just focusing on those that aren't able to attend or have a dire need for the service's message.

My only saving grace on this so far is scripts, to which I have spent 14 long months in the learning and writing thereof. Most of my process is automated, but not all of it. Part of my current script is to automatically try rendering with the highest quality, test the size of that file, and if not less than 20MB, cycle down the quality setting until the file gets small enough... at a cost on my computer. If I can find a way to pre-analyze these files before taxing my processor and hard drive, I'm out to find it! I would THINK there are a small number of other folks out there that just might find this ability a little useful.

Are there ANY other concerns that you think maybe I have NOT taken into account in this regard? (softly dropping the mic onto foam as I can't afford to buy a replacement one)

AS TO THE POSSIBILITY OF CREATING A SCRIPT, do you have anything to add to that conversation?


@Xpander:
Quote:
For this size calculation the problem is the variable bitrate encoding (VBR). For a stereo wav at CD quality you'll have a bitrate of 1411 kbit/s (44100 x 16 x 2). With variable bitrate compression the bitrate varies depending on the audio source, usually up to 320 kbit/s. With some formats users can also set a certain range. But this means the size calculation can only be an estimate. There is also an average bitrate encoding (ABR) which will give a fixed average by which calculations can be made more accurately, but the audio quality is not necessarily the best possible the encoding could give.
I agree that with VBR, when varying the bitrate, it can be a problem. I haven't done much encoding with ABR and as such haven't heard its rendering at this high of a compression ratio.

I'm wondering how much speed loss is occurring due to the disk-writing process. Is it possible to pseudo-quasi-render and just keep track of the number of bits, tallying them all up to indicate what the size of the file would be? Would that be any faster on an old Windows 7/8 laptop (and thus less disk-thrashing on the hard drive)? It wouldn't keep the processor from getting nailed, but perhaps it would keep the hard drive around a little bit longer. Perhaps a script could pre-pass and calculate the average wave size and from there a 10 second sampling could estimate the size of the output??? (I dunno... I'm reaching at desperate lengths to come up with anything that might help or intrigue the gurus of this forum to engage.)

@JSMastering
Quote:
The "solution" is to email a download link. Unless the receiver automates downloading the file (which would be freaking stupid), the experience is basically the same...it's just a question of whether you click a link to, say, dropbox or a link inside the email client.
I think that I've covered the aspect of a 'download link' in my earlier rant, and I've never known a radio station to not attempt to automate everything that they can (and pay as little to employees as possible because of it). (Sorry for the double-negative there... it hurt my head just to type it.)



To everyone that just read through all of the above, I apologize. I didn't intend for this to become a rant-thread & post. I'm just tired of people not seeing the question part, and instead trying to solve for the non-question part, especially when they assume and don't ask for clarification before answering the non-question part.
tXShooter is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:01 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.