Hi,
I am new to xna, I want to play a video file in the starting of the game....The movie size is 6.33 MB.... i added the reference of Scurvy.Media and Scurvy.Media.Pipeline..... I wrote the code in function loadcontent() as
ContentManager content = new ContentManager(Services);
Video vid = content.Load<Video>(
"mesh/start"); //start.avi is my file name
vid.Loop = false;
vid.Play();
in update method i given as
vid.Update();
But i am getting a very lengthy error like
Error 1 Building content threw OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at System.IO.MemoryStream.set_Capacity(Int32 value)
at System.IO.MemoryStream.EnsureCapacity(Int32 value)
at System.IO.MemoryStream.Write(Byte[ buffer, Int32 offset, Int32 count)
at System.IO.BinaryWriter.Write(Byte[ buffer)
at Scurvy.Media.Pipeline.Video.PlatformSurface.x86Surface.WriteToXnb(ContentWriter output, Byte[ pix) in C:\Dev\codeplex\ScurvyMedia\Scurvy.Media\Scurvy.Media.Pipeline\Video\PlatformSurface.cs:line 57
at Scurvy.Media.Pipeline.Video.VidContentWriter`1.Write(ContentWriter output, T value) in C:\Dev\codeplex\ScurvyMedia\Scurvy.Media\Scurvy.Media.Pipeline\Video\VidContentWriter.cs:line 44
at Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler.ContentTypeWriter`1.Write(ContentWriter output, Object value)
at Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler.ContentWriter.InvokeWriter[T](T value, ContentTypeWriter writer)
at Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler.ContentWriter.WriteObject[T](T value)
at Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler.ContentCompiler.Compile(Stream output, Object value, TargetPlatform targetPlatform, String rootDirectory, String referenceRelocationPath)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.SerializeOutputAsset(BuildItem item, Object assetData, String outputFilename)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.SerializeAsset(BuildItem item, Object assetData)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAssetWorker(BuildItem item)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAsset(BuildItem item)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.RunTheBuild()
at Microsoft.Xna.Framework.Content.Pipeline.Tasks.BuildContent.RemoteProxy.RunTheBuild(BuildCoordinatorSettings settings, TimestampCache timestampCache, ITaskItem[ sourceAssets, String[& outputContent, String[& rebuiltContent, String[& intermediates, Dictionary`2& dependencyTimestamps, KeyValuePair`2[& warnings) C:\Projects\sample\Content\mesh\start.avi sample
If it is the problem with the file size please tell me what should be the maximum size of the file....... And what are the audio and video file formats which is supported by XNA....
Please help me to get out of this error
Thanks
sandeep