ByteScout SWF To Video SDK - C++ - SWF To Video - 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!

ByteScout SWF To Video SDK – C++ – SWF To Video

  • Home
  • /
  • Articles
  • /
  • ByteScout SWF To Video SDK – C++ – SWF To Video

SWF to video in C++ with ByteScout SWF To Video SDK

Make SWF to video in C++

:

Tutorial on how to do SWF to video in C++

Every ByteScout tool contains example C++ source codes that you can find here or in the folder with installed ByteScout product. ByteScout SWF To Video SDK was made to help with SWF to video in C++. ByteScout SWF To Video SDK is 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.

C++ code snippet like this for ByteScout SWF To Video SDK works best when you need to quickly implement SWF to video in your C++ application. In order to implement this functionality, you should copy and paste code below into your app using code editor. Then compile and run your application. Enhanced documentation and tutorials are available along with installed ByteScout SWF To Video SDK if you’d like to dive deeper into the topic and the details of the API.

Free trial version of ByteScout SWF To Video SDK is available on our website. Get it to try other samples for C++.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

Simple.cpp
      
#include "stdafx.h" #import "BytescoutSWFToVideo.dll" using namespace BytescoutSWFToVideo; int _tmain(int argc, _TCHAR* argv[]) { ::CoInitialize(0); // Create an instance of SWFToVideo ActiveX object CLSID clsid; CLSIDFromProgID(OLESTR("BytescoutSWFToVideo.SWFToVideo"), &clsid); ISWFToVideo* swfToVideo = NULL; ::CoCreateInstance(clsid, NULL, CLSCTX_ALL, __uuidof(ISWFToVideo), (LPVOID*) &swfToVideo); if (!swfToVideo) { _ftprintf(stdout, _T("SWF To Video filter is not installed properly. Can't continue\n")); ::CoUninitialize(); return 1; } // Set debug log //swfToVideo->SetLogFile("log.txt"); // Register SWFToVideo swfToVideo->put_RegistrationName(L"demo"); swfToVideo->put_RegistrationKey(L"demo"); // set input SWF file swfToVideo->put_InputSWFFileName(L"SlideShowWithEffects.swf"); // you may calculate output video duration using information about the the source swf movie // WARNING #1: this method to calculate the output video duration is not working for movies with dynamic scenes //and interactive scripts as in these movies it is not possible to calculate the precise duration of the movie //WARNING #2: you should set the input swf or flv filename (or url) before this calculation //So the movie duration is calculated as the following: //as swf frame count (number of frames in the swf) / movieFPS (frames per second defined in swf) //and then multiplied by 1000 (as we are setting the .ConverstionTimeout in milliseconds) //as the following (uncomment if you want to set the length of the output video to the same as the original swf) //or as the following source code (uncomment to enable): //converter->put_ConversionTimeout( 1000 * (converter->get_FrameCount() / converter.get_MovieFPS())); // set output WMV or AVI video filename swfToVideo->put_OutputVideoFileName(L"result.wmv"); // Set output movie dimensions swfToVideo->put_OutputWidth(640); swfToVideo->put_OutputHeight(480); // Run conversion HRESULT hr = swfToVideo->RunAndWait(); // Cleanup swfToVideo->Release(); swfToVideo = NULL; ::CoUninitialize(); return 0; }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout SWF To Video SDK Home Page

Explore ByteScout SWF To Video SDK Documentation

Explore Samples

Sign Up for ByteScout SWF To Video SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

stdafx.cpp
      
// stdafx.cpp : source file that includes just the standard includes // Simple.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "stdafx.h" // TODO: reference any additional headers you need in STDAFX.H // and not in this file

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout SWF To Video SDK Home Page

Explore ByteScout SWF To Video SDK Documentation

Explore Samples

Sign Up for ByteScout SWF To Video SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

stdafx.h
      
// stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, but // are changed infrequently // #pragma once // Modify the following defines if you have to target a platform prior to the ones specified below. // Refer to MSDN for the latest info on corresponding values for different platforms. #ifndef WINVER // Allow use of features specific to Windows XP or later. #define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows. #endif #ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later. #define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows. #endif #ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later. #define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later. #endif #ifndef _WIN32_IE // Allow use of features specific to IE 6.0 or later. #define _WIN32_IE 0x0600 // Change this to the appropriate value to target other versions of IE. #endif #include <stdio.h> #include <tchar.h> #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit #include <atlbase.h> #include <atlstr.h> #include <conio.h>

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout SWF To Video SDK Home Page

Explore ByteScout SWF To Video SDK Documentation

Explore Samples

Sign Up for ByteScout SWF To Video SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout SWF To Video SDK Home Page

Explore ByteScout SWF To Video SDK Documentation

Explore Samples

Sign Up for ByteScout SWF To Video SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next