Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get file size of live video recording in android?

How can I get the video file size while recording a video in Android using a MediaRecorder?

like image 365
user1257441 Avatar asked May 02 '12 05:05

user1257441


People also ask

What size is 1 hour of HD video?

360p (High Quality) video: 40 MB per hour. 720p (High Definition) video: 220 MB per hour.

What is the maximum video recording time of any Android phone?

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.

How do I reduce the MB of a video on Android?

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.


1 Answers

String recVideoPath = Environment.getExternalStorageDirectory() + videoRecordedFileName;

File file = new File(recVideoPath);
long fileVideo = file.length();

More or less something like the one above.

like image 66
Lawrence Gimenez Avatar answered Oct 21 '22 06:10

Lawrence Gimenez