Playing Live Video Captures on Linux

Is there any way to take a live video feed from my webcam and play it directly inside UE4 on Linux?

I have followerd this document: Playing Live Video Captures in Unreal Engine | Unreal Engine 5.2 Documentation

But, the Capture Devices button on MediaPlayer asset is empty, looks like there is no support for V4L2

How should I write the Media URL on Linux?

1 Like

Dear valued Unreal Engine user,

As you seem to have realized, it looks as though a IMediaCaptureSupport has not yet been implemented for video cameras on Linux.

So unfortunately, there may not be a way to do this without additional code.

Potentially, you could try using this plugin as a template and then implement your own support.

Engine/PluginsMedia/AndroidCamera/Source/AndroidCamera/Private/AndroidCameraModule.cpp

It looks as though you would just need to create a module that inherits from IMediaCaptureSupport and then register it with the MediaModule. There may already be plugins available on github. If there are none, and you do have to write your own plugin; it would be encouraged to either share the repo here or submit a pull request!

For other user’s who are not familar with V4L2. Webcams are available on the /dev/video camera device files, and more information can be found here:

https://www.kernel.org/doc/html/v4.10/media/uapi/v4l/dev-output.html

Thank you for your continued support,

1 Like