내용 보기

작성자

관리자 (IP : 172.17.0.1)

날짜

2020-07-10 05:02

제목

[C#] C# 동영상 녹화


using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.Runtime.InteropServices;
using BytescoutScreenCapturingLib;
 
namespace BytescoutScreenCapturing
{
    class Program
    {
        static void Main(string[] args)
        {
            //속성- 대상 프레임워크 3.5로 줘야 captureclass 먹힘
          
                CapturerClass capturer = new CapturerClass();
                capturer.CapturingType = CaptureAreaType.catScreen;
                capturer.OutputFileName = "C:\\Record\\222.avi"//WMV,AVI 파일로 
                capturer.OutputWidth = 1920;
                capturer.OutputHeight = 1080;
 
                try
                {
                    capturer.Run();
                    Thread.Sleep(5000); //게스트계정으로 사용중일때만으로 고쳐주야댐
                    capturer.Stop();
                }
                catch (COMException)
                {
                    ;
                }
        }
    }
}
cs


출처1

출처2