string _fileName = _baseDirectory+DateTime.Now.ToString("MMddyyyyHmmss")+".AVI";
byte[] byteArray = System.Text.Encoding.UTF8.GetBytes(_fileName); _fileName = System.Text.Encoding.Default.GetString(byteArray);
VideoWriter vw = new VideoWriter(_fileName, CvInvoke.CV_FOURCC('M', 'P', '4', '2'), 30, 640, 480, true);
ps:在文件名中文很长的情况下,会报错。