Cameraview: How to get a medium size of video

Created on 16 Aug 2019  路  8Comments  路  Source: natario1/CameraView

How do I?

I try to record a video with cameraview but I would like it to be between 4 and 6 MB, but the method "cameraVideoSizeSmallest" returns a video of 600kb but unusable because too blurry for facial recognition and the method "cameraVideoSizeBiggest" returns a nice video but too heavy (11Mo)

Version used

2.0.0-beta04

question stale

All 8 comments

You can use setVideoSize() and choose a size that you like.

I think that this method stops the recorder when the desired size is reached, no matter the time of the video.
I want to record a video of 5 seconds with size between 4 and 6 MB, with this method it is possible?

Same question here

This issue has been automatically marked as stale because it has not had activity in the last 20 days. It will be closed if no further activity occurs within the next seven days. Thank you for your contributions.

any answer about it?

Nothing new ...

I found an alternative by defining the bitRate of my video as I liked according to the resolution I wanted with the method app:cameraVideoBitRate="@integer/video_bit_rate".

So for a 360p video I set 400kbps. And It works fine !

Set max and min bounds to same to get a video of a particular resolution
app:cameraVideoSizeMinHeight="1920"
app:cameraVideoSizeMinWidth="1080"
app:cameraVideoSizeMaxWidth="1080"
app:cameraVideoSizeMaxHeight="1920"

Was this page helpful?
0 / 5 - 0 ratings