ByteScout Screen Capturing SDK - C++ (managed) - Record Screen Video and Add Time Stamp - ByteScout

ByteScout Screen Capturing SDK – C++ (managed) – Record Screen Video and Add Time Stamp

  • Home
  • /
  • Articles
  • /
  • ByteScout Screen Capturing SDK – C++ (managed) – Record Screen Video and Add Time Stamp

How to record screen video and add time stamp in C++ (managed) using ByteScout Screen Capturing SDK

How to record screen video and add time stamp in C++ (managed)

The documentation is designed to help you to implement the features on your side. ByteScout Screen Capturing SDK can record screen video and add time stamp. It can be used from C++ (managed). ByteScout Screen Capturing SDK is the SDK for developers for quick implementation of screen video recording. The SDK records screen into video or into a series of screenshots. Can also record audio. Saves video into AVI,WMV and Google’s WebM. Output video quality, size, resolution or framerate can be adjusted easily. Provides additional tools for privacy features like blacking out on scren areas with sensitive information on screen right during recording. Supports web camera as input and can add instant text and images into video output.

Fast application programming interfaces of ByteScout Screen Capturing SDK for C++ (managed) plus the instruction and the code below will help you quickly learn how to record screen video and add time stamp. In order to implement the functionality, you should copy and paste this code for C++ (managed) below into your code editor with your app, compile and run your application. Detailed tutorials and documentation are available along with installed ByteScout Screen Capturing SDK if you’d like to dive deeper into the topic and the details of the API.

ByteScout Screen Capturing SDK free trial version is available on our website. C++ (managed) and other programming languages are supported.

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

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

AssemblyInfo.cpp
      
#include "stdafx.h" using namespace System; using namespace System::Reflection; using namespace System::Runtime::CompilerServices; using namespace System::Runtime::InteropServices; using namespace System::Security::Permissions; // // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. // [assembly:AssemblyTitleAttribute("CaptureFromEntireScreen")]; [assembly:AssemblyDescriptionAttribute("")]; [assembly:AssemblyConfigurationAttribute("")]; [assembly:AssemblyCompanyAttribute("")]; [assembly:AssemblyProductAttribute("CaptureFromEntireScreen")]; [assembly:AssemblyCopyrightAttribute("Copyright (c) 2011")]; [assembly:AssemblyTrademarkAttribute("")]; [assembly:AssemblyCultureAttribute("")]; // // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the value or you can default the Revision and Build Numbers // by using the '*' as shown below: [assembly:AssemblyVersionAttribute("1.0.*")]; [assembly:ComVisible(false)]; [assembly:CLSCompliantAttribute(true)]; [assembly:SecurityPermission(SecurityAction::RequestMinimum, UnmanagedCode = true)];

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Screen Capturing SDK Home Page

Explore ByteScout Screen Capturing SDK Documentation

Explore Samples

Sign Up for ByteScout Screen Capturing SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

CaptureFromEntireScreen.cpp
      
// CaptureFromEntireScreen.cpp : main project file. #include "stdafx.h" using namespace System; using namespace System::Threading; using namespace System::Diagnostics; using namespace BytescoutScreenCapturingLib; int main(array<System::String ^> ^args) { // Create Capturer instance Capturer ^capturer = gcnew Capturer(); capturer->RegistrationName = "demo"; capturer->RegistrationKey = "demo"; // Set capturing type capturer->CapturingType = CaptureAreaType::catScreen; // show recording time stamp capturer->OverlayingRedTextCaption = "Recording: {RUNNINGMIN}:{RUNNINGSEC}:{RUNNINGMSEC} on {CURRENTYEAR}-{CURRENTMONTH}-{CURRENTDAY} at {CURRENTHOUR}:{CURRENTMIN}:{CURRENTSEC}:{CURRENTMSEC}"; // Set output video width and height capturer->OutputWidth = 640; capturer->OutputHeight = 480; // WMV and WEBM output use WMVVideoBitrate property to control output video bitrate // so try to increase it by x2 or x3 times if you think the output video are you are getting is laggy // capturer->put_WMVVideoBitrate(capturer->WMVVideoBitrate * 2); // Set output file name capturer->OutputFileName = "Output.wmv"; // uncomment to enable recording of semitransparent or layered windows (Warning: may cause mouse cursor flickering) // capturer->CaptureTransparentControls = true; // Start capturing capturer->Run(); // IMPORTANT: if you want to check for some code if need to stop the recording then make sure you are // using Thread.Sleep(1) inside the checking loop, so you have the loop like // Do { // Thread.Sleep(1) // } // While(StopButtonNotClicked); Console::WriteLine("Capture the desktop for 5s..."); // Wait for 5 seconds Thread::Sleep(5000); // Stop capturing capturer->Stop(); // Release resources System::Runtime::InteropServices::Marshal::ReleaseComObject(capturer); //capturer = NULL; Console::WriteLine("Done."); // Open the capture video in default associated application Process::Start("Output.wmv"); return 0; }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Screen Capturing SDK Home Page

Explore ByteScout Screen Capturing SDK Documentation

Explore Samples

Sign Up for ByteScout Screen Capturing SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

resource.h
      
//{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by app.rc

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Screen Capturing SDK Home Page

Explore ByteScout Screen Capturing SDK Documentation

Explore Samples

Sign Up for ByteScout Screen Capturing 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 // CaptureFromEntireScreen.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "stdafx.h"

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Screen Capturing SDK Home Page

Explore ByteScout Screen Capturing SDK Documentation

Explore Samples

Sign Up for ByteScout Screen Capturing 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 // TODO: reference additional headers your program requires here

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Screen Capturing SDK Home Page

Explore ByteScout Screen Capturing SDK Documentation

Explore Samples

Sign Up for ByteScout Screen Capturing 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 Screen Capturing SDK Home Page

Explore ByteScout Screen Capturing SDK Documentation

Explore Samples

Sign Up for ByteScout Screen Capturing SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next