The sample source codes on this page shows how to set audio track in VB.NET. ByteScout SWF To Video SDK: the specialized software development kit for programmers who need to add SWF (Flash Macromedia) to video conversion into their app. Supports WMV and AVI video output with sound as can take input flash movies with variables, actionscripts, dynamic files as input. You can control output video size, framerate, video and audio quality. It can set audio track in VB.NET.
You will save a lot of time on writing and testing code as you may just take the VB.NET code from ByteScout SWF To Video SDK for set audio track below and use it in your application. This VB.NET 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! You can use these VB.NET sample examples in one or many applications.
Our website provides trial version of ByteScout SWF To Video SDK for free. It also includes documentation and source code samples.
' x64 IMPORTANT NOTE: set CPU to x86 to build in x86 mode Imports BytescoutSWFToVideo Module Module1 Sub Main() ' Create an instance of SWFToVideo ActiveX object Dim converter As 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 video file 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 = Nothing ' Open the result movie in default media player Process.Start("result.avi") End Sub End Module