C# 如何在ffmpeg arguments命令行中知道每个参数的作用?
我有以下代码:C# 如何在ffmpeg arguments命令行中知道每个参数的作用?,c#,winforms,ffmpeg,C#,Winforms,Ffmpeg,我有以下代码: 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
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的作用和文件名,但知道其余的参数
它是什么意思-f?
而原始视频是来自解码器或编码器-我-c:v?我想libx264是一个编解码器,-r?
试图通过谷歌搜索此参数格式,但未找到任何参数
我有4个文本文件列表:
encoders.txt decoders.txt
在这两个文件中我也有rawvideo。
我有pixfmts.txt和fileformats.txt
文件
我想从变量中构建参数字符串
例如,位图速率为int,文件名为string。剩下的参数是什么类型的变量,每个变量我应该放在函数中
比如说
rgb24是什么类型的?1280x720是什么类型的变量呢
应该是吗
你看到这个链接了吗
它可能会回答您关于参数的一些问题,包括1280x720。通过这个,希望您能够映射到您的需求(使用ffmpeg.exe!)并进行验证