WindowsMediaRenderer causes error 0xC00D0BB8

Topics: Developer Forum, User Forum
Jun 1, 2012 at 4:22 AM

Hello.

I'm trying to render a video from a bitmap list.

The thing is that this bitmap list is created by reading one folder and cropping all the bitmaps in this folder to one previously user-selected rectangle. The cropped bitmaps aren't saved to disk, but are kept as a bitmap list.

I based myself in this discussion to create my code, which is here:


public bool CreateVideo(List<Bitmap> bitmaps, string outputFile, double fps, int width, int height) { if (bitmaps == null || bitmaps.Count == 0) return false; try { using (ITimeline timeline = new DefaultTimeline(fps)) { IGroup group = timeline.AddVideoGroup(32, width, height); ITrack videoTrack = group.AddTrack(); int i = 0; double miniDuration = 1.0 / fps; foreach (var bmp in bitmaps) { IClip clip = videoTrack.AddImage(bmp, 0, i * miniDuration, (i + 1) * miniDuration); System.Diagnostics.Debug.WriteLine(++i); } timeline.AddAudioGroup(); IRenderer renderer = new WindowsMediaRenderer(timeline, outputFile, WindowsMediaProfiles.HighQualityVideo); renderer.Render(); } } catch { return false; } return true; }

The problem is that when I get to renderer.Render(); line, I get one error saying "Exception from HRESULT: 0xC00D0BB8".

I found one discussion regarding a similar issue and the reply sad that the op should use absolute file names, but I have two problems with this:

  1. I don't actually have those files saved to disk, as they are results of dynamic cropping.
  2. Splicer generates these files in %TEMP%\splicerTempImage{GUID}.bmp, and by debugging I could notice that those file names are properly set in videoTrack.VirtualClips (also, I opened the files and they are there).

Does anyone have any clue on why this is happening? What could I do to successfully generate this video?

Thanks!