c# - 用C#执行ffmpeg命令

标签 c# ffmpeg

嗨,谁能告诉我如何在 C# 中针对 FFmpeg 执行以下命令。

mkfifo temp1.a
mkfifo temp1.v
mkfifo temp2.a
mkfifo temp2.v
mkfifo all.a
mkfifo all.v
ffmpeg -i input1.flv -vn -f u16le -acodec pcm_s16le -ac 2 -ar 44100 - > temp1.a < /dev/null &
ffmpeg -i input2.flv -vn -f u16le -acodec pcm_s16le -ac 2 -ar 44100 - > temp2.a < /dev/null &
ffmpeg -i input1.flv -an -f yuv4mpegpipe - > temp1.v < /dev/null &
{ ffmpeg -i input2.flv -an -f yuv4mpegpipe - < /dev/null | tail -n +2 > temp2.v ; } &
cat temp1.a temp2.a > all.a &
cat temp1.v temp2.v > all.v &
ffmpeg -f u16le -acodec pcm_s16le -ac 2 -ar 44100 -i all.a \
       -f yuv4mpegpipe -i all.v \
       -sameq -y output.flv
rm temp[12].[av] all.[av]

提前谢谢你。

最佳答案

您可以使用 System.Diagnostics 命名空间中的 Process.Start 方法。

关于c# - 用C#执行ffmpeg命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4749967/

相关文章:

c# - 在 RavenDB 中将文档展平为 View 的最简单方法

c# - .NET - 用自定义控件替换现有控件,同时保留原始控件的属性/事件

c# - 找不到“位图”(是否缺少 using 指令或程序集引用?)

python - celery 撤销离开僵尸ffmpeg进程

c# - UITextField.text 的双向绑定(bind)不更新

c# - 从 app.config 文件的 web.config 部分获取值?

ffmpeg - 如何使用GPU使用ffmpeg.autogen解码MP4文件?

ffmpeg:在这个例子中设置什么速率

python - 使用 ffmpeg-python : [NULL @ 000002486ae7b180] Unable to find a suitable output format for 获取错误消息

android - 从原生 C 代码 NDK 启动 Android Java VM(ffmpeg mediacodec 使用)