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.

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

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