How to Convert SWF to Lossless AVI 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 Lossless AVI Using SWF To Video SDK

  • Home
  • /
  • Articles
  • /
  • How to Convert SWF to Lossless AVI Using SWF To Video SDK
This example shows how to convert SWF flash movie to lossless AVI video in Visual Basic or C# using Bytescout Lossless Video Codec.

Bytescout Lossless Video Codec is the lossless video compression and decompression codec for Windows and Windows x64. Lossless Video Codec is included with Bytescout SWF To Video SDK.

Visual Basic .NET

Imports System.Diagnostics
Imports BytescoutSWFToVideo

Class Program
    Friend Shared Sub Main(args As String())

        ' Please make sure the Bytescout Lossless Video Codec is installed on the computer 
        ' Bytescout lossless video codec is available for free from 
        ' https://bytescout.com/lossless_video_codec_for_avi.html


        ' 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 empty video codec name to get the output video uncompressed
        converter.CurrentVideoCodecName = "bytescout lossless"


            ' Set input SWF file
            converter.InputSWFFileName = "Shapes.swf"
    
            ' Set output video file
            converter.OutputVideoFileName = "result.avi"

        ' Set output movie dimensions
        converter.OutputWidth = 320
        converter.OutputHeight = 240

        ' Run conversion
        converter.RunAndWait()

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

    End Sub
End Class
Visual C#

using System.Diagnostics;
using BytescoutSWFToVideo;

namespace SwfToLosslessAvi
{
    class Program
    {
        static void Main(string[] args)

        {
            // Please make sure the Bytescout Lossless Video Codec is installed on the computer 
            // Bytescout lossless video codec is available for free from 
            // https://bytescout.com/lossless_video_codec_for_avi.html


            // 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 empty video codec name to get the output video uncompressed
            converter.CurrentVideoCodecName = "bytescout lossless";

            // set input SWF file

            converter.InputSWFFileName = "Shapes.swf";

                // set output AVI video filename
                converter.OutputVideoFileName = "result.avi";

            
            // Set output movie dimensions
            converter.OutputWidth = 320;
            converter.OutputHeight = 240;

            // Run conversion
            converter.RunAndWait();

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

        }
    }
}

Tutorials:

prev
next