加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

c# – 我如何在ffmpeg arguments命令行中知道每个参数的作用?

发布时间:2020-12-15 21:51:25 所属栏目:百科 来源:网络整理
导读:我有这个代码: 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
我有这个代码:

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:pipetestpipetestffmpegx86ffmpeg.exe";
            process.EnableRaisingEvents = false;
            process.StartInfo.WorkingDirectory = @"D:pipetestpipetestffmpegx86";
            process.StartInfo.Arguments = @"-f rawvideo -pix_fmt rgb24 -video_size 1280x720 -i
                                          .pipemytestpipe -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?

尝试谷歌这种论点格式,但没有找到任何.

我有4个文本文件列表:

两个文件中的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!)并验证!

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读