# Any ideas on how to get a webcam stream into Unreal Engine?

**URL:** <https://forums.unrealengine.com/t/any-ideas-on-how-to-get-a-webcam-stream-into-unreal-engine/6256>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [June 18, 2014, 11:03pm UTC](https://forums.unrealengine.com/t/any-ideas-on-how-to-get-a-webcam-stream-into-unreal-engine/6256 "2014-06-18T23:03:27Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_aeae2c5b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_aeae2c5b](https://forums.unrealengine.com/u/anonymous_user_aeae2c5b)\
**Post date:** [June 18, 2014, 11:03pm UTC](https://forums.unrealengine.com/t/any-ideas-on-how-to-get-a-webcam-stream-into-unreal-engine/6256/1 "2014-06-18T23:03:27Z")

</div>

Hey all,

I’m (very) new to UE and game engines in general. Not a programming noob per se but my experience in the past is many years of single threaded scientific calculations (academia) in mostly Fortran, Matlab and AS3 for fun. Learning C++ doesn’t worry me though because a language is just a language.

I’ve just signed up to UE as I have some fun ideas I’d like to try out and the blueprinting thing looks super easy to use for me to throw stuff together. I’ve got a Rift DK2 ordered and am looking to shift to being able to develop stuff that can use it.

One of my project ideas would need a webcam feed in game. I know this isn’t supported out of the box right now and so ‘something’ would need to be implemented in C++. Can anyone point me in the right direction, give me any suggestions on how I would go about doing this? Googling brings up some vague UDK results about ‘dllbind’ - is this still how things like this are done?

Edit: I’m reposting this from before the forum’s data loss courtesy of Google’s cache of the post.

---

<div class="post-metadata">

**Author:** ![Mark\_James\_G](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mark\_James\_G](https://forums.unrealengine.com/u/Mark_James_G)\
**Post date:** [June 19, 2014, 1:10am UTC](https://forums.unrealengine.com/t/any-ideas-on-how-to-get-a-webcam-stream-into-unreal-engine/6256/2 "2014-06-19T01:10:14Z")

</div>

> [@Spanky Deluxe;78969](#):
>
> Hey all,
> 
> I’m (very) new to UE and game engines in general. Not a programming noob per se but my experience in the past is many years of single threaded scientific calculations (academia) in mostly Fortran, Matlab and AS3 for fun. Learning C++ doesn’t worry me though because a language is just a language.
> 
> I’ve just signed up to UE as I have some fun ideas I’d like to try out and the blueprinting thing looks super easy to use for me to throw stuff together. I’ve got a Rift DK2 ordered and am looking to shift to being able to develop stuff that can use it.
> 
> One of my project ideas would need a webcam feed in game. I know this isn’t supported out of the box right now and so ‘something’ would need to be implemented in C++. Can anyone point me in the right direction, give me any suggestions on how I would go about doing this? Googling brings up some vague UDK results about ‘dllbind’ - is this still how things like this are done?
> 
> Edit: I’m reposting this from before the forum’s data loss courtesy of Google’s cache of the post.

One way from the top of my head is to host a webcam service via HTTP. Then simply stream the site directly onto a surface in UE4. Here is an example, compliments of Rama actually since it is his video. 🙂 (That guy sure is talented isn’t he? Ha.)

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/c/4/ac48b983dbf41eb2a88f0ac860e860ecaaae7a29.jpeg "Rama Writes a Thread Post From Inside His Mech") ](https://www.youtube.com/watch?v=eo7rFaUlC9w)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_aeae2c5b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_aeae2c5b](https://forums.unrealengine.com/u/anonymous_user_aeae2c5b)\
**Post date:** [June 28, 2014, 3:55pm UTC](https://forums.unrealengine.com/t/any-ideas-on-how-to-get-a-webcam-stream-into-unreal-engine/6256/3 "2014-06-28T15:55:52Z")

</div>

Thanks for the suggestion. I’m guessing that would likely add too much lag to the webcam stream (HD) so might have to wait until someone clever adds integrated webcam support. The idea of streaming in HTTP is interesting though and has given me some other ideas I’d like to try out. Did Rama do a tutorial on how to do that? I’ve been looking through the wiki and I can’t find any hints on how to do that.

---

<div class="post-metadata">

**Author:** ![jCoder](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jCoder](https://forums.unrealengine.com/u/jCoder)\
**Post date:** [June 28, 2014, 5:25pm UTC](https://forums.unrealengine.com/t/any-ideas-on-how-to-get-a-webcam-stream-into-unreal-engine/6256/4 "2014-06-28T17:25:33Z")

</div>

Have you read Fricker’s [thread here](https://forums.unrealengine.com/showthread.php?12841-Work-in-progress-Support-for-live-streaming-services-%28e-g-Twitch%29)? He’s working on integrating twitch into the engine. He might be able to point you in the right direction.

---

<div class="post-metadata">

**Author:** ![ufna](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ufna/32/1194675_2.png) [@ufna](https://forums.unrealengine.com/u/ufna)\
**Post date:** [June 28, 2014, 5:48pm UTC](https://forums.unrealengine.com/t/any-ideas-on-how-to-get-a-webcam-stream-into-unreal-engine/6256/5 "2014-06-28T17:48:53Z")

</div>

> [@Spanky Deluxe;86273](#):
>
> Thanks for the suggestion. I’m guessing that would likely add too much lag to the webcam stream (HD) so might have to wait until someone clever adds integrated webcam support. The idea of streaming in HTTP is interesting though and has given me some other ideas I’d like to try out.

It’s not a direct way, but [works okay](https://www.youtube.com/watch?v=FQBoJviz34Q). It has some performance lag because of double memory copying, but it’s the fastest solution.

To make it direct way, you have to write stream reader from code. It’s not a trivial task. Check what Epic’s doing with Twitch.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_aeae2c5b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_aeae2c5b](https://forums.unrealengine.com/u/anonymous_user_aeae2c5b)\
**Post date:** [June 29, 2014, 4:09pm UTC](https://forums.unrealengine.com/t/any-ideas-on-how-to-get-a-webcam-stream-into-unreal-engine/6256/6 "2014-06-29T16:09:41Z")

</div>

> [@ufna;86307](#):
>
> It’s not a direct way, but [works okay](https://www.youtube.com/watch?v=FQBoJviz34Q). It has some performance lag because of double memory copying, but it’s the fastest solution.
> 
> To make it direct way, you have to write stream reader from code. It’s not a trivial task. Check what Epic’s doing with Twitch.

Amazing, thank you ufna. I haven’t been able to work out how to get it installed yet or set up - very new to UE4 and engines in general and am still going through the UE4 tutorials. Will probably need to wait until you’ve got a Blueprint version of your plugin working (or I’ve learnt how to do the C++ stuff and learnt how to use your plugin).

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_4b68e8ab](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_4b68e8ab](https://forums.unrealengine.com/u/anonymous_user_4b68e8ab)\
**Post date:** [June 18, 2015, 6:22am UTC](https://forums.unrealengine.com/t/any-ideas-on-how-to-get-a-webcam-stream-into-unreal-engine/6256/7 "2015-06-18T06:22:35Z")

</div>

Hi, Have you found any tutorial regarding this? I’m surfing and struggling for the same scenario, If you give some guidance by your past one year work that would be grateful.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_726cc026](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_726cc026](https://forums.unrealengine.com/u/anonymous_user_726cc026)\
**Post date:** [July 13, 2015, 10:07am UTC](https://forums.unrealengine.com/t/any-ideas-on-how-to-get-a-webcam-stream-into-unreal-engine/6256/8 "2015-07-13T10:07:55Z")

</div>

I have been using Streaming Video Provider to stream with my webcam. Their platform is just awesome:

[http://www.streamingvideoprovider.com/live-video-streaming-live-broadcasting.html#webcam](http://www.streamingvideoprovider.com/live-video-streaming-live-broadcasting.html#webcam)

---

<div class="post-metadata">

**Author:** ![smilingrob](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/smilingrob/32/947302_2.png) [@smilingrob](https://forums.unrealengine.com/u/smilingrob)\
**Post date:** [October 11, 2015, 10:23pm UTC](https://forums.unrealengine.com/t/any-ideas-on-how-to-get-a-webcam-stream-into-unreal-engine/6256/9 "2015-10-11T22:23:46Z")

</div>

Just to follow up on this thread, an [FONT=Courier New]ILiveStreamingService (twitch) provides the [FONT=Courier New]UTexture2D from the webcam. That texture isn’t provided by UE4, but provided by Twitch or whomever implements [FONT=Courier New]ILiveStreamingService. Still looking for a way to easily get webcam frames.

---

<div class="post-metadata">

**Author:** ![Temaran](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Temaran](https://forums.unrealengine.com/u/Temaran)\
**Post date:** [January 28, 2016, 8:10pm UTC](https://forums.unrealengine.com/t/any-ideas-on-how-to-get-a-webcam-stream-into-unreal-engine/6256/10 "2016-01-28T20:10:02Z")

</div>

Hello!

I made a plugin today to access the webcam via DirectShow, if anyone stumbles in here, feel free to have a look 🙂

> **[Web camera plugin](https://forums.unrealengine.com/showthread.php?98931-Web-camera-plugin)**
>
> Hello! I had to access the web camera in-engine for one of my projects, so I though I would share it with the community! I implemented it using directshow, so only windows support for now. Hopefully it’s useful to someone 🙂 And if you would...

Best regards,  
Temaran

---

<div class="post-metadata">

**Author:** ![EagleEye314](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EagleEye314](https://forums.unrealengine.com/u/EagleEye314)\
**Post date:** [June 9, 2017, 6:56pm UTC](https://forums.unrealengine.com/t/any-ideas-on-how-to-get-a-webcam-stream-into-unreal-engine/6256/11 "2017-06-09T18:56:07Z")

</div>

I found a solution to this in 4.15 using Unreal4AR, I downloaded their demo version and the plugin they use is relatively straight forward but might take some tinkering to get it to work how you would like. [http://www.unreal4ar.com/](http://www.unreal4ar.com/) Click download plugin and select the demo.

---

<div class="post-metadata">

**Author:** ![mitjaprelovsek](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mitjaprelovsek](https://forums.unrealengine.com/u/mitjaprelovsek)\
**Post date:** [May 4, 2018, 11:13am UTC](https://forums.unrealengine.com/t/any-ideas-on-how-to-get-a-webcam-stream-into-unreal-engine/6256/12 "2018-05-04T11:13:46Z")

</div>

Hi,

I’ve created a video tutorial showing how to get webcam into Unreal Engine using Lightact media server (see the link below). All the necessary links are in the video’s description.

I would be happy if you guys can give it a go and let me know how you find it.

Cheers,  
Mitja
