ByteScout Image To Video SDK - C# - Batch Video Generation - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

ByteScout Image To Video SDK – C# – Batch Video Generation

  • Home
  • /
  • Articles
  • /
  • ByteScout Image To Video SDK – C# – Batch Video Generation

batch video generation in C# using ByteScout Image To Video SDK

How To: tutorial on batch video generation in C#

Source code documentation samples provide quick and easy way to add a required functionality into your application. Batch video generation in C# can be implemented with ByteScout Image To Video SDK. ByteScout Image To Video SDK is the SDK that is designed to generate video slideshow with 100+ 2d and 3D transition effects. Can generate WMV, AVI, WEBM video file with adjustable quality, framerate, output video size.

The SDK samples like this one below explain how to quickly make your application do batch video generation in C# with the help of ByteScout Image To Video SDK. C# sample code is all you need: copy and paste the code to your C# application’s code editor, add a reference to ByteScout Image To Video SDK (if you haven’t added yet) and you are ready to go! You can use these C# sample examples in one or many applications.

Trial version can be obtained from our website for free. It includes this and other source code samples for C#.

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 BytescoutImageToVideo; namespace BatchVideoGeneration { class Program { static void Main(string[] args) { try { Console.WriteLine("Converting JPG slides to video, please wait..."); for (int i = 0; i < 5; i++) { // Create BytescoutImageToVideoLib.ImageToVideo object instance ImageToVideo converter = new ImageToVideo(); // Activate the component converter.RegistrationName = "demo"; converter.RegistrationKey = "demo"; // Set output video size converter.OutputWidth = 640; converter.OutputHeight = 480; // Add images and set duration and effects for every slide Slide slide; slide = converter.AddImageFromFileName("..\\..\\..\\..\\slide1.jpg"); slide.Duration = 3000; // 3000ms = 3s slide.InEffect = TransitionEffectType.teFade; slide.OutEffect = TransitionEffectType.teFade; Release(slide); // useful to decrease memory consumption during the batch conversion but not critical slide = converter.AddImageFromFileName("..\\..\\..\\..\\slide2.jpg"); slide.Duration = 3000; slide.InEffect = TransitionEffectType.teWipeLeft; slide.OutEffect = TransitionEffectType.teWipeRight; Release(slide); slide = converter.AddImageFromFileName("..\\..\\..\\..\\slide3.jpg"); slide.Duration = 3000; slide.InEffect = TransitionEffectType.teWipeLeft; slide.OutEffect = TransitionEffectType.teWipeRight; Release(slide); // Set output video file name converter.OutputVideoFileName = "result" + i + ".wmv"; // Run the conversion converter.RunAndWait(); Console.WriteLine("Created " + converter.OutputVideoFileName); // CRITICAL! // Releases all resources consumed during the conversion Release(converter); } Console.WriteLine("Done. Press any key to continue.."); Console.ReadKey(); } catch (Exception e) { Console.WriteLine("Error: " + e.ToString()); Console.WriteLine("\nPress any key to exit"); Console.ReadKey(); } } static void Release(object o) { try { System.Runtime.InteropServices.Marshal.ReleaseComObject(o); } catch { } finally { o = null; } } } }

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