Changing the format in a Media Player freezes the playback

I’m trying to get a video feed from a webcam playing in Unreal. These are the formats that I can see in the Media Player info tab.

Player: WmfMedia

Play Rates
    Thinned: 1,0
    Unthinned: 1,0, 0,0

Capabilities
    Scrubbing: No
    Seeking: No

Stream 0
	Type: Video
	Format 0
		Codec: YUY2
		Frame Rate: 15 fps
		Frame Rate Range: 15 - 15 fps
		Dimensions: 3840 x 2160
	Format 1
		Codec: YUY2
		Frame Rate: 10 fps
		Frame Rate Range: 10 - 10 fps
		Dimensions: 3840 x 2160
	Format 2
		Codec: YUY2
		Frame Rate: 5 fps
		Frame Rate Range: 5 - 5 fps
		Dimensions: 3840 x 2160
	Format 3
		Codec: YUY2
		Frame Rate: 1 fps
		Frame Rate Range: 1 - 1 fps
		possibly a still image stream (may not work)
		likely an unsupported still image stream
	Format 4
		Codec: YUY2
		Frame Rate: 30 fps
		Frame Rate Range: 30 - 30 fps
		Dimensions: 1920 x 1080
	Format 5
		Codec: YUY2
		Frame Rate: 50 fps
		Frame Rate Range: 50 - 50 fps
		Dimensions: 1920 x 1080
	Format 6
		Codec: YUY2
		Frame Rate: 15 fps
		Frame Rate Range: 15 - 15 fps
		Dimensions: 1920 x 1080
	Format 7
		Codec: YUY2
		Frame Rate: 1 fps
		Frame Rate Range: 1 - 1 fps
		possibly a still image stream (may not work)
		likely an unsupported still image stream
	Format 8
		Codec: YUY2
		Frame Rate: 90.0001 fps
		Frame Rate Range: 90.0001 - 90.0001 fps
		Dimensions: 1280 x 720
	Format 9
		Codec: YUY2
		Frame Rate: 60 fps
		Frame Rate Range: 60 - 60 fps
		Dimensions: 1280 x 720
	Format 10
		Codec: YUY2
		Frame Rate: 30 fps
		Frame Rate Range: 30 - 30 fps
		Dimensions: 1280 x 720
	Format 11
		Codec: YUY2
		Frame Rate: 15 fps
		Frame Rate Range: 15 - 15 fps
		Dimensions: 1280 x 720
	Format 12
		Codec: YUY2
		Frame Rate: 1 fps
		Frame Rate Range: 1 - 1 fps
		possibly a still image stream (may not work)
		likely an unsupported still image stream

The Playback Options only show 9 though.

The problem I’m having is that, no matter what I do, it also just picks the first one in the list. So 3840 x 2160 at 15fps in my case. I really want to use 1280x720 at 90fps, but when I switch to that format in the Playback Options, the video feed just freezes. I’ve tried with another webcam, a standard Logitech one, and it behaves exactly the same.

I thought that maybe it was just the preview video in the Media Player UI acting up, so I made a Blueprint to switch it there. But no matter which format index I pick, it always selects what looks like index 0 from the list, 3840 x 2160 at 15fps.

I verified that the Return Value of the Set Track Format node returns true. I’ve also verified that these other formats work outside of Unreal. OBS player is able to switch without issues, as well as a Pythonscript using cv2. I also managed to get it working just fine in Unity. So I’m pretty sure it’s not a hardware issues, but something Unreal does wrong. I just don’t know what.

Does anyone know why this is happening? Any insight would be helpful.

This seems to be an issue in 5.5 and 5.4. When I went back to 5.3.2, everything basically works. There are some quirks, still, but I’m able to start a level and change to a different format.

I did have to bump the delay to a couple of seconds before changing the format to make sure there was a videostream coming in before wanting to change it.