[iOS] "Failed to create recorder" error after around 245 recordings
Unity version
2022.3.32f1
Unity editor platform
macOS
AVPro Movie Capture edition
Full
AVPro Movie Capture Version
5.3.3
Xcode version being used to build your Unity project.
15.2 and 16
Which iOS version(s) are you using?
from 17.5.0 to 18.0.1
Hardware
iPad Pro (11-inch) (4th generation)
Which capture component are you using?
Capture From Camera
Capture mode
Realtime
Which output mode are you using?
Video file
Video codecs
HEVC
Audio source
None_
Audio codecs
None_
Any other component configuration
No response
The issue
Our app makes multiple short recordings of 5-6 seconds while it's running. But when it reaches an amount of recordings (always around 230-250) the plugin gives the error:
[AVProMovieCapture] Failed to create recorder
And XCode shows:
(MCVideoRecorder.m:949) Failed to start writing, error: The operation could not be completed
After this error we cannot make more recordings even if the app is restarted or reinstalled. The only workaround is to restart the iPad. We think it can be related to mediaserverd but we aren't sure.
The method StopCapture() is called without parameters (so it doesn't delete the video directly) but the code does delete the file and Dispose() the handler at a later state (we need to wait a bit for the app to upload the video to the cloud).
We observed that the app works correctly in the editor too.
Any idea what's happening?
Thanks in advance!
Log output
Can you share how you have the capture from camera component configured (resolution, frame rate, bitrate, etc.)?
Sure, here the configuration of the component:
Capture Mode: Realtime Capture
Capture From Camera
- Camera Selector: None
- Camera: Main Camera
- Resolution: Original
- Anti-aliasing: Current (None)
Start / Stop
- Toggle Key: None
- Start Mode: Manual
- Start Delay: None
- Stop Mode: None
Output
- Output Target: Video File
- Folder: Relative To Project (also tested with 'Relative to Persistent Data' with no difference)
- Subfolder(s): Captures
- Prefix: MovieCapture
- Append Timestamp: true
- Manual Extension: false
Visual
- Down Scale: Original
- Frame Rate: 30
- Timelapse Scale: 1
- Frame Update Mode: Automatic
- Flip Vertically: false
- Video Codec: HEVC (also tested with H.264 with no difference)
- Average Bitrate: 0
- Quality: 0.5
- Keyframe interval: 0
- Transparency: None
- Enable Fragmented Writing: false
- Frame Presentation Timestamp: Realtime
Audio
- Audio Source: None
Post
- Streamable MP4: true
- Stereo Packing: Auto
- Spherical Layout: Auto
Misc
- Log Capture Start Stop: true
- Allow V Sync Disable: True
- Use Wait For End Of Frame: True
- Support Texture Recreate: False
- Persist Across Scene Loads: False
- Timeline Controller: None
- Video Player Controller: None
- Minimum Disk Space MB: -1
- Write Orientation Metadata: False
- Save capture when app loses focus: True
What resolution are you capturing at (fullscreen or something custom)?
Fullscreen