Search code examples
androidcamerapreviewframe-rate

Custom framerate for android camera preview


I am currently planning to develop my first bigger App for Android. However, the whole concept depends on the possibility to set a custom preview framerate for the camera.

As far as my research shows the function void setPreviewFpsRange (int min, int max) should allow me to set the framerate to any value. Or are the values returned by List<int[]> getSupportedPreviewFpsRange () the only possible framerates?

At this stage of the project I dont have the possibility to test this with different phones yet. Does anyone know a good resources, where I can find the framerate ranges of some phones?


Solution

  • The Answer:

    void setPreviewFpsRange (int min, int max) can only be used with the values given by List<int[]> getSupportedPreviewFpsRange ()

    Sadly I couldn't find any resources for the framerate ranges of a variety of phones.

    For the ones, that care:

    My testphone, the Samsung Galaxy A5 has the ranges:

    0: 7000-7000

    1: 15000-15000

    2: 24000-24000

    3: 7000-30000

    4: 10000-30000

    5: 15000-30000

    6: 30000-30000