Free Trial
Web API version
Licensing
HAVE QUESTIONS OR NEED HELP? SUBMIT THE SUPPORT REQUEST FORM or write email to SUPPORT@BYTESCOUT.COM
Set Audio Track | C#
Program.cs:
C#
// x64 IMPORTANT NOTE: set CPU to x86 to build in x86 mode. using System.Diagnostics; using BytescoutSWFToVideo; namespace SetAudioTrack { class Program { static void Main(string[] args) { // Create an instance of SWFToVideo ActiveX object SWFToVideo converter = new SWFToVideo(); // Set debug log //converter.SetLogFile("log.txt"); // Register SWFToVideo converter.RegistrationName = "demo"; converter.RegistrationKey = "demo"; // set input SWF file converter.InputSWFFileName = "SlideShowWithEffects.swf"; // set output AVI video filename converter.OutputVideoFileName = "result.avi"; // Set background music converter.ExternalAudioTrackFromFileName = "bgmusic.mp3"; // Set output audio codec converter.CurrentAudioCodecName = "ADPCM"; // Set output movie dimensions converter.OutputWidth = 640; converter.OutputHeight = 480; // Run conversion converter.RunAndWait(); // release resources System.Runtime.InteropServices.Marshal.ReleaseComObject(converter); converter = null; // Open the result movie in default media player Process.Start("result.avi"); } } }