# Mlcapture feature from within unity

**URL:** <https://forum.magicleap.cloud/t/mlcapture-feature-from-within-unity/1909>\
**Category:** Unity Development\
**Created:** [May 12, 2023, 9:11pm UTC](https://forum.magicleap.cloud/t/mlcapture-feature-from-within-unity/1909 "2023-05-12T21:11:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![westert](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/westert/32/164_2.png) [@westert](https://forum.magicleap.cloud/u/westert)\
**Post date:** [May 12, 2023, 9:11pm UTC](https://forum.magicleap.cloud/t/mlcapture-feature-from-within-unity/1909/1 "2023-05-12T21:11:58Z")

</div>

I am looking for a way to provide a "record" button in my Unity interface. This button would allow the user to record video, with similar results as calling to "adb shell mlcapture". I am interested in exposing some of the mlcapture settings to the user.

I understand there is a controller based way to capture but but it does not allow me to set the capture parameters.

I also found MLMediaRecorder in the Unity API documentation but it's not clear to me how to interact with this. It does not seem to provide the same amount of options as mlcapture

Is there a way to execute the mlcapture command from within Unity?  
Barring this is there a unity or native api I can interact with?

thanks,  
-Thomas

---

<div class="post-metadata">

**Author:** ![kvlasova](https://avatars.discourse-cdn.com/v4/letter/k/f6c823/32.png) [@kvlasova](https://forum.magicleap.cloud/u/kvlasova)\
**Post date:** [May 16, 2023, 2:03pm UTC](https://forum.magicleap.cloud/t/mlcapture-feature-from-within-unity/1909/2 "2023-05-16T14:03:38Z")

</div>

Have you looked at the [ML Camera walkthrough](https://developer-docs.magicleap.cloud/docs/guides/unity/camera/camera-capture-walkthrough) and the [Simple Camera Example](https://developer-docs.magicleap.cloud/docs/guides/unity/camera/ml-camera-example) script or the Camera Capture example scene ini the Magic Leap Examples package (available for download from ML Hub)?

The ML Camera Walkthrough has specific section on stopping and starting capture as well as setting parameters.

---

<div class="post-metadata">

**Author:** ![javier](https://avatars.discourse-cdn.com/v4/letter/j/9dc877/32.png) [@javier](https://forum.magicleap.cloud/u/javier)\
**Post date:** [May 16, 2023, 2:37pm UTC](https://forum.magicleap.cloud/t/mlcapture-feature-from-within-unity/1909/4 "2023-05-16T14:37:38Z")

</div>

You can, I used to do it but the built in camera functions from the OS are way better so there's no point in doing it anymore in my opinion.

---

<div class="post-metadata">

**Author:** ![westert](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/westert/32/164_2.png) [@westert](https://forum.magicleap.cloud/u/westert)\
**Post date:** [May 18, 2023, 6:04pm UTC](https://forum.magicleap.cloud/t/mlcapture-feature-from-within-unity/1909/5 "2023-05-18T18:04:17Z")

</div>

Thanks for pointing me in the right direction! I will give the MLCamera walkthrough a go and see how it compares to the results we can get through mlcapture.

-Thomas

---

<div class="post-metadata">

**Author:** ![kvlasova](https://avatars.discourse-cdn.com/v4/letter/k/f6c823/32.png) [@kvlasova](https://forum.magicleap.cloud/u/kvlasova)\
**Post date:** [May 22, 2023, 9:24pm UTC](https://forum.magicleap.cloud/t/mlcapture-feature-from-within-unity/1909/7 "2023-05-22T21:24:23Z")

</div>


