Screen Recorder C++ FFmpeg 4.2 on Windows
Screen Recorder C++ FFmpeg 4.2 on Windows 螢幕錄影並儲存為 .mp4 檔案 (使用 Visual Studio 2019) 一. 編譯器設定 1.專案屬性 -> C\C++ -> 一般 -> 其他 Include 目錄 : D:\Dev\ffmpeg-4.2.2-win32-dev\include 2.專案屬性 -> 連結器 -> 輸入 -> 其他相依性 :在最前面加入 D:\Dev\ffmpeg-4.2.2-win32-dev\lib\*.lib;Winmm.lib 3. 專案屬性 -> 連結器 -> 進階 -> SAFESEH : NO 二.------------------------------------Source.cpp------------------------------- #include <stdlib.h> #include <stdio.h> #include <string.h> #include <math.h> #include <thread> #include<time.h> #include <iostream> using namespace std; #define __STDC_CONSTANT_MACROS extern "C" { #include <libavutil/avassert.h> #include <libavutil/channel_layout.h> #include <libavutil/opt.h> #include <libavutil/mathematics.h> #include <libavutil/timestamp.h> #include <libavformat/avformat.h> #include "libavutil/imgutils.h" #include <libswscale/swscale.h> #in...