.ConversionTimeOut property allows you to control the length of the video to be converted. If you have infinitely looped or one-frame SWF movie, you can set needed duration in milliseconds with .ConversionTimeOut property.
Imports BytescoutSWFToVideoLib Module Module1 Sub Main() ' Create an instance of SWFToVideo ActiveX object Dim converter As 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("HelloWorld.swf", "result.avi") ' This property is for one-frame or endless SWF movies. ' Will stop conversion after specified time (milliseconds). converter.ConversionTimeOut = 5000 ' 5000ms = 5s ' 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") End Sub End Module
using System.Diagnostics; using BytescoutSWFToVideoLib; namespace VideoLengthSetting { 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("HelloWorld.swf", "result.avi"); // This property is for one-frame or endless SWF movies. // Will stop conversion after specified time (milliseconds). converter.ConversionTimeOut = 5000; // 5000ms = 5s // 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"); } } }