FFmpegを使用して、ビデオ(mpeg2)をjpgに変換し、出力を標準出力にリダイレクトしました。
StringBuilder str = new StringBuilder();
//Input file path
str.Append(string.Format(" -i {0}", myinputFile));
//Set the frame rate
str.Append(string.Format(" -r {0}", myframeRate);
//Indicate the output format
str.Append(" -f image2pipe");
//Connect the output to the standard output
str.Append(" pipe:1");
return str.ToString();
データを使用してプロセスからコールバックを受け取ることができます。
_ffmpegProc.OutputDataReceived += new DataReceivedEventHandler(_ffmpegProc_OutputDataReceived);
しかし、どうすればそれをjpgファイルに保存できますか?各jpgのサイズを知る必要がありますが、その方法がわかりません。
ありがとう。