This project is read-only.

Implementation of WMTFX transition

Topics: Developer Forum, Project Management Forum, User Forum
May 31, 2011 at 12:56 PM

Hello,

 We are creating video file using this wonderful Splicer library.

 We have created WMTFX transition through Standardtransition.cs as follows.

Though resultant video shows transition of flip, it shows color strips on the image while flipping.

 The image is distorted and color stripes are shown. Can you please guide on this ?

Anything is missing ?

public static readonly Guid WMTFXTransition = new Guid("C63344D8-70D3-4032-9B32-7A3CAD5091A5");

 Thanks & Regards,

 

Umesh

 public static TransitionDefinition CreateWMTFX()
        {
            var transitionDefinition = new TransitionDefinition(WMTFXTransition);
            var param1 = new Parameter("InternalName", "Simple3D");
            transitionDefinition.Parameters.Add(param1);

            param1 = new Parameter("RevolveCamera", "true");
            transitionDefinition.Parameters.Add(param1);

            param1 = new Parameter("ShowAFront", "true");
            transitionDefinition.Parameters.Add(param1);

            param1 = new Parameter("ShowABack", "false");
            transitionDefinition.Parameters.Add(param1);

            param1 = new Parameter("ShowBFront", "false");
            transitionDefinition.Parameters.Add(param1);

            param1 = new Parameter("ShowBBack", "true");
            transitionDefinition.Parameters.Add(param1);

            param1 = new Parameter("ScaleA", 1.0);
            transitionDefinition.Parameters.Add(param1);

            param1 = new Parameter("InitialScaleA", 1.0);
            transitionDefinition.Parameters.Add(param1);

            param1 = new Parameter("Red", 1.0);
            transitionDefinition.Parameters.Add(param1);


            param1 = new Parameter("Green", 1.0);
            transitionDefinition.Parameters.Add(param1);

            param1 = new Parameter("Blue", 1.0);
            transitionDefinition.Parameters.Add(param1);

           
            
            param1 = new Parameter("ExponentialProgressScale", 1.0);
            transitionDefinition.Parameters.Add(param1);
           
            return transitionDefinition;

 

        }

May 31, 2011 at 1:51 PM

The "Simple3D" effects Library does not work with Splicer. I had attempted a panning effect using a similar method and encountered pretty much the same video distortion which you described. To put it simply, any effect/transition which would use the "Simple3D" effects/transition library needs to be coded by hand. That being said, when you programmatically create images, Splicer creates a copy of that image on your HDD and then adds the image to the timeline. This saving and loading process slows down the render process A LOT. A single pan for 320x180 video for 3 seconds added 30 seconds to my render time on a 3.20 GHz Pentium 4 with Hyper Threading and 2 GB RAM. The memory usage was minimal, while the processor usage spiked to a full 100%.

When trying to do more complex effects and transitions, such as any implemented with "Simple3D", it may be best to look into other methods than Splicer such as AVIWriter (http://www.adp-gmbh.ch/csharp/avi/write_avi.html). Note that with AVIWriter, all effects and transitions, and the logic to apply them, will need to be written in c#. Using GDI+, this is not a too terribly difficult task.