This project is read-only.

Problem loading the video

May 16, 2009 at 5:19 PM

Hello I'm having problems with the load of and avi video.

It is giving me an NotSupportedException - Specified method is not supported.

The exception is thown in the line "contentVideo.Load"

I have tried with different avi videos, with compression with Microsoft Video 1, CodePak Video, and without compression.

I'd be glad if you can give me a clue to fix that.

Thank you..

The code......

ContentManager contentVideo = new VideoContentManager(g.Services);

video = contentVideo.Load<Video>("Content\\p3");

video.Loop = true;


May 17, 2009 at 5:02 PM

The callstack is

"   at Microsoft.Xna.Framework.Content.DecompressStream.get_Position()\r\n   at Scurvy.Media.VideoModel.VideoStreamer..ctor(Stream stream) in C:\\Dev\\codeplex\\ScurvyMedia\\Scurvy.Media\\Scurvy.Media\\Video\\VideoStream.cs:line 33\r\n   at Scurvy.Media.VideoModel.VideoStream..ctor(ContentReader creader, Int32 numberOfFrames, Double frameRate, Int32 height, Int32 width, GraphicsDevice device, Boolean usecompression) in C:\\Dev\\codeplex\\ScurvyMedia\\Scurvy.Media\\Scurvy.Media\\Video\\VideoStream.cs:line 153\r\n   at Scurvy.Media.VideoModel.VidReader.Read(ContentReader input, Video existingInstance) in C:\\Dev\\codeplex\\ScurvyMedia\\Scurvy.Media\\Scurvy.Media\\Video\\VidReader.cs:line 33\r\n   at Microsoft.Xna.Framework.Content.ContentReader.InvokeReader[T](ContentTypeReader reader, Object existingInstance)\r\n   at Microsoft.Xna.Framework.Content.ContentReader.ReadObjectInternal[T](Object existingInstance)\r\n   at Microsoft.Xna.Framework.Content.ContentReader.ReadObject[T]()\r\n   at Microsoft.Xna.Framework.Content.ContentReader.ReadAsset[T]()\r\n   at Microsoft.Xna.Framework.Content.ContentManager.ReadAsset[T](String assetName, Action`1 recordDisposableObject)\r\n   at Microsoft.Xna.Framework.Content.ContentManager.Load[T](String assetName)\r\n   at Scurvy.Media.VideoContentManager.Load[T](String assetName) in C:\\Dev\\codeplex\\ScurvyMedia\\Scurvy.Media\\Scurvy.Media\\VideoContentManager.cs:line 38\r\n   at PuzzleGame.Background.LoadContent(ContentManager content) in D:\\backup\\Projects\\PuzzleGame\\PuzzleGame\\Background.cs:line 35\r\n   at PuzzleGame.Level.LoadContent(ContentManager content) in D:\\backup\\Projects\\PuzzleGame\\PuzzleGame\\Level.cs:line 44\r\n   at PuzzleGame.PuzzleGame.LoadContent() in D:\\backup\\Projects\\PuzzleGame\\PuzzleGame\\PuzzleGame.cs:line 63\r\n   at Microsoft.Xna.Framework.Game.Initialize()\r\n   at PuzzleGame.PuzzleGame.Initialize() in D:\\backup\\Projects\\PuzzleGame\\PuzzleGame\\PuzzleGame.cs:line 51\r\n   at Microsoft.Xna.Framework.Game.Run()\r\n   at PuzzleGame.Program.Main(String[] args) in D:\\backup\\Projects\\PuzzleGame\\PuzzleGame\\Program.cs:line 14"

Dec 29, 2010 at 3:19 PM

I've got same problem... running the project in Debug configuration it works fine, but when i run it in Release configuration it throws "Not supported Exception"...

Have you fixed the problem ?





Dec 30, 2010 at 1:53 PM

Hi Guys ... I apologize for the inconvenience. I am unfortunately not actively maintaining this project as the XNA framework came out with official video support in version 3. If you are interested in looking at the code, you are free to download it from source control ... if you are able to resolve the issue above let me know and I will grant you contributor rights to commit the changes into the repository.

Good Luck :-)

Jan 4, 2011 at 9:39 PM

Fixed the error simply unchecking the "Compress content pipeline output files" option in Project properties->Content Build .