# Sending video on Magic Leap 2 to a computer using HTTP or MTP

**URL:** <https://forum.magicleap.cloud/t/sending-video-on-magic-leap-2-to-a-computer-using-http-or-mtp/3560>\
**Category:** Unity Development\
**Created:** [May 22, 2024, 5:33pm UTC](https://forum.magicleap.cloud/t/sending-video-on-magic-leap-2-to-a-computer-using-http-or-mtp/3560 "2024-05-22T17:33:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![abbas.khawaja](https://avatars.discourse-cdn.com/v4/letter/a/ba8739/32.png) [@abbas.khawaja](https://forum.magicleap.cloud/u/abbas.khawaja)\
**Post date:** [May 22, 2024, 5:33pm UTC](https://forum.magicleap.cloud/t/sending-video-on-magic-leap-2-to-a-computer-using-http-or-mtp/3560/1 "2024-05-22T17:33:32Z")

</div>

**Unity Editor version** : 2022.2.0  
**ML2 OS version** : 1.5  
**Unity SDK version** : 1.12  
**Host OS** : (Windows/MacOS) Windows 11

**Error messages from logs** (syntax-highlighting is supported via Markdown):  
To preface, I have developer mode enabled on the Magic Leap 2. I am using the Camera Capture Example scene to record videos. The entire scene is built as a .apk file and runs on the Magic Leap 2.

As soon as I record the video, I want to send the video to my PC using HTTP. I have this implemented however, the file is unreadable when the PC receives it. As in the bytes are in such as way that the mp4 file the PC receives is unreadable for some reason. Does anyone have a solution to this problem?

---

<div class="post-metadata">

**Author:** ![etucker](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/etucker/32/842_2.png) [@etucker](https://forum.magicleap.cloud/u/etucker)\
**Post date:** [May 22, 2024, 11:45pm UTC](https://forum.magicleap.cloud/t/sending-video-on-magic-leap-2-to-a-computer-using-http-or-mtp/3560/2 "2024-05-22T23:45:19Z")

</div>

Hi @abbas.khawaja,

You mentioned that you’re sending the video via HTTP. Could you provide more details on how you’re implementing this transfer? Are you using a specific library or tool?

How are you handling the encoding/decoding of the video?

Best,

El

---

<div class="post-metadata">

**Author:** ![abbas.khawaja](https://avatars.discourse-cdn.com/v4/letter/a/ba8739/32.png) [@abbas.khawaja](https://forum.magicleap.cloud/u/abbas.khawaja)\
**Post date:** [May 27, 2024, 4:31pm UTC](https://forum.magicleap.cloud/t/sending-video-on-magic-leap-2-to-a-computer-using-http-or-mtp/3560/3 "2024-05-27T16:31:53Z")

</div>

Actually its working now, there was nothing wrong with the code, I was just looking in the wrong folder for the transferred video.

On specifics of the file transfer, I am using:

```auto
using System.Net.Http;
using System.Net.Http.Headers;

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/1X/bd9b737a4d45ea243aa7eb177d60a773b806899a.svg) [@system](https://forum.magicleap.cloud/u/system)\
**Post date:** [June 11, 2024, 4:32pm UTC](https://forum.magicleap.cloud/t/sending-video-on-magic-leap-2-to-a-computer-using-http-or-mtp/3560/4 "2024-06-11T16:32:46Z")

</div>

Closed on June 11, 2024, 4:32pm UTC

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