C#

c# 동영상 녹화

탑~! 2014. 5. 13. 19:25

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)
                {
                    ;
                }
        }
    }
}


Interop.BytescoutScreenCapturingLib.dll



출처 : http://windblack.tistory.com/





728x90
반응형