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.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

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(); } } } }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout SWF To Video SDK Home Page

Explore ByteScout SWF To Video SDK Documentation

Explore Samples

Sign Up for ByteScout SWF To Video SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout SWF To Video SDK Home Page

Explore ByteScout SWF To Video SDK Documentation

Explore Samples

Sign Up for ByteScout SWF To Video SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next