私はこのコードを持っています:
public void Start(string FileName, Bitmap Sample_Bitmap, int BitmapRate )
{
p = new NamedPipeServerStream(pipename, PipeDirection.Out, 1, PipeTransmissionMode.Byte);
byte[] b = new byte[1280 * 720 * 3]; // some buffer for the r g and b of pixels of an image of size 720p
System.Diagnostics.Process process = new System.Diagnostics.Process();
process.StartInfo.FileName = @"D:\pipetest\pipetest\ffmpegx86\ffmpeg.exe";
process.EnableRaisingEvents = false;
process.StartInfo.WorkingDirectory = @"D:\pipetest\pipetest\ffmpegx86";
process.StartInfo.Arguments = @"-f rawvideo -pix_fmt rgb24 -video_size 1280x720 -i
\\.\pipe\mytestpipe -map 0 -c:v libx264 -r " + BitmapRate + " " + FileName;
process.Start();
process.StartInfo.UseShellExecute = false;
process.StartInfo.CreateNoWindow = false;
p.WaitForConnection();
}
だから私は BitmapRate が何をするか、そして FileName が残りの引数を知っています。
それが意味するもの-f ?
と生のビデオは、デコーダーまたはエンコーダーからの? -i ? -c:v ? libx264
コーデックが私が推測するものであり、-r ?
この引数形式をグーグルで検索しようとしましたが、何も見つかりませんでした。
4 つのテキスト ファイル リストがあります。
encoders.txt decoders.txt
両方のファイルに rawvideo もあります。ファイルがありpixfmts.txt and fileformats.txt
ます。
変数から引数文字列を作成したい。
たとえば、BitmapRate は int で、FileName は文字列です。そして、残りの引数は、関数で取得するためにそれぞれどのタイプの変数を配置する必要がありますか?
例えば
rgb24 はどのタイプですか? 1280x720 は、どのタイプの変数である必要がありますか?