I would like to record a video by using just an intent:
Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
It needs to be a low quality so I use: intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 0);
which works fine. The problem is that it gives me a limit of 23 seconds. Afterwards it stops recording. This limit is displayed on UI like this 00:00 / 00:23 and once it reaches that time it stops. This limit doesn't occur on high quality video settings. I tried to increase limit by setting:
intent.putExtra("android.intent.extra.durationLimit",50);
But it doesn't affect it at all. I can give it smaller number than 23 seconds or I can give it higher with no effect. I also tried to increase size of the file with the same result.
intent.putExtra(MediaStore.EXTRA_SIZE_LIMIT, 1000000);
These settings work for video high quality but not for video low quality. Does anyone have solution for it? Ideally video shouldn't have any duration limit.
The problem is that it gives me a limit of 23 seconds.
That is the way whatever app you are using to record the video implemented it. There is no requirement that all video apps implement such a limit, or that the limit be 23 seconds.
Does anyone have solution for it? Ideally video shouldn't have any duration limit.
Record the video yourself using Camera
and MediaRecorder
. The developers of the worlds' camera apps are welcome to implement ACTION_VIDEO_CAPTURE
however they want. If you need more control than that, you have to record it yourself.