#include <iostream>
#include <stdlib.h>
using namespace std;
int main()
{
string in = "1.jpg";
string out = "out.jpg";
string font = "simhei.ttf";
string fontSize = "40";
string wm = "测试-测试-±abcD测试1234测试#测试";
string mf = "测试-1970-01-01";
string s = "ffmpeg -i " + in + " -vf drawtext=\"fontcolor=white:fontfile=" + font + ":fontsize=" + fontSize + ":x=0:y=0+th::alpha=0.65:box=1:boxcolor=0x000000:text='测试\\:1970-01-01 19\\:30\\:00\" -y " + out;
system(s.c_str());
s = "ffmpeg -i " + out + " -vf drawtext=\"fontcolor=white:fontfile=" + font + ":fontsize=" + fontSize + ":x=w-tw-th/2:y=h-th-th::alpha=0.65:box=1:boxcolor=0x000000:text='" + wm + "\" -y " + out;
system(s.c_str());
s = "ffmpeg -i " + out + " -vf drawtext=\"fontcolor=white:fontfile=" + font + ":fontsize=" + fontSize + ":x=0:y=h-th-th::alpha=0.65:box=1:boxcolor=0x000000:text='" + mf + "\" -y " + out;
system(s.c_str());
return 0;
}