In React Native, the default frame rate for video recording using the react-native-camera package is determined by the native camera implementation on the device, and it may not always be 60 frames per second (fps). The actual frame rate depends on the capabilities of the device's camera hardware and the configuration settings.

However, you can try to maximize the frame rate for video recording by adjusting certain camera parameters and settings. Here are some steps you can take to attempt to achieve a higher frame rate:

  1. Quality Settings:

    • Check if the camera allows you to set the quality of the video recording. Higher quality settings may result in a lower frame rate due to increased processing requirements. Experiment with different quality settings to find the balance between quality and frame rate that suits your needs.
  2. Frame Rate Control:

    • On some devices, you may be able to control the frame rate manually. Check the camera documentation or the react-native-camera documentation to see if there are any parameters that allow you to set the frame rate explicitly.
  3. Record Parameters:

    • In the react-native-camera package, the recordAsync method allows you to set recording parameters. You can check if there are any additional options that allow you to adjust the frame rate.
  4. Device Compatibility:

    • Keep in mind that not all devices support recording at 60fps. Some older devices or devices with lower camera capabilities may not be able to achieve such high frame rates.
  5. Hardware Acceleration:

    • Ensure that your camera implementation is using hardware acceleration if available. Hardware-accelerated video recording can improve performance and frame rates.
  6. Optimize Code and Rendering:

    • Make sure that your app's code is optimized, and there are no unnecessary computations or rendering operations that may affect the frame rate.
  7. Consider Native Modules:

    • If achieving a consistent 60fps frame rate is critical for your application, you might consider writing a native module that interfaces directly with the camera API on each platform (Android and iOS). Native modules provide more control over camera functionality and may allow you to achieve better performance.

It's important to note that achieving a consistent 60fps frame rate for video recording on all devices can be challenging, as it heavily relies on the device's hardware capabilities. Additionally, higher frame rates may lead to larger video file sizes, so consider the trade-offs between frame rate, video quality, and file size based on your application's requirements.

Remember to thoroughly test the video recording performance on various devices to ensure it meets your expectations and works well across different platforms and hardware configurations.

Have questions or queries?
Get in Touch