Live video capture/Webcam compatibility

I’'m trying to get video feeds from cameras/webcams in 4.18 on PC and while I got it/mines to work, it doesnt for anyone I gave a build to test.

I have a BlackMagic Intensity Pro (PCI card) and capture video from a Wii and works without a problem in editor and a packaged version. (Windows 7). Seems to work without problems. But everyone I have test it for me it just doesnt work. I dont have a webcam to test myself.

Guy 1
OS: Windows 10
Capture Device: AVerMedia GC550(or Live Gamer Extreme) and PS4 (480p, 720p, 1080p)
Camera: Logitech HD Pro Webcam C920

Guy 2
OS: Windows 10
Capture Device: none
Camera: USB2.0 HD UVC WebCam (Laptop camera, Asus ROG G551JW)

Niether their camera or capture card worked with the build. Its a simple project that just list the devices in a combobox and open a stream when selected. All their devices show up. Open URL returns true, but nothing shows up. Webcams recording lights show that webcams are being used when selected.

Has anyone tried their cams or capture cards and gotten them working? Any idea what my problems is or is this a UE4 issue? I’ll try to get some more testing done.

So i tried Xsplit Broadcaster’s virual camera/device output thingy in editor and got this error

“LogWmfMedia: Error: Failed to create capture device media source: The filename, directory name, or volume label syntax is incorrect.”

This is the URL i get from Emumerate Video Capture Devices in BP for Xsplit’ Broadcast’s
vidcap://@device:sw:{860BB310-5D01-11D0-BD3B-00A0C911CE86}{VHSplitProc}_XSplitBroadcaster_1_staticsource_VIDEO

I’ll have the two guys send me their logs and see if its the same error as this.

Guy one’s AVerMedia GC550(or Live Gamer Extreme) is giving this error when trying to open the stream from the device:

“LogWmfMedia: Error: Failed to create capture device media source: The data specified for the media type is invalid, inconsistent, or not supported by this object.”

You cannot use the same URL string on different machines. It will likely be different on each machine. Instead you should use the capture device enumeration API to get a list of the devices available on the user’s machine, and then present the user with some interface that allows them to pick the desired device and capture format.

Check out the official documentation for more details.

As far as device support is concerned, on Windows, anything with a Windows Media Foundation (WMF) driver should work. A DirectShow driver is not sufficient, because we did not implement that API. Most consumer webcams, such as Logitech C-series and Microsoft Livecams are supported.

Interesting, I have not seen this error before. That the media source creation fails is highly unusual. Perhaps this device requires some additional attributes. Unfortunately, I don’t know anything about this device, and I wasn’t able to find any relevant details on the internet. If you’d like to debug this yourself, the relevant code is in WmfMediaUtils.cpp, ResolveMediaSource().

I did not use URL strings on different machines. I used the Enumerate Video capture devices you get an array of available devices. So far only my Black magic intensity pro works. I really didnt expect my card to work tbh. I did expect my friends logitech camera to since it was a more popular device.

So all devices show up on my PC and friends’ PCs, just none of them work(besides my BMIP). I’ll try looking at WmfMediaUtils.cpp, ResolveMediaSource(). I’ll also post links to the logs for the 3 devices ive tested. They all seem to give different errors.

This might be asking too much but Xsplit Broadcaster is free and its virtual device that you guys can maybe test with you have time. (might be worth idk).

Attaching the log if anyone wants to take a look.

Thanks, Gerke.

[link text][1]

[link text][2]

[link text][3]

[1]:220417- [2]: 220418-logitech-c920-pro.log (50.9 KB)
[3]: 220419-xsplit.log (25.5 KB)

Thanks, I’ll try to take a look this week.

I am having the same issue with logitech c920 - camera light goes on, but video is black. Camera works fine with other applications. Enumerate Media Capture Devices (Webcam mask) and Enumerate Webcam Capture Devices (any mask) returns an empty list.

I have also successfully used the Unreal4AR Plugin (http://www.unreal4ar.com) in UE4.18 with this camera, but it doesn’t use the media player framework for its capture capabilities.

I believe I’ve found the problem. By default, the MediaPlayer is selecting Track 1 (which contains no data) Switching to “Track 0” brings the webcam image up.

Unfortunately, setting the video player to the appropriate track from within the blueprint does not fix the problem. If I set the track index to 1 on BeginPlay, it will reset to 0 on the Tick. If I set it on the Tick it will report the correct track but displays no video. (I believe it’s reverting to track 0 before it the video feed it captured)

The only way I can get the video to show up, in-game, is to shift-F1 out open the media player uasset and manually select the correct track, at which point the video will begin playing in-game

1 Like

More Info - If I don’t have the MediaPlayer UAsset open, I don’t get any video at all. If I open the MediaPlayer UAsset, I get black (track 0) and if I manually set it to track 1 (in the media player uasset editor) the video will play in-game.

You have to select the track after the media source opened successfully (OnMediaOpened).

That fixed the issue for me, thanks! Did I miss that in the documentation?

I have the same problem with BM intensity pro 4k.
Even in the media player it won’t work.The output message is: Failed to create capture device media source: The data specified for the media type is invalid, inconsistent, or not supported by this object.
Any help would be much appreciated!

Thank you!

Well, the error message pretty much says it: Windows Media Foundation does not support that capture device. I don’t have any solution, sorry.

could I ask a question?
I want to Use DeckLink Extream 4k in unrealEngine4 ,

But the board makers says support directShow and windows media Driver only, you can check this link, please

WMF(DeckLink) via WDM is not working now in UnrealEngine,

Does not videocodec and videoformat suport enough in unrealengine4 right now?

if Does not suport for this,
epicGames will suport them in the future?

thank you!

Did you find a solution to this? We are having a similar issue with a Blackmagic DeckLink. I assume the WDM capture is not sufficient to work in UE4 (I don’t believe it is technically WMF). I was trying to see if there was some setting in the Desktop Video Setup I could change to alter the input format but couldn’t find anything. I am getting the same error when trying to select the input:
LogWmfMedia: Error: Failed to create capture device media source: The data specified for the media type is invalid, inconsistent, or not supported by this object.

The format the BMI uses for HD capture isnt supported by ue4. Only device i got working was an old Nintendo Wii. Tried an HDMI device the other day and ue4 logged an error saying something along the lines of the video format wasnt supported. (This was with a BMI not a BMI-4k).

I gave up and I’m currently tryin to use NewTek NDI, VLC (captures and broadcast NDI stream) and this plugin.

Ahh okay, and are you using a Blackmagic for the NDI capture? I think I got the VLC half working, but how are you setting up the plugin in UE4 to read the stream? Couldn’t find any relevant documentation for it. Cheers!

I have no idea how to get a list of all URLs for all streams that are available but this is how i currently get access to em. either manually typing out the url or get it from a NDI Media source ref if youve made one(set the url by editing it in the content browser).

Also, If your gonna package it and it doesnt work try setting it to development instead of shipping. (Shipping didnt work for me for some reason)