0

I'm looking for a way to join separate audio and video streams into a single container.

Specifically I have VP8 video (webm container) and 16-bit PCM audio (wav container), which I'd like to combine into a Matroska container.

So far I can achieve this by saving the streams to files, and calling ffmpeg.exe by using the Process API which produces the result I need, but I'd prefer a solution that doesn't rely on saving the intermediate files to disk or requiring the ffmpeg.exe to be on the server. Any help much appreciated!

4

1 回答 1

1

如果您想避免额外的过程,您将需要一个托管的 Matroska/WebM 库,或者至少需要一个托管包装到某个本机库。我不知道任何存在/是最新的。几年前我开始写一篇,但从未完成。

在启动进程时,实际上不需要“将文件保存到磁盘”,因为您可以使用命名管道,它“看起来像磁盘上的文件”,但实际上只是某个内存值的接口 - 所以您可以直接与 ffmpeg/mkvmerge 共享内存,方法是向它们传递管道名称来代替常规文件名。但是,不需要服务器上的二进制文件也无济于事——除了将它与您的解决方案打包在一起。

于 2014-03-08T01:21:02.697 回答