Im doing an awful lot of work at the moment with AVMutableVideoCompositions, and AVAssetExportSessions. When exporting a video using the latter, its clear that you can affect the size of the mixed video enormously depending on the preset that you use. For a typical video of around 2 minutes in length, the exported asset can range from 5MB to 400MB in size depending on that setting. So it would be useful to have an idea of just how big an export might be, right?
To that end, I did some investigation and exported lots of different sizes and varieties of videos. I ended up with a very consistent ratio between the duration of the video composition, the export setting, and the resultant size in MB of the exported video.
The one really useful thing about this is - you can work out beforehand, whether or not the user is going to run out of disc space when doing an export session.
So the following method will give you an expected size in MB of an exported video composition, based on the supplied bits of info - duration and export session preset. Its fairly self explanatory, but its been pretty accurate so far. Hope it is of use to someone :
Subscribe to:
Post Comments (Atom)
Social Network with Firebase 3 - Infinitely scrolling UITableView of Firebase Items
Ive already talked about the basics of a Firebase social network project , and adding posts in two other articles. Here I want to explain ...
-
Ive already outlined my database structure for my Firebase based social network. Ive done the auth for new users , and Ive added each new ...
-
Im doing an awful lot of work at the moment with AVMutableVideoCompositions, and AVAssetExportSessions. When exporting a video using the la...
No comments:
Post a Comment