android - video file size before recording -
In my app, I record two 30 seconds of video and upload it to the server, I call it MediaRecorder . I want to know how to find the size of the video file before the recording starts, or how to find less memory to record the video?
You will not be able to get the size of the video before you start recording it, In fact, in fact can estimate that the video file size is upper bound you can do it with the knowledge of:
- Resolution of the video to be recorded
- Frames of your video recording per second
- Duration
- Video en Use of encoder
- and the "specific" parameters of a video file encoded with the encoder
In the final form, there are some tools that give you this kind of Let's get information (for example).
Why is this difficult guess? First of all, because you will always anticipate the data you need to get (about encoded video with specific encoder). The encoder will work differently on different recordings, and the size of video files can vary depending on many factors (recording color, the dynamics of the recording - this video is still or very dynamic or audio). Apart from this, you should remember that (according to) Android let us set only the maximum video frame rate (This is why you can only estimate upper bound of the maximum video file size).
For a memory part of the question: Take a look at
Comments
Post a Comment