How can I get the video file size while recording a video in Android using a MediaRecorder
?
360p (High Quality) video: 40 MB per hour. 720p (High Definition) video: 220 MB per hour.
To prevent your phone from overheating, higher resolution videos have a 10-minute recording limit, but you can choose a lower resolution to extend your recording time.
Switching to the HD resolution or FHD resolution video resolution will reduce the file size by a huge margin. You should know that reducing the resolution will also reduce the overall quality of the video. So, to keep a balance between the quality and file size, we recommend using FHD resolution.
String recVideoPath = Environment.getExternalStorageDirectory() + videoRecordedFileName;
File file = new File(recVideoPath);
long fileVideo = file.length();
More or less something like the one above.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With