# DeepAR gets auto shutdown

**URL:** <https://forum.deepar.ai/t/deepar-gets-auto-shutdown/115>\
**Category:** Help & Questions\
**Created:** [October 15, 2022, 7:55pm UTC](https://forum.deepar.ai/t/deepar-gets-auto-shutdown/115 "2022-10-15T19:55:06Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![vmvk\_developer](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/vmvk_developer/32/190_2.png) [@vmvk\_developer](https://forum.deepar.ai/u/vmvk_developer)\
**Post date:** [October 15, 2022, 7:55pm UTC](https://forum.deepar.ai/t/deepar-gets-auto-shutdown/115/1 "2022-10-15T19:55:06Z")

</div>

I am working in an iOS app, I created a new DeepAR instance as in the sample and capturing photo and video all is working as expected.

After sometime the DeepAR calls automatically the delegate method - didFinishShutdown(). After this method call the Video is crashing, Photo is not working. I tried various ways to reintialize and nothing worked as expected.

Please share how to properly reinitialize the DeepAR so that after shutdown it works as earlier

---

<div class="post-metadata">

**Author:** ![jelena](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/jelena/32/14_2.png) [@jelena](https://forum.deepar.ai/u/jelena)\
**Post date:** [October 17, 2022, 1:23pm UTC](https://forum.deepar.ai/t/deepar-gets-auto-shutdown/115/2 "2022-10-17T13:23:10Z")

</div>

Hi @vmvk_developer if you are using a free licence the SDK will auto-shutdown after 3 minutes this limitation is automatically removed with any paid subscription.

---

<div class="post-metadata">

**Author:** ![vmvk\_developer](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/vmvk_developer/32/190_2.png) [@vmvk\_developer](https://forum.deepar.ai/u/vmvk_developer)\
**Post date:** [October 18, 2022, 1:05pm UTC](https://forum.deepar.ai/t/deepar-gets-auto-shutdown/115/3 "2022-10-18T13:05:52Z")

</div>

@jelena thanks for the details. We are also facing one more issue. Currently if the iOS app is moved to background and then again moved to foreground, the video recording just stops and it does not work proper. Can you suggest how to handle this

---

<div class="post-metadata">

**Author:** ![jelena](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/jelena/32/14_2.png) [@jelena](https://forum.deepar.ai/u/jelena)\
**Post date:** [October 18, 2022, 3:19pm UTC](https://forum.deepar.ai/t/deepar-gets-auto-shutdown/115/4 "2022-10-18T15:19:07Z")

</div>

What is the expected behavior on your part in that situation?

We stop the recording when the DeepAR is not active, since there is no output to record.

---

<div class="post-metadata">

**Author:** ![vmvk\_developer](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/vmvk_developer/32/190_2.png) [@vmvk\_developer](https://forum.deepar.ai/u/vmvk_developer)\
**Post date:** [October 18, 2022, 3:33pm UTC](https://forum.deepar.ai/t/deepar-gets-auto-shutdown/115/5 "2022-10-18T15:33:43Z")

</div>

On opening the app again and when we start a video recording it begins properly and the delegate method didStartVideoRecording gets called. However after doing the recording the delegate method didFinishVideoRecording is not getting called

---

<div class="post-metadata">

**Author:** ![jelena](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/jelena/32/14_2.png) [@jelena](https://forum.deepar.ai/u/jelena)\
**Post date:** [October 18, 2022, 5:11pm UTC](https://forum.deepar.ai/t/deepar-gets-auto-shutdown/115/6 "2022-10-18T17:11:01Z")

</div>

Can you reproduce this on our quickstart example, we will test it out.

---

<div class="post-metadata">

**Author:** ![vmvk\_developer](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/vmvk_developer/32/190_2.png) [@vmvk\_developer](https://forum.deepar.ai/u/vmvk_developer)\
**Post date:** [October 19, 2022, 3:50am UTC](https://forum.deepar.ai/t/deepar-gets-auto-shutdown/115/7 "2022-10-19T03:50:30Z")

</div>

This issue is reproducible in quickstart example if we set videoRecordingWarmupEnabled as true. _ **self.deepAR.videoRecordingWarmupEnabled = true;** _

If we set this as false, then its working proper.
