Getting Started with 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!

Getting Started with SWF To Video SDK

  • Home
  • /
  • Getting Started with SWF To Video SDK

To view the documentation for the SDK go to Start > All Programs > Bytescout SWF To Video SDK and click the “Documentation” link.

The SDK comes with lot of ready-to-use source code examples for Visual Basic, C#, ASP.NET, VB6, VBScript.

To find source code samples please go to “My Documents” folder, “ByteScout Samples” and “SWF To Video SDK”. Do not hesitate to copy and paste code snippets from samples right into your application!

The First Application

To help you get the most out of your evaluation, here is the quick information on converting SWF and FLV files into WMV, AVI video in your application.

  • run Visual Studio and create New Project
  • add reference to SWF To Video SDK using Project | Add Reference. In the Add Reference dialog select “Bytescout SWF To Video Lib” and click OK.
  • copy-and-paste the following code:

Visual Basic:

Imports <span data-scayt_word="BytescoutSWFToVideoLib" data-scaytid="662">BytescoutSWFToVideoLib</span>

Module <span data-scayt_word="Module1" data-scaytid="664">Module1</span>

Sub Main()

' Create an instance of <span data-scayt_word="SWFToVideo" data-scaytid="665">SWFToVideo</span> ActiveX object
Dim converter As New <span data-scayt_word="SWFToVideo" data-scaytid="666">SWFToVideo</span>()

' Set debug log
'<span data-scayt_word="converter.SetLogFile" data-scaytid="672">converter.SetLogFile</span>("<span data-scayt_word="log.txt" data-scaytid="674">log.txt</span>")

' Register <span data-scayt_word="SWFToVideo" data-scaytid="667">SWFToVideo</span>
<span data-scayt_word="converter.RegistrationName" data-scaytid="676">converter.RegistrationName</span> = "demo"
<span data-scayt_word="converter.RegistrationKey" data-scaytid="678">converter.RegistrationKey</span> = "demo"

' Set input SWF file
<span data-scayt_word="converter.InputSWFFileName" data-scaytid="680">converter.InputSWFFileName</span> = "<span data-scayt_word="SlideShowWithEffects.swf" data-scaytid="682">SlideShowWithEffects.swf</span>"

' Set output <span data-scayt_word="WMV" data-scaytid="656">WMV</span> or <span data-scayt_word="AVI" data-scaytid="660">AVI</span> video file
<span data-scayt_word="converter.OutputVideoFileName" data-scaytid="684">converter.OutputVideoFileName</span> = "<span data-scayt_word="result.wmv" data-scaytid="686">result.wmv</span>"

' Set output movie dimensions
<span data-scayt_word="converter.OutputWidth" data-scaytid="690">converter.OutputWidth</span> = 640
<span data-scayt_word="converter.OutputHeight" data-scaytid="692">converter.OutputHeight</span> = 480

' Run conversion
<span data-scayt_word="converter.RunAndWait" data-scaytid="694">converter.RunAndWait</span>()

' Open the result movie in default media player
<span data-scayt_word="Process.Start" data-scaytid="696">Process.Start</span>("<span data-scayt_word="result.wmv" data-scaytid="687">result.wmv</span>")

End Sub

End Module

C#:

using <span data-scayt_word="System.Diagnostics" data-scaytid="698">System.Diagnostics</span>;
using <span data-scayt_word="BytescoutSWFToVideoLib" data-scaytid="663">BytescoutSWFToVideoLib</span>;

<span data-scayt_word="namespace" data-scaytid="699">namespace</span> Simple
{
class Program
{
static void Main(string[] <span data-scayt_word="args" data-scaytid="700">args</span>)
{
// Create an instance of <span data-scayt_word="SWFToVideo" data-scaytid="668">SWFToVideo</span> ActiveX object

<span data-scayt_word="SWFToVideo" data-scaytid="669">SWFToVideo</span> converter = new <span data-scayt_word="SWFToVideo" data-scaytid="670">SWFToVideo</span>();

// Set debug log
//<span data-scayt_word="converter.SetLogFile" data-scaytid="673">converter.SetLogFile</span>("<span data-scayt_word="log.txt" data-scaytid="675">log.txt</span>");

// Register <span data-scayt_word="SWFToVideo" data-scaytid="671">SWFToVideo</span>
<span data-scayt_word="converter.RegistrationName" data-scaytid="677">converter.RegistrationName</span> = "demo";
<span data-scayt_word="converter.RegistrationKey" data-scaytid="679">converter.RegistrationKey</span> = "demo";

// set input SWF file
<span data-scayt_word="converter.InputSWFFileName" data-scaytid="681">converter.InputSWFFileName</span> = "<span data-scayt_word="SlideShowWithEffects.swf" data-scaytid="683">SlideShowWithEffects.swf</span>";

// set output <span data-scayt_word="WMV" data-scaytid="657">WMV</span> or <span data-scayt_word="AVI" data-scaytid="661">AVI</span> video filename
<span data-scayt_word="converter.OutputVideoFileName" data-scaytid="685">converter.OutputVideoFileName</span> = "<span data-scayt_word="result.wmv" data-scaytid="688">result.wmv</span>";


// Set output movie dimensions
<span data-scayt_word="converter.OutputWidth" data-scaytid="691">converter.OutputWidth</span> = 640;
<span data-scayt_word="converter.OutputHeight" data-scaytid="693">converter.OutputHeight</span> = 480;

// Run conversion
<span data-scayt_word="converter.RunAndWait" data-scaytid="695">converter.RunAndWait</span>();

// Open the result movie in default media player
<span data-scayt_word="Process.Start" data-scaytid="697">Process.Start</span>("<span data-scayt_word="result.wmv" data-scaytid="689">result.wmv</span>");
}
}
}
  • press F5 to compile and run your first application!

The application converts given SWF file saves into WMV video file.

More Samples

For more source code samples go to “ByteScout Samples / SWF To Video SDK” folder in “My Documents”.

Evaluation version adds a reminder text at the bottom of output video file.

You are welcome to purchase a license for the SDK at http://bytescout.com/buy/swftovideosdk.html

We provide 30-Day Unconditional Money Back Guarantee for the SDK!

Have a Question?

Contact us at support@bytescout.com or use the online contact form at https://bytescout.com/support/index.php?_m=tickets&_a=submit&step=1&departmentid=2

Thanks again for evaluating  SWF To Video SDK!

[socialpug_share]

Tutorials: