How to convert flash movie (SWF) into video (AVI) in Visual C# using SWF To Video SDK


This sample source code demonstrates how to convert SWF to AVI in Visual C# using SWF To Video SDK.

The SDK provides set of methods and properties to accessible from .NET applications to convert SWF flash movie into AVI video file.
using System.Diagnostics;
 
using BytescoutSWFToVideoLib;
 
namespace Simple
{
    class Program
    {
 
        static void Main(string[] args)
        {
 
            // Create an instance of SWFToVideo ActiveX object
 
            SWFToVideo converter = new SWFToVideo();
 
            // Set debug log
 
            //converter.SetLogFile("log.txt");
 
            // Register SWFToVideo
            converter.RegistrationName = "demo";
 
            converter.RegistrationKey = "demo";
 
            // Add SWF file and set its output filename
            converter.SetMovie("SlideShowWithEffects.swf", "result.avi");
 
            // Set output movie dimensions
            converter.OutputWidth = 640;
            converter.OutputHeight = 480;
 
            // Run conversion
            converter.RunAndWait();
 
            // Open the result movie in default media player
            Process.Start("result.avi");
 
        }
    }
}
Filed in: SWF To Video SDK