# Record processed video on iOS

> Start and stop a Nosmai recording, then handle the finalized temporary video URL.

> For AI agents: the complete documentation index is at https://nosmai.com/llms/effects.txt

Product: Nosmai Effects
Group: guide
Source: https://nosmai.com/docs/effects/guides/output/record-video/ios/

## Prerequisites

- A working [iOS quickstart](/docs/effects/quickstart/ios/)
- A running Nosmai preview

## Start recording

```objective-c
[[NosmaiCore shared] startRecordingWithCompletion:^(BOOL success, NSError *error) {
    if (!success) {
        NSLog(@"Recording did not start: %@", error.localizedDescription);
    }
}];
```

## Stop and receive the video

```objective-c
[[NosmaiCore shared] stopRecordingWithCompletion:^(NSURL *videoURL,
                                                    NSError *error) {
    if (videoURL != nil) {
        NSLog(@"Video ready at %@", videoURL);
        return;
    }

    NSLog(@"Recording failed: %@", error.localizedDescription);
}];
```

The URL points to the finalized recording. Copy or export it before deleting
temporary application data.

## Lifecycle rule

Stop and finalize recording before switching camera, leaving the screen, or
stopping processing. Ignore repeated record-button taps while a start or stop
operation is in progress.

## Verify it worked

Record a short clip with a visible effect, wait for the stop completion, and
play the returned URL. Confirm orientation, effect output, duration, and audio.

## Common errors

| Symptom | Cause | Fix |
| --- | --- | --- |
| Recording does not start | The camera is not ready or recording is already active | Wait for preview startup and guard duplicate starts |
| The returned URL disappears later | The app kept a temporary URL without copying or exporting it | Move the finalized file before temporary data is cleaned |

## Next steps

- [Capture a processed photo on iOS](/docs/effects/guides/output/capture-a-photo/ios/)
- [Stream processed frames with Agora on iOS](/docs/effects/integrations/agora/ios/)

## References

- [iOS platform guide](/docs/effects/platforms/ios/)
- [Limits and performance](/docs/effects/limits-and-performance/)
