How to convert SWF to AVI video and set audiotrack from mp3 or wav audio file using SWF To Video SDK - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

How to convert SWF to AVI video and set audiotrack from mp3 or wav audio file using SWF To Video SDK

  • Home
  • /
  • Articles
  • /
  • How to convert SWF to AVI video and set audiotrack from mp3 or wav audio file using SWF To Video SDK
This sample shows the source code on how to convert SWF flash movie into AVI video and set audiotrack for output video using existing WAV or MP3 file.

The SDK provides the .ExternalAudioTrackFromFileName property. Set this property to existing WAV or MP3 filename (full path to the file) and the SDK will use this audio file as audiotrack for the output video file.

Visual Basic .NET :

Imports BytescoutSWFToVideoLib

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"

        ' Add SWF file and set its output filename
        converter.SetMovie("SlideShowWithEffects.swf", "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()

        ' Open the result movie in default media player
        Process.Start("result.avi")

    End Sub

End Module

Tutorials:

prev
next