Media Framework Video Formats Causing Issues

I’m in the middle of a project with a very important customer and this couldn’t have come at a worse time but here we go:
I’m using the new media framework (4.18.3) for capturing webcam footage and displaying it on screen.

I’ve implemented everything as show by the documentation at Playing Live Video Captures | Unreal Engine Documentation.

I’m experiencing issues playing most video formats.shown under Playback Options > Video > … .

Once I change format to pretty much anything other than the default 640x480 (which shows up fine) the image turns black and instead of “Playing” the overlay text says “Error”.
I did of course make sure the format I’m trying to change to is supported by the webcam capture device.

Example trying to switch to 1920x1080 (same codec and frame rate as the functioning counterpart of 640x480)

Note: Some formats do show signs of life but result in a completely distorted and unusable image.
This same effect also happens when I try to load video from a DSLR camera with 3RD party software like SparkoCam (regardless of what format I use, non of them show a clear image, they’re all distorted).
Example trying to switch to 320*180 (same codec and frame rate as the functioning counterpart of 640x480)

This issue occurs whether I change the format though the media player or even at runtime using blueprints.
It also occurs in both editor and packaged project.

I’ve turned on verbose logging for media framework as described in the media framework technical reference Media Framework Technical Reference | Unreal Engine Documentation
but there seem to be no interesting logs or warnings/errors that indicate something is off.
I’ve attached a file with the content of the output log when running the project and then switching to another video format at run time.
[link text][3]

Here’s what’s odd:
The issues described above I’m experiencing when running the project game on my laptop.
But if I run the same project files (copy/pasted) with the exact same webcam on my PC everything works well!
Also on both the Laptop and PC I am able access the webcam feed at any resolution I desire using 3rd party software such as OBS Studio without any issues - it’s only when accessing the feed through the engine that these issues arise.
My laptop also has a built in webcam which works when used with 3rd party software such as OBS Studio but not through the engine (black screen) regardless of the format I choose.

This to me pretty much rules out the possibility that the issue is caused by either the device not functioning as intended or the project’s logic doing something wrong.

Main differences between PC and Laptop that come to mind:

OS: Laptop is Win7, PC is Win8.1
Graphics Cars: Laptop has Intel HD4000, PC has GTX1070.
The camera I’m using is the Logitech C922 Pro Stream.
I’ve attached my laptop’s DxDiag output as a text file.
[link text][4]

If there’s any other details I could that would help troubleshooting this issue please do let me know.

Hello,

We’ve recently made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.

https://forums.unrealengine.com/unreal-engine/announcements-and-releases/1410408-unreal-engine-bug-submission-form

Thanks

Alright I did open the issue using the new bug tracking system but then I got a generic message which said:

“Thank you for reporting this bug. We will investigate your report, but will not necessarily follow up with you directly. You can track the latest UE4 issues here.”

It did not even give me a link or ID to track progress of it or maybe let me review or edit the issue, which feels a bit like telling me to f* off.

In any case I hope this gets looked at sometime soon though it sure didn’t make me feel that way.

Hi Jake,

Thanks for your detailed report! Let me try to answer your questions.

Once I change format to pretty much anything other than the default […] the image turns black and instead of “Playing” the overlay text says “Error”

Not all webcam video formats will play properly. We have made the same observation here with the few cameras we tested. Unfortunately, there is no way of telling ahead of time whether a format will work or not. It depends on many factors, such as the camera, the operating system version, the driver version, etc.

I suggest that you provide your end users with some settings dialogue in your game/application, so they can select a combination of camera and format that works.

Some formats do show signs of life but result in a completely distorted and unusable image

Please try the latest code in 4.19. There have been some improvements to detecting the video format. The garbled image you’re seeing indicates a pixel stride issue. All the ones that I knew about have been fixed in 4.19. If you keep seeing problems like that, please report back with camera model, OS version, and format.

The issues described above I’m experiencing when running the project game on my laptop. But if I run the same project files (copy/pasted) with the exact same webcam on my PC everything works well!

There are substantial differences in Windows Media Foundation (which we are using under the hood on windows) between Windows 7, Windows 8, and Windows 10. In general, the newer the Windows version, the better the webcam support, especially between 7 and 8. Therefore, things may work fine on Windows 8, but not on Windows 10.

One Windows 10 there was another big round of changes to media capture. You’ll notice that many of the formats that are advertised on Windows 7 and 8 are no longer available on Windows 10, but support for compressed formats, such as H.264 is generally better.

So, to sum it up, I’m afraid that you won’t be able to find a single configuration that works on all platforms, OS versions, camera models and drivers. Again, your best option is to present the user with some UI, so they can pick from a list.

  1. List item