.net - 使用 .NET 将 ffmpeg 管道传输到 oggenc(2)

标签 .net ffmpeg stdout stdin pipe

我正在尝试以 -q 6/192k 对 ogg 文件进行编码。 ffmpeg 似乎没有在听我的命令

ffmpeg -i blah -acodec vorbis -ab 192k -y out.ogg

所以我想使用 recommended ogg encoder .它说输入必须是 wav 或类似的。我想将 wav 从 ffmpeg 传输到 ogg。但是,我不仅不确定 oggenc2 是否会接受来自标准输入的输入,而且我不知道如何使用 Process 类将一个进程通过管道传输到 .net 内部的另一个进程。

最佳答案

首先,AFAIK

Oggenc2

Command line encoder - allows direct input of '.flac', '.ape', '.wv', '.pac', '.ofr' and '.shn' files - ICL7.1 compile



假设你不需要

to pipe one process to another inside of .net using the Process class



因为有一种更简单的方法可以做到这一点。尝试以下构造:
ffmpeg -i audio.mp3 -f flac - | oggenc2.exe - -o audio.ogg

此命令转换输入 mp3文件(我没有在我的电脑上找到其他音频文件)到 flac并将其发送至 stdout ,转到 stdinoggenc2通过使用管道(|)。

你唯一需要做的就是写一个 . NET要运行的包装器 ffmpeg .

关于.net - 使用 .NET 将 ffmpeg 管道传输到 oggenc(2),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2475843/

相关文章:

ffmpeg - 错误:Output file #0 does not contain any stream (ffmpeg)

python - 在 Python 中将实时标准输出记录到文件中?

c# - 如果第一个代码正在执行,如何等待?

c# - 为 Visual Studio 编写解决方案分析器

Docker 构建依赖于主机 Ubuntu 版本而不是实际的 Docker 文件

c++ - 如何检查来自 perror 的错误消息?

java - 如何无延迟地读取Java InputStream?

asp.net - 系统.IO.FileLoadException : Loading this assembly would produce a different grant set from other instances

c# - 替换 .net 中的标准异常/错误表单

ffmpeg - 如何使用 ffmpeg 更改 Elecard 流分析器中显示的 slice_type?