ContentLoadException on content.Load<Video>

I’m trying to play a video in Monogame. I was having a bit of trouble because the easiest way is to use VideoPlayer, which is not in my Microsoft.Xna.Framework.Media for some reason. So I pointed my visual studio project to reference Microsoft.Xna.Framework.Video.dll and I was able to make an object of VideoPlayer just fine.

My sample code is as follows:

videoPlayer = new VideoPlayer();
video = content.Load<Video>("Intro_Videos/main_intro");

I get an error on line 2,

Microsoft.Xna.Framework.Content.ContentLoadException: 'Could not find ContentTypeReader Type. Please ensure the name of the Assembly that contains the Type matches the assembly in the full type name: Microsoft.Xna.Framework.Content.VideoReader (Microsoft.Xna.Framework.Content.VideoReader)'

More detailed error below:

  Message=Could not find ContentTypeReader Type. Please ensure the name of the Assembly that contains the Type matches the assembly in the full type name: Microsoft.Xna.Framework.Content.VideoReader (Microsoft.Xna.Framework.Content.VideoReader)
   at Microsoft.Xna.Framework.Content.ContentTypeReaderManager.LoadAssetReaders(ContentReader reader)
   at Microsoft.Xna.Framework.Content.ContentReader.InitializeTypeReaders()
   at Microsoft.Xna.Framework.Content.ContentReader.ReadAsset[T]()
   at Microsoft.Xna.Framework.Content.ContentManager.ReadAsset[T](String assetName, Action`1 recordDisposableObject)
   at Microsoft.Xna.Framework.Content.ContentManager.Load[T](String assetName)
   at DevcadeGame.States.IntroState..ctor(Game1 game, GraphicsDevice graphicsDevice, Int32 PreferredBackBufferWidth, Int32 PreferredBackBufferHeight, ContentManager content) in C:\Users\garre\Desktop\Devcade\Devcade-Hero\States\IntroState.cs:line 28
   at DevcadeGame.Game1.LoadContent() in C:\Users\garre\Desktop\Devcade\Devcade-Hero\Game1.cs:line 109
   at Microsoft.Xna.Framework.Game.Initialize()
   at DevcadeGame.Game1.Initialize() in C:\Users\garre\Desktop\Devcade\Devcade-Hero\Game1.cs:line 89
   at Microsoft.Xna.Framework.Game.DoInitialize()
   at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior)
   at Microsoft.Xna.Framework.Game.Run()
   at Program.<Main>$(String[] args) in C:\Users\garre\Desktop\Devcade\Devcade-Hero\Program.cs:line 3

Some more context is that the path should be right. The video is a .mp4, and the project builds just fine with the assets. I build on x86 (Active solution platform). I’m using visual studio 2022, I’ve tried changing the properties of the to copy local: yes. I’ve tried changing the video file and all that and nothing has worked so far.

Any assistance would be appreciated.

Are you loading other types of content successfully? Is it just videos not working, or all types of content?

Yes, it is just videos. I can load songs, sound effects, and texture2ds. It’s definitely a bit weird since I have to reference a .dll for this Video class. All content from content.mgcb builds completely fine. The line shows no errors in visual studio until you run the project. Then the error above occurs.

Still rather unsure what the problem might be.

You referenced the original XNA dll for video. It’s no surprise that is not working with monogame.
In DesktopGL they removed the Video classes from the project. I think it was not implemented for SDL.

Makes sense, (I referenced it from XNA Game Studio) that’s probably what’s happening considering there’s no information on the internet about this issue.

Do you know if there are any cross-platform alternatives to play videos with monogame?

No, I never used the Video classes.

Join the MonoGame Discord channel, people there will know for sure.