ByteScout Image To Video SDK – VBScript – Convert WAV to WMV

  • Home
  • /
  • Articles
  • /
  • ByteScout Image To Video SDK – VBScript – Convert WAV to WMV

ByteScout Image To Video SDK – VBScript – Convert WAV to WMV

Convert.vbs

' Create an instance of BytescoutImageToVideo.ImageToVideo ActiveX object
Set converter = CreateObject("BytescoutImageToVideo.ImageToVideo")

' Activate the component
converter.RegistrationName = "demo"
converter.RegistrationKey = "demo"

' converter.SetLogFile "log.txt"

' set default in effect for slides (you can also set effects for each single slide)
converter.Slides.DefaultSlideInEffect = 1 ' teFadeIn (1) - fades in effect for slides transition
converter.Slides.DefaultSlideInEffectDuration = 500 ' 500 msec for in effect

' Add images and set the duration for every slide
Set slide = converter.AddImageFromFileName("..\..\slide1.jpg")
slide.Duration = 10000 ' 10 seconds

' Set output video size
converter.OutputWidth = 640
converter.OutputHeight = 480

' Set background wav file
converter.ExternalAudioTrackFromFileName = "sample.wav"

' Set output video file name
converter.OutputVideoFileName = "result.wmv"

' Run the conversion
converter.RunAndWait()

MsgBox "Result.wmv is ready. Script will try to open the video in default media player"

' Open result in default media player
Set shell = CreateObject("WScript.Shell")
shell.Run "result.wmv", 1, false
Set shell = Nothing

Set converter = Nothing


  Click here to get your Free Trial version of the SDK

Tutorials:

prev
next