ByteScout Image To Video SDK - C# - Replace Audio - ByteScout

ByteScout Image To Video SDK – C# – Replace Audio

  • Home
  • /
  • Articles
  • /
  • ByteScout Image To Video SDK – C# – Replace Audio

How to replace audio in C# with ByteScout Image To Video SDK

How to replace audio in C#

Learn how to replace audio in C# with this source code sample. What is ByteScout Image To Video SDK? It 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. It can help you to replace audio in your C# application.

C# code samples for C# developers help to speed up coding of your application when using ByteScout Image To Video SDK. This C# sample code is all you need for your app. Just copy and paste the code, add references (if needs to) and you are all set! Enjoy writing a code with ready-to-use sample codes in C#.

Trial version of ByteScout Image To Video SDK can be downloaded for free from our website. It also includes source code samples for C# and other programming languages.

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

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"; // set input video file converter.InputVideoFileName = "..\\..\\..\\..\\input.wmv"; // set input audio file converter.ExternalAudioTrackFromFileName = "..\\..\\..\\..\\11k16bitpcm.wav"; // Set output video file name converter.OutputVideoFileName = "ReplacedAudio.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("ReplacedAudio.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 version) or sign up for Web API (on demand version)

VIDEO

ON-PREMISE VERSION

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

Explore ByteScout Image To Video SDK documentation

WEB API

Sign Up for free Web API key

Explore Web API Documentation

Tutorials:

prev
next