Android Error: camera.recordAsync({quality:'2160p'}) throws "Error retrieving camcorder profile params ]"

Environment

expo 46 – expo-av 12.0.4 – expo-camera 12.3.0 – android 12 – Samsung S8 tablet – expo-managed workflow

Packages In Question

expo-camera

Problem

Front Facing Camera has ability to record in 3840x2160 as shown by

await camera.getAvailablePictureSizesAsync('16:9')

which returns ‘LOG [“640x360”, “1280x720”, “1920x1080”, “3840x2160”]’

when I set the quality to ‘2160p’ with:

const data = await camera.recordAsync({quality: '2160p'})

And try to record with this method I get an error:

LOG  [Error: Error retrieving camcorder profile params]

Secondary Information

Camera - Expo Documentation. As stated in the docs the quality argument is optional, and if not provided the highest available quality it chosen. When left blank 1080p is chosen which isn’t the highest quality available, however no error is thrown and app records successfully.

–Back facing camera has ability to record to ‘4128x2322’ as seen with:

await camera.getAvailablePictureSizesAsync('16:9')
 LOG  ["640x360", "1280x720", "1920x1080", "3840x2160", "4128x2322"]

The following code is ran with back camera selected and no error is thrown. The record quality is 2160p.

const data = await camera.recordAsync({quality: '2160p'})

  • Error occurs in exact same way whether useCamera2Api is false:true
  • The only referenced problem is from RNCamera here: github pull request I don’t know if this information is applicable to current issue as I do not think expo-camera exposes the CamcorderProfile.hasProfile() method.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.