# Integration of pre-recorded video with RTC

**URL:** <https://openvidu.discourse.group/t/integration-of-pre-recorded-video-with-rtc/1134>\
**Category:** How to implement?\
**Tags:** v2\
**Created:** [June 9, 2020, 4:24pm UTC](https://openvidu.discourse.group/t/integration-of-pre-recorded-video-with-rtc/1134 "2020-06-09T16:24:08Z")\
**Posts on this page:** 1\
**Showing post:** 22

<div class="post-metadata">

**Author:** ![Syed\_Gilani](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/syed_gilani/32/363_2.png) [@Syed\_Gilani](https://openvidu.discourse.group/u/Syed_Gilani)\
**Post date:** [July 17, 2023, 11:03am UTC](https://openvidu.discourse.group/t/integration-of-pre-recorded-video-with-rtc/1134/22 "2023-07-17T11:03:16Z")

</div>

I have deployed the code and MP4 file on server end as you described but still I am getting black video. @mihailj Below is my code

```auto
const connect = function (fileName, SESSION_ID) {
  try {
    var postData = JSON.stringify({
      type: "IPCAM",
      rtspUri: "file:///opt/openvidu/recordings/" + fileName + ".mp4",
      adaptativeBitrate: true,
      onlyPlayWithSubscribers: true,
      networkCache: 2000,
      data: "IP-CAM",
    });

    var options = {
      hostname: HOST_NAME,
      port: 4443,
      path: "/openvidu/api/sessions/" + SESSION_ID + "/connection",
      method: "POST",
      headers: {
        Authorization: "Basic " + btoa("OPENVIDUAPP:" + SECRET),
        "Content-Type": "application/json",
        "Content-Length": postData.length,
      },
    };

    var req = https.request(options, (res) => {
      console.log("statusCode:", res.statusCode);
      console.log("headers:", res.headers);

      res.on("data", (d) => {
        console.log("loaded");
      });
    });

    req.on("error", (e) => {
      console.error(e);
    });

    req.write(postData);
    req.end();
  } catch (e) {
    console.log(e.message);
  }
};

```

---

_[View the full topic](https://openvidu.discourse.group/t/integration-of-pre-recorded-video-with-rtc/1134)._
