ByteScout Image To Video SDK - C# - Conversion Progress - ByteScout

ByteScout Image To Video SDK – C# – Conversion Progress

  • Home
  • /
  • Articles
  • /
  • ByteScout Image To Video SDK – C# – Conversion Progress

conversion progress in C# using ByteScout Image To Video SDK

conversion progress in C#

Sample source codes below will show you how to cope with a difficult task, for example, conversion progress in C#. ByteScout Image To Video SDK helps with conversion progress in C#. ByteScout Image To Video SDK is the library for conversion of images into video slideshow. Provides built-in support for more than hundred of 2D and 3D transition effects. Output formats supported are AVI,WMV and WEBM video files. You may adjust output video size, quality, framerate and add audio.

C# code snippet like this for ByteScout Image To Video SDK works best when you need to quickly implement conversion progress in your C# application. Follow the instruction from the scratch to work and copy and paste code for C# into your editor. Code testing will allow the function to be tested and work properly with your data.

Trial version can be downloaded from our website. Source code samples for C# and documentation are included.

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.Diagnostics; using System.Threading; using BytescoutImageToVideo; namespace ConversionProgress { class Program { static void Main(string[] args) { Console.WriteLine("Converting JPG slides to video, please wait..."); // Create BytescoutImageToVideoLib.ImageToVideo object instance ImageToVideo converter = new ImageToVideo(); // Activate the component converter.RegistrationName = "demo"; converter.RegistrationKey = "demo"; // Add images and set the duration for every slide Slide slide; slide = converter.AddImageFromFileName("..\\..\\..\\..\\slide1.jpg"); slide.Duration = 3000; // 3000ms = 3s slide = converter.AddImageFromFileName("..\\..\\..\\..\\slide2.jpg"); slide.Duration = 3000; slide = converter.AddImageFromFileName("..\\..\\..\\..\\slide3.jpg"); slide.Duration = 3000; // Set output video size converter.OutputWidth = 640; converter.OutputHeight = 480; // Set output video file name converter.OutputVideoFileName = "result.wmv"; Console.WriteLine("Conversion started. Hit a key to abort..."); // Run the conversion converter.Run(); // Show conversion progress: int i = 0; char[] spin = new char[] { '|', '/', '-', '\\' }; while (!Console.KeyAvailable && converter.IsRunning) { float progress = converter.ConversionProgress; Console.WriteLine(String.Format("Converting images {0}% {1}", progress, spin[i++])); Console.CursorTop--; i %= 4; Thread.Sleep(50); } if (converter.IsRunning) { converter.Stop(); Console.WriteLine("Conversion aborted by user."); } else { Console.WriteLine("Conversion competed successfully."); } // Release resources System.Runtime.InteropServices.Marshal.ReleaseComObject(converter); // Open the result video file in default media player Process.Start("result.wmv"); Console.WriteLine("\nPress any key to exit..."); Console.ReadKey(); } } }

ON-PREMISE OFFLINE SDK

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

Explore ByteScout Image To Video SDK Documentation

Explore Samples

Sign Up for ByteScout Image 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 Image To Video SDK Home Page

Explore ByteScout Image To Video SDK Documentation

Explore Samples

Sign Up for ByteScout Image 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