Video from Images Not working properly

Topics: Developer Forum, Project Management Forum, User Forum
Jun 5, 2007 at 12:41 PM

I want to create transication effect video from a set of 3 images. I am using the below code but it behaves strangly. It adds the audio file to the output video file but the video is not showing up. Only a blank screen appear. Please help me in this regard and let me know if I need to do any other modification.

string outputFile = "c:\\test\\Pix.wmv";

using (ITimeline timeline = new DefaultTimeline())
timeline.AddAudioGroup().AddTrack().AddClip("testinput.wav", GroupMediaType.Audio,
InsertPosition.Relative, 0, 0, 17);

IGroup group = timeline.AddVideoGroup(32, 160, 100);

ITrack low = group.AddTrack();
ITrack hi = group.AddTrack();
hi.AddClip("c:\\test\\image1.jpg", GroupMediaType.Image, InsertPosition.Absolute, 0, 0, 6);
low.AddClip("c:\\test\\image2.jpg", GroupMediaType.Image, InsertPosition.Absolute, 5, 0, 8);
hi.AddClip("c:\\test\\image3.jpg", GroupMediaType.Image, InsertPosition.Absolute, 11, 0, 6);

hi.AddClip(@"c:\test\image1.jpg", GroupMediaType.Image, InsertPosition.Absolute, 0, 0, 6);
// notice that we must apply "in" and "out" of the pixelation effect, to get the
// desired effect, like the fade
hi.AddTransition(5.0, 1.0, StandardTransitions.CreatePixelate(), true);
hi.AddTransition(6.0, 1.0, StandardTransitions.CreatePixelate(), false);

// the iris transition is a one shot
hi.AddTransition(11.0, 2.0, StandardTransitions.CreateIris(), false);

using (
WindowsMediaRenderer renderer =
new WindowsMediaRenderer(timeline, outputFile, WindowsMediaProfiles.HighQualityVideo))