ByteScout Image To Video SDK - C# - Set MP3 Audiotrack - ByteScout

ByteScout Image To Video SDK – C# – Set MP3 Audiotrack

  • Home
  • /
  • Articles
  • /
  • ByteScout Image To Video SDK – C# – Set MP3 Audiotrack

How to set mp3 audiotrack in C# using ByteScout Image To Video SDK

The tutorial shows how to set mp3 audiotrack in C#

Source code documentation samples provide quick and easy way to add a required functionality into your application. ByteScout Image To Video SDK can set mp3 audiotrack. It can be used from C#. ByteScout Image To Video SDK is the software development kit that can take a set of images and generate video slide show from them. Includes built-in support for 100+ of 2-D and 3-D slide transitions effects. Supports output in WMV, AVI, WEBM video formats.

Fast application programming interfaces of ByteScout Image To Video SDK for C# plus the instruction and the code below will help you quickly learn how to set mp3 audiotrack. In order to implement the functionality, you should copy and paste this code for C# below into your code editor with your app, compile and run your application. Use of ByteScout Image To Video SDK in C# is also explained in the documentation included along with the product.

You can download free trial version of ByteScout Image To Video SDK from our website to see and try many others source code samples for C#.

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

Program.cs
      
using System; using System.Diagnostics; using BytescoutImageToVideo; namespace SetMp3Audiotrack { class Program { static void Main(string[] args) { try { 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 slide durations 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 background music converter.ExternalAudioTrackFromFileName = "..\\..\\..\\..\\bgmusic.mp3"; // Set output video size converter.OutputWidth = 640; converter.OutputHeight = 480; // Set output video file name converter.OutputVideoFileName = "result.wmv"; // Run the conversion converter.RunAndWait(); // Release resources System.Runtime.InteropServices.Marshal.ReleaseComObject(converter); // Open the result video file in default media player Process.Start("result.wmv"); 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(); } } } }

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

VIDEO

ON-PREMISE VERSION INFORMATION

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

Explore ByteScout Image To Video SDK Documentation

Get ByteScout Image To Video SDK Free Training

WEB API

Get Your Free API Key

Explore Web API Documentation

Tutorials:

prev
next