我有这个代码:
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? rawvideo来自解码器或编码器? -一世 ? -简历 ? libx264是我猜的编解码器和-r?
尝试谷歌这种论点格式,但没有找到任何.
两个文件中的encoders.txt decoders.txt我也有rawvideo.
我有pixfmts.txt和fileformats.txt文件.
我想从变量构建参数字符串.
例如,BitmapRate是int,FileName是string.其余的论点是什么类型的变量我应该放在函数中?
例如
the rgb24 what type is it ? the 1280×720 what type of variable it
should be ?
解决方法
你看过这个链接了吗?
http://linux.die.net/man/1/ffmpeg
它可能会回答您关于参数的一些问题,包括1280×720.通过这个,希望你可以映射到你的要求(使用ffmpeg.exe!)并验证!
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。