ByteScout SWF To Video SDK - C# - Multiple Conversions At Once - ByteScout

ByteScout SWF To Video SDK – C# – Multiple Conversions At Once

  • Home
  • /
  • Articles
  • /
  • ByteScout SWF To Video SDK – C# – Multiple Conversions At Once

multiple conversions at once in C# and ByteScout SWF To Video SDK

Write code in C# to make multiple conversions at once with this How-To tutorial

These source code samples are listed and grouped by their programming language and functions they use. ByteScout SWF To Video SDK was made to help with multiple conversions at once in C#. ByteScout SWF To Video SDK is the SDK that is capable of converting SWF macromedia files into WMV and AVI video. Supports dynamic flash movies, can transmit variable values. Options to change output video size, framerate, quality are available.

C# code snippet like this for ByteScout SWF To Video SDK works best when you need to quickly implement multiple conversions at once in your C# application. This C# sample code should be copied and pasted into your application’s code editor. Then just compile and run it to see how it works. Enjoy writing a code with ready-to-use sample C# codes to implement multiple conversions at once using ByteScout SWF To Video SDK.

ByteScout SWF To Video SDK is available as free trial. You may get it from our website along with all other source code samples for C# applications.

Try ByteScout SWF To Video SDK today: Get 60 Day Free Trial or sign up for Web API

Program.cs
      
using System; using System.Threading; using BytescoutSWFToVideo; namespace MultipleInstances { class Program { private static int _numBusy; private static ManualResetEvent _doneEvent; static void Main(string[] args) { _doneEvent = new ManualResetEvent(false); Console.WriteLine("Converting SWF movies to video in multiple threads, please wait..."); _numBusy = 3; // start 3 conversion threads ThreadPool.QueueUserWorkItem(DoWork, 1); ThreadPool.QueueUserWorkItem(DoWork, 2); ThreadPool.QueueUserWorkItem(DoWork, 3); // wait for all threads finished _doneEvent.WaitOne(); Console.WriteLine("All threads are finished. Press any key to continue.."); Console.ReadKey(); } static void DoWork(object data) { int index = (int)data; try { Console.WriteLine("Thread {0} started...", index); // Create BytescoutImageToVideo.ImageToVideo object instance SWFToVideo converter = new SWFToVideo(); // Activate the component converter.RegistrationName = "demo"; converter.RegistrationKey = "demo"; converter.SWFConversionMode = SWFConversionModeType.SWFAnimation; // set input SWF file converter.InputSWFFileName = string.Format("movie{0}.swf", index); // Set output video file name converter.OutputVideoFileName = String.Format("result_{0}.wmv", index); // set FPS converter.FPS = 29.97f; // Set output video size converter.OutputWidth = 640; converter.OutputHeight = 480; // Run the conversion converter.RunAndWait(); // Release resources System.Runtime.InteropServices.Marshal.ReleaseComObject(converter); Console.WriteLine("Thread {0} finished.", index); } catch (Exception ex) { Console.WriteLine("Thread {0} failed: {1}", index, ex.Message); } if (Interlocked.Decrement(ref _numBusy) == 0) { _doneEvent.Set(); } } } }

Try ByteScout SWF To Video SDK today: 60 Day Free Trial (on-premise version) or sign up for Web API (on demand version)

VIDEO

ON-PREMISE VERSION

Get 60 Day Free Trial or Visit ByteScout SWF To Video SDK page

Explore ByteScout SWF To Video SDK documentation

WEB API

Sign Up for free Web API key

Explore Web API Documentation

Tutorials:

prev
next