Previous topicNext topic

Video file size

Questions, comments, feedback, etc.
Post Reply
Nickl
Posts: 10
Joined: Fri Jan 20, 2017 6:17 pm

Video file size

Post by Nickl »

This is not something that has affected me in the past, but I have recently started uploading my music videos to a site which has a file size limit and so I need to manage my video file sizes. I found a post on this subject from a couple of years ago, and this is what was said at the time:

"The only things that affect the file size are the bitrate and the duration. Thus, with a constant duration of 60 minutes (3600 seconds), you can adjust the bitrate to get the file size you want.

The file size calculation is as follows: (duration in seconds) * (megabit rate / 8) = file size in megabytes

Doing some algebra, the bitrate can be obtained this way: megabit rate = ((file size in megabytes) / (duration in seconds)) * 8

So, let's say you wanted a file size of 1000MB (1GB): (1000/3600) * 8 = 2.2 Mbits/sec. The problem is that the quality of this movie will be pretty awful -- there will be lots of horrible compression artifacts. I highly recommend you don't go lower than 20 Mbits/sec for 1280x720."

I have been recording my videos at 100Mbits/ sec; I needed to halve the size of a video file so I re-recorded it at 50 Mbits/sec ( according to the formula above, that should do the trick). It didn't, it just reduced the file size by about 20%. That then started me wondering about another of my videos, a 3 minute music video recorded at 100 Mbits/sec - this is only 73M in size - according to the formula, it should be many times that size.

Have things changed in the past couple of years since the above formula was produced? From my experience, bitrate and duration are not the only things affecting file size, so what else do I need to consider in order to manage the file sizes, please?

Thanks
blackdot
Posts: 528
Joined: Sun Jul 06, 2014 10:18 pm

Re: Video file size

Post by blackdot »

bitrate and duration are what determines the filesize, thats correct. bitrate is how many bits per second you have and duratuon how many seconds you have.

i usually am using vimeo's compression guidelines for the bitrate: https://vimeo.com/help/compression.

note that these are for the h264 codec. the codec determines the quality of the picture at a certain bitrate. usually older codecs used more data (more bitrate) to get the same quality, so you should be fine with h264.

however, theres also h265 now, and with this you can reduce the above bitrate suggestions by a third or half to get the same quality (imho). so thats something you could try.

other than that i dont know how you could save bitrate, certain quality just needs a certain amount of information. theres a reason why 90 mins movie can be 10-20Gb big.
Nickl
Posts: 10
Joined: Fri Jan 20, 2017 6:17 pm

Re: Video file size

Post by Nickl »

Hi Blackdot,

Thanks for your detailed reply confirming that duration and bitrate are the determining factors for file size, but it doesn't shed any light on the issue I am experiencing with exporting from MMV.

Halving the bitrate for a video should halve the file size - it doesn't.

I have created two music videos in MMV, one is 182 seconds long and the other 184. Using exactly the same export settings, I would expect the two files to be about the same size; they are not, one is over 500M and the other is 73 M. There must be something else about the videos and/or the MMV export process that is affecting the file size.
blackdot
Posts: 528
Joined: Sun Jul 06, 2014 10:18 pm

Re: Video file size

Post by blackdot »

Nickl wrote:Hi Blackdot,

Thanks for your detailed reply confirming that duration and bitrate are the determining factors for file size, but it doesn't shed any light on the issue I am experiencing with exporting from MMV.

Halving the bitrate for a video should halve the file size - it doesn't.

I have created two music videos in MMV, one is 182 seconds long and the other 184. Using exactly the same export settings, I would expect the two files to be about the same size; they are not, one is over 500M and the other is 73 M. There must be something else about the videos and/or the MMV export process that is affecting the file size.
ah sorry i thought you were encoding your stuff ina 3rd party program.

hmm, i just did a test, and apparently file size does indeed not change linearly with the bitrate setting. i assume eric build in something clever that doesnt force more bitrate than necessary (eg. when your source vids dont have more bitrate in t he first place), but i dont know. maybe the bitrate setting is more of a maximum bitrate setting than a target bitrate. which would mean with one of your exports it was able to save a lot of bitrate and not with the other one. this would depend on the content and how easy it can be encoded (like having a plain color for a few seconds can be encoded easily=few data, and having lots of moving colors and shapes=more data)

here's my test result of the same 10s export:
Capture.JPG
Capture.JPG (13.88 KiB) Viewed 5939 times
according to the files, the 100mbps and the 50mbps files are actually both 13mbps. the 10mbps file then again is actually 10mbps. so for some reason it doesnt export more than 13mbps in this case. what you could do is find out what actual bitrate your two files have, and then use that info accordingly to plan new exports. while we wait for eric to weigh in maybe :)
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: Video file size

Post by Magic »

maybe the bitrate setting is more of a maximum bitrate setting than a target bitrate. which would mean with one of your exports it was able to save a lot of bitrate and not with the other one. this would depend on the content and how easy it can be encoded (like having a plain color for a few seconds can be encoded easily=few data, and having lots of moving colors and shapes=more data)
Yup that's exactly right ;). Sometimes the encoder can achieve maximum quality at a lower bitrate than what was requested. But it depends very significantly on the content.
Nickl
Posts: 10
Joined: Fri Jan 20, 2017 6:17 pm

Re: Video file size

Post by Nickl »

OK, thanks Eric.
dj0le
Posts: 53
Joined: Sun Jan 31, 2016 9:46 am
Location: Tuzla, Bosnia & Herzegovina

Re: Video file size

Post by dj0le »

My process for exporting from Magic is to make it the highest quality possible. I export at 120 Mbits and then use handbrake or ffmpeg to re-encode it until it is small enough for whatever the project requires. Handbrake is especially effective for getting high quality at a small size.
Nickl
Posts: 10
Joined: Fri Jan 20, 2017 6:17 pm

Re: Video file size

Post by Nickl »

Hi djOle

I haven't heard of Handbrake, but I will check it out. If it does as you say, then it is worth a try.

Thanks
Post Reply