VideoPlayer class is missing

Hi
I am Reza Hooshangi. We made a XNA Game called BloodyStreets in the past year and now we are trying to port it to MonoGame to make Linux and MacOS exports.

http://www.indiedb.com/games/bloody-streets
http://steamcommunity.com/sharedfiles/filedetails/?id=185477408

I downloaded MonoGame for visual studio 2012 and created a Windows OpenGL project but there’s a problem.Microsoft.Xna.Framework.Media.VideoPlayer class is missing and I need it for playing some cutscenes in game.
How should I use VideoPlayer ? or is there any other way to play XNA video contents ?

Thanks

it is not implemented for opengl

https:// github .com/flibitijibibo/MonoGame/blob/monogame-sdl2/MonoGame.Framework/SDL2/Media/VideoPlayer.cs
(cant use links yet)

try this, it is using theoraplay
It is a sdl branch, but the videoplayer is not really using it, so you can just use it.

I had to recompile the TheoraPlay wrapper that flibitijibibo writen ( i had some trouble with this but managed to do it) since i’m in windows, but the environment that he uses is very *nix so it will be easy i’m sure.

it works pretty well.

Hi, i’m trying termoventilador’s solution, but it won’t work.

I’m adding TheoraPlay-CS.dll from SDL2 recent branch as reference to monogame (develop main branch, 3.1.2 ?!), VideoPlayer.cs and Video.cs from SDL2, but it throws the following errors:

at line 96:

 /buildpath.../MonoGame.Framework/Media/VideoPlayer.cs(11,11): Error CS0246: The type or namespace name `OpenGLDevice' could not be found. Are you missing an assembly reference? (CS0246) (MonoGame.Framework.Linux)

at line 469:

/buildpath.../MonoGame.Framework/Media/VideoPlayer.cs(11,11): Error CS0246: The type or namespace name `DynamicSoundEffectInstance' could not be found. Are you missing an assembly reference? (CS0246) (MonoGame.Framework.Linux)

Then I tried another solution by termoventilador again, in this post VideoPlayer.cs Monogame 3.2 with the files he provided for Video and VideoPlayer, it builds fine, but when I try to load the video, it throws the error:

Microsoft.Xna.Framework.Content.ContentLoadException: Could not load Video/intro_naif asset as a non-content file! ---> System.Exception: The content file was not found. ---> System.Exception: Could not find file "/home/mauricio/Projetos/Games/wrk/Worm/02_production/04_game/Wormmy/bin/Debug/Content/Video/intro_naif.xnb".

Apparently, it tries to read the file with the .xnb extension… there are three formats of the same video in there .avi, .ogv and .wmv … I have also tried converting to xnb with xnb builder, but it says I can’ use, probably because it is not CBR single pass. As additional note, i’m using linux.

Any help? ):

Never mind, SDL2 working with video now, had issues because I’ve installed SDL_image on my system, for some reason it made Texture2Ds have compile errors, after removing and using libtheoraplay libraries, it was back to normal.